New York City is upping the ante in its fight against Airbnb, as the two sides battle it out in court and in the court of public opinion.

On Monday, New York City Mayor Bill de Blasio announced that the city is issuing a subpoena to Airbnb, demanding that the short-term rental site turn over the listing data that’s at the center of a legal battle between the two sides.

Last year, New York passed legislation designed to combat the rise of short-term rentals in the city. The law prevents landlords and tenants from illegally renting out apartments for a few days at a time to tourists.

Additionally, sites like Airbnb would be required to provide the addresses and names of hosts to the city each month and specify whether rentals are for a whole apartment or just a room.

Airbnb sued the city over the law, claiming that the ordinance violated users’ privacy rights. And earlier this year, a federal judge sided with Airbnb and froze the law’s requirement to disclose user data while the lawsuit is being decided.

But that isn’t stopping New York from trying to get the data from Airbnb.

Now, the city is subpoenaing Airbnb, going outside of the judicial process to try to obtain the user and listing data on approximately 20,000 apartment listings.

“We want to see their listings. We want to see which apartments are being rented out. We want to know what’s really going on,” de Blasio told New York’s NY1 on Monday night.

“We want to make sure there’s not illegal hotels,” de Blasio continued. “We want to make sure that something that is supposed to be an occasional business is not a full-time business, which would mean it should be listed as a business…it should be regulated as a business.”

As de Blasio has done in the past, he reiterated the city’s reasons for pursuing the information.

“People are worried about the loss of housing, the loss of affordable housing. They’re worried about security. You’ve got all sorts of strangers in your building,” de Blasio said. “People want to know what the hell is going on.”

According to de Blasio, Airbnb has not been forthcoming enough with the city’s requests in the past. “Be transparent and we can start to make progress,” de Blasio said.

Airbnb, on the other hand, contends that it’s more than willing to work with the city and the state legislature to enact short-term rental laws that make sense for all involved.

To that end, Airbnb sent a letter to de Blasio’s office, laying out its case and repeating what it calls a “path forward” for home sharing in the five boroughs.

According to Airbnb, New York City should follow the blueprint established by cities like Philadelphia, Chicago, San Francisco, Los Angeles, Denver, and others to implement “workable rules and data agreements” that provide tax revenue to the cities.

“It is no secret that we have been vocal supporters of this very approach in New York City -- in the form of comprehensive and effective regulations that provide those key protections for New York City hosts and outline clear rules for safety, tax collection, and enforcement against those who would seek to take advantage of our platform to operate illegal hotels,” Chris Lehane, head of global policy at Airbnb, said in the letter to de Blasio.

“We have encountered intense opposition -- and yet, we remain as steadfast as ever in our commitment to work with government officials who have a seriousness of purpose when it comes to making progress toward this larger goal of achieving a regulatory framework,” Lehane continued. “No matter how long it takes, we will continue standing up for our existing and future hosts -- because establishing progressive and enforceable rules, as so many other cities have done, is important to our community.”

Airbnb notes that in 2016 it implemented a “One Host, One Home” policy in New York, which stipulates that users cannot have more than one property on the site.

According to the site, since it started enforcing that policy, it has removed more than 5,000 listings from its site, noting that its enforcement needs improvement as “bad actors” sometimes figure out a way to skirt the site’s rules.

One such example involves group of New York real estate brokers who allegedly used Airbnb to make $21 million by operating at least 130 illegal short-term rentals in the city over the last several years.

Airbnb notes that the One Host, One Home program is not a “permanent fix” to the problem, rather it is simply a “bridge” to fair government regulations.

“In San Francisco and Portland, these transitions are underway, with One Host, One Home evolving into an operational regulatory framework -- including a rational registration process that allows these cities to use their data on housing and residency standards to determine who is allowed to host and to identify bad actors to keep them off of the platform,” Lehane said.

“In fact, these cities are evidence that, for regulatory frameworks to be truly effective, platforms like Airbnb and government must work together on enforcement and avoid unintended harm to regular citizens,” Lehane added. “Simply put, relying on outdated rules that don’t recognize the way home sharing works today shortchanges our community and the City of New York.”

Lehane writes that the site supports legislation at the state level that could create a “simple registration system that doesn’t violate our hosts’ privacy,” which would conceivably allow Airbnb to collect taxes and pass those along to New York.

“We would welcome the opportunity to work with the City to finally get this legislation across the finish line during this legislative session. In the meantime, we have also offered to work with the City to collaboratively focus enforcement efforts on weeding out large scale commercial operators who seek to circumvent our policies. And while that offer hasn’t yet been accepted, we stand by it,” Lehane said.

“We have faced a tremendous amount of adversity so that New York’s 40,000 hosts can make it here -- and rather than taking our ball and heading home, we want to find a way to play ball so that everyone can be a winner,” Lehane concludes. “We hope you’ll work with us to find a path that allows them to keep their doors open while closing the doors of illegal hotel operators.”

To read Airbnb’s letter in full, click here.