Airbnb is suing the city, claiming that legislation passed earlier this month aimed at cracking down on home-sharing companies is in violation of the U.S. Constitution.

The suit, filed in the Southern District of New York on Friday, takes aim at a new law requiring home-sharing companies to disclose information about hosts—including names, addresses, telephone numbers, and email addresses, as well as rental info about guests—so that the city can more easily target scofflaws. The companies will face a $1,500 fine for each listing that is not properly disclosed.

But according to Airbnb, the city's expectation that they hand over such "intimate personal data" constitutes an "extraordinary act of government overreach." Specifically, the ordinance violates the Fourth Amendment prohibiting unreasonable searches and seizure, the company alleges.

"Under normal circumstances, government agencies may obtain private information about citizens only by following the strict legal processes that protect constitutional rights and provide for review and challenge,” the lawsuit reads. "The Homesharing Surveillance Ordinance evades those protections by mandating—under threat of newly created legal liability—that Internet platforms holding the sought-after data obtain blanket, advance ‘consent’ from their users and then automatically surrender the demanded data to the City’s enforcement agency every month."

In an immediate response, the city shot back that the legislation is necessary, both from a safety and affordability standpoint.

"This law provides the city with the critical data it needs to preserve our housing stock, keep visitors safe, and ensure residents feel secure in their homes and neighborhoods," Christian Klossner, executive director of the Mayor’s Office of Special Enforcement, said in a statement. “The city will defend it."

The New York Civil Liberties Union could not be immediately reached for comment, but has previously raised privacy concerns over the legislation. Prior to the legislation passing, the group had lobbied for the data to be anonymized and only held for a short period of time.

Meanwhile, city councilmembers unanimously passed the bill last month, citing the need to protect low-income residents from rent increases believed to be at least partially caused by the home-sharing service. "This bill has one clear priority in mind," said Councilwoman Carlina Rivera when introducing the bill. "Protecting our affordable housing stock for the millions of New Yorkers who could not live here without it."

The new law is scheduled to take effect in February of next year.