A federal judge has ruled that the US government can only subpoena a list of URLs from Google's index but will not get access to sample queries as they are submitted by users.
The US government had initially demanded that Google hand over billions of URLs and two months of queries. At a court hearing last weak, the government watered down its request, asking for only 50,000 URLs and 5,000 search queries.
Although the government did not indicate what it was looking to do with the requested URLs, the court gave "the government the benefit of the doubt" in granting the request, it said in a written ruling (PDF download).
On the matter of the requested queries however, the judge sided with Google in claming that the subpoena would harm user confidence and claimed that there is a "potential burden as to Google's loss of goodwill".
He also followed Google's assertion that such information should be considered a trade secret.
"This is a clear victory for our users and for our company," Google associate general counsel Nicole Wong wrote on the Google blog.
"We believe that if the government was permitted to require Google to hand over search queries, that could have undermined confidence that our users have in our ability to keep their information private."
She added that Google plans to fully comply with the judge's ruling.
Scientists create a virtual reality simulation of a black hole sitting at the centre of the Milky Way
Simulations like this can help people understand complicated systems in the universe in a better way
The most luminous galaxy ever discovered is cannibalising at least three of its smaller neighbours, study finds
The galaxy radiates at 350 trillion times the luminosity of the Sun
Researchers modify genetic code of cancer-killing virus so it can target cells that protect cancer from immune system
Changing the genetic coding causes the infected cancer cells to produce a protein that kills the fibroblast cells that protect cancer
The findings can help improve the current understanding of brain development disorders, such as epilepsy or autism