Bryan Carmody, the Bay Area freelance journalist whose house was raided by the police this month, was to get back his property that was seized — including his laptop and three decades’ worth of archives — following a hearing in San Francisco Superior Court on Tuesday.

Mr. Carmody became a target of the San Francisco Police Department in February, when his reporting was used in three local TV news reports on the death of Jeff Adachi, a longtime public defender. The materials Mr. Carmody sold to the TV stations included a police report that revealed Mr. Adachi had collapsed at an apartment in the presence of a woman who was not his wife.

The police wanted to find out who had given the report to Mr. Carmody. After Mr. Carmody refused to tell them, the police obtained a search warrant, raided his apartment and detained him, in handcuffs, for six hours.

In a Twitter statement on Tuesday, Mr. Carmody said: “I am pleased that everything that the San Francisco Police took from my office and home will be returned today. This includes the police report, video, records, notes, computers and personal electronics.”