After six months of combative back and forth, New York Attorney General Eric Schneiderman and AirBNB have come to an agreement that will allow the apartment-rental site to turn over anonymized data regarding its users and out them by name only if they become the subject of an investigation.

The agreement gives AirBNB a month to turn over information about its New York hosts demanded by a May 14 subpoena, but lets the site provide “unique identifiers” in lieu of their names and apartment/unit numbers.

The Attorney General will then have a year to ask for more specific information — including names, addresses, and tax identification numbers — for users who become the subject of an investigation or enforcement action.

All AirBNB hosts will also have to agree to a statement informing them of New York hotel and rent stabilization laws, which, among other things, prohibit apartment dwellers from renting out their places for less than 30 days unless they’re present during their guest’s stay.

In a joint statement, AirBNB and the AG said the agreement “balances Attorney General Schneiderman’s commitment to protecting New York’s residents and tourists from illegal hotels with Airbnb’s concerns about the privacy of thousands of other hosts.”

In a blog post, AirBNB co-founder David Hantman — in a bit of an about-face — indicated that he believes the AG is not targeting everyday New Yorkers. “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.”

Neither AirBNB nor the AG have said whether the agreement applies to users who have rented out their apartments for less than 14 days in a year or less than three times a year. The Attorney General initially demanded information on all of AirBNB’s New York users, but a State Supreme Court judge ruled that the subpoena was too broad because it would’ve netted those who didn’t use the service often enough to be subject to hotel tax. The AG issued a narrower subpoena, to which AirBNB has now agreed.