But Google complains that complying with the request would compromise its business and the privacy of its users.
Similar requests were made of other net firms such as Microsoft, Yahoo and AOL.
The US government is seeking to defend the 1998 Child Online Protection Act, which has been blocked by the Supreme Court because of legal challenges over how it is enforced.
It wants the data from the search engines to prove how easy it is to stumble over porn on the net.
If it can prove this, the result might be onerous regulation for many websites.
Lawyers for the Department of Justice and Google are scheduled to present their arguments in San Jose later on Tuesday.