05/21/2014 01:55 pm ET Updated May 23, 2014

Airbnb Forced To Hand Over Anonymous User Records

Airbnb has announced it will turn over user data -- anonymized, for now -- to New York Attorney General Eric Schneiderman.

But if Schneiderman suspects an Airbnb host of illegal activity, the company will turn over detailed user information from name to social media accounts to Tax ID number and more, Gawker reports.

The decision comes as part of a joint agreement reached Wednesday between Airbnb and the state, which have engaged in a highly publicized battle over the legality of the popular home rental company. Schneiderman says Airbnb users routinely violate laws prohibiting residents from renting out their apartments for less than 30 days, leaving New York out of millions of dollars in hotel taxes.

Schneiderman's office issued a subpoena for the records back in October, but Airbnb officials had fought to keep them private. As part of the agreement, user data will initially be substituted with individual codes. From Airbnb:

The Attorney General's Office will have one year to review the anonymized data and receive information from us about individual hosts who may be subject to further investigation. We believe the Attorney General's Office is focused on large corporate property managers and hosts who take apartments off the market and disrupt communities. We have already removed more than 2,000 listings in New York and believe that many of the hosts the Attorney General is concerned about are no longer a part of Airbnb.

Last week, a judge rejected the subpoena on account of being too broad, but argued there was significant evidence pointing to "a substantial number of hosts" that are skirting the state's hotel laws.

Airbnb says it has offered to collect hotel taxes in New York state, Gizmodo reports, but cannot under current state law.

The company has run a considerable campaign to remain operating in New York City, even attempting to appeal to then-mayor-elect Bill de Blasio weeks before he officially took office.

De Blasio, however, has appeared to largely side with Schneiderman's concerns, expressing a need to review Airbnb's policies.

Wednesday's agreement below:

OAG Airbnb Letter of Agreement