Facebook and Google say they have complied with an Indian court directive and removed "objectionable" material.
They are among 21 web firms, including Yahoo and Orkut, facing a civil suit in Delhi accusing them of hosting material that may cause communal unrest.
A criminal case of similar allegations is due to be heard next month.
Judges have threatened to block sites that fail to crack down on offensive content, but many firms say it is impossible to pre-filter material.
Late last year, Communications Minister Kapil Sibal met officials from Google, Facebook and other websites and said the government would introduce guidelines to ensure "blasphemous material" did not appear on internet.
The Delhi High Court last month asked Facebook and Google India to "develop a mechanism to keep a check and remove offensive and objectionable material from their web pages" or "like China, we will block all such websites".'Constitutional issue'
The civil case being heard in Delhi on Monday was filed by Muslim petitioner Mufti Aizaz Arshad Kazmi, who alleged the companies were hosting material intolerant to religious sentiment.
Google and Facebook told the court they had complied with an earlier order by a Delhi district court judge to take down certain material.
Google said: "This step is in accordance with Google's longstanding policy of responding to court orders."
Facebook India said it had also filed its compliance report.
Facebook, Google, Yahoo, Microsoft and others all argued that no action should be taken against them.
But the judge insisted the 22 firms should provide a written reply within 15 days detailing the removal of the material.
A second, criminal case - brought by Hindu journalist Vinay Rai - is scheduled to be heard next month, with leading company executives summoned to appear.
However, a Delhi High Court judge will rule next week on an appeal by the firms involved for the case to be quashed.
A spokesman for Microsoft said it had "filed an application for rejection of the suit on the grounds that it disclosed no cause of action against Microsoft".
Google India has argued that it is not feasible to pre-monitor material posted by "billions of people across the globe".
Google lawyer, NK Kaul, said in an earlier court hearing that the issue also related "to a constitutional issue of freedom of speech and expression, and suppressing it was not possible as the right to freedom of speech in democratic India separates us from a totalitarian regime like China".
Facebook says policies are in place that enable people to report abusive content.
In December, Mr Sibal said: "My aim is that insulting material never gets uploaded. We will evolve guidelines and mechanisms to deal with the issue. [The companies] will have to give us the data, where these images are being uploaded and who is doing it."
Mr Sibal was angered by morphed photos of Prime Minister Manmohan Singh and Congress president Sonia Gandhi, as well as pigs running through Islam's holy city of Mecca.