Airbnb has had a rough history with regulators in New York City. Now the company is playing nice.

On Tuesday, the short-term home-rental company began sharing data on the ways that people open their homes to guests in the five boroughs. The data, an anonymized compendium of the thousands of hosts in New York, includes statistics like host earnings, the types of listings and how often people rent out their homes.

The effort is the first time Airbnb has voluntarily shared city data on a wide scale on how its hosts use the online platform. The move follows a public pledge that the company made last month, in which the start-up said it wished to build an “open and transparent” community.

“Our hope is that people will understand 99 percent of people on Airbnb in New York City are using it as an economic lifeline,” Chris Lehane, Airbnb’s head of global policy and public affairs, said in an interview.

The action is part of the company’s broad effort to convince local and national regulators that Airbnb is not a platform for so-called illegal hotel operators, who use it to skirt local housing laws and hotel restrictions to regularly rent properties to travelers.