City Hall has issued a subpoena demanding information from Airbnb about roughly 20,000 apartment listings in the city, saying it wants to make sure, in part, they are not being used as de-facto hotels.

Announcing the subpoena Monday on Inside City Hall , Mayor Bill de Blasio said the federal judge who issued an injunction on a new law to require Airbnb and similar companies to hand over detailed information about listings to the city told the city it could subpoena for the information while the law was being reviewed.

The mayor argued the law, and the information, is necessary to crack down on people found to be using the Airbnb apartments as illegal hotels. The state does not allow anyone to rent out an entire apartment for less than 30 days if the owner or tenant is not also staying in the home.

City Hall has issued a subpoena demanding information from @Airbnb about roughly 20,000 apartment listings in the city. The city says it wants to make sure, in part, they are not being used as de-facto hotels, siphoning off housing. #NY1Politics pic.twitter.com/1VtdL6xylr — Spectrum News NY1 (@NY1) February 19, 2019

Airbnb responded in a statement, saying: "Illegal hotel operators have no place on our platform. That's why we have sought for the past few years to work with the administration on targeting these bad actors."