Alberto Gonzales, the US attorney-general, filed a legal motion in the Silicon Valley city of San Jose on Wednesday to enforce a subpoena requesting Google hand over a week's worth of data on online searches by internet users.
The government says it needs the data to defend the constitutionality of the Child Online Protection Act in a federal court in the state of Pennsylvania.
Federal lawyers want the information from Google to back an argument that the law is a more effective tool than software filters in keeping children from getting access to adult-only websites.
The government is seeking the data from Google to help bolster its case after the US Supreme Court overturned a 1998 law that required websites to check the ages of online visitors before granting adults access to online pornography.
The nation's highest court ruled that the law was so broad that it could deny adults legitimate access to such sites.
Nicole Wong, Google associate general counsel, said in a written statement: "Google is not a party to this lawsuit and their demand for information overreaches.
Google will not filter out personal
information from its data
"We had lengthy discussions with them to try to resolve this, but were not able to and we intend to resist their motion vigorously."
The original subpoena served on Google asked for the addresses of all websites that could be located by the Mountain View, California, company's vast search engine as of 31 July 2005.
The subpoena also demanded the words, terms and symbols from every Google search request from 1 June 2005 through 31 July 2005, according to court paperwork.
Google got federal officials to whittle down the request, court filings showed.
Pam Dixon, of the World Privacy Forum, said: "If Google loses this, what is to stop the US government from making constant requests for all sorts of things, such as searches on terrorism or any company they are investigating?
"Google could become the greatest research tool for the government that anyone ever envisioned. I certainly don't blame Google for fighting this," she said.
Court filings indicated "a major search engine" had complied with a similar subpoena from the justice department.
The subpoena is "the first shoe dropping" that online privacy advocates have long feared, said Beth Givens, director of the non-profit Privacy Rights Clearinghouse in San Diego, California.
"These search engines are a very tempting target for government and law enforcement," Givens said.
"These search engines are a very tempting target for government and law enforcement"
Privacy Rights Clearinghouse, California
"Look at the millions of people who use search engines without thinking of the potential to be drawn into a government drag net."
In a written release posted on the internet, search engine Yahoo! said it "complied on a limited basis and did not provide any personally identifiable information".
Google stores user information in a single tracking "cookie" that could hold a rich load of data about anything from email, online purchases, addresses, names, searched words, or other terms typed in, Givens said.
Dixon said Google would not be able to filter out personal information from the data demanded by the government.