MURRAY COX chuckled when he was invited to a meeting with Airbnb representatives in downtown Manhattan in February.

For four years Mr. Cox has been publishing reports that cast Airbnb as a big-city housing-villain, but the company had never reached out to him before. A rendezvous was set for a WeWork meeting room on Broadway, across the street from Airbnb Inc.鈥檚 offices in New York. Was the location suitable to Mr. Cox, Airbnb wanted to know? Well yes, Mr. Cox thought, or he could just walk downstairs since he works in the same building as Airbnb, close enough to connect to their Wi-Fi.

By day, Mr. Cox spends his time on the 27th floor of a corporate skyscraper as a vice president for a tech start-up, surreptitiously riding the elevator with Airbnb employees who occupy space on the 26th floor. By night, the 46-year-old often sits on his couch in Brooklyn scraping Airbnb鈥檚 website, delivering curated statistics to cities around the world that are seeking to rein in the ever-expanding home-sharing giant.

Mr. Cox has turned Airbnb鈥檚 own data against it by highlighting thousands of illegal listings on the platform that he says distort the housing market. To Mr. Cox, Airbnb is 鈥渁n obnoxious multibillion-dollar corporation that thinks they are changing the world when in fact they are having negative impacts on it.鈥 And for just as long, Airbnb has vilified Mr. Cox, publicly undermining his work while accusing him of being in the pocket of the hotel industry. An Australian spokesman for Airbnb called his website 鈥済arbage.鈥

But as Airbnb, privately valued at $31 billion, readies itself for a public stock listing next year, it鈥檚 exigencies are shifting. The San Francisco-based company needs to make peace in New York, its biggest domestic market, where it鈥檚 locked in a fight over regulation. To do so, it must broker a ceasefire with Mr. Cox, whose data hardens the city鈥檚 stance.

Airbnb spokeswoman Liz DeBold Fusco reached out to Mr. Cox earlier this year after some public sparring on Twitter and invited him to 鈥渉ave a real conversation about the path forward for home sharing鈥 in New York.

After half a decade of rebuttals mostly by press release, Mr. Cox was taken aback by the sudden prospect of a face-to-face meeting. Sitting in the apartment he shares with his dog Finch, Mr. Cox read and re-read the message, wondering if it was some kind of trick.

The soft-spoken Australian native hardly seems to fit the bill of 鈥淎irbnb鈥檚 global public enemy No. 1,鈥 as some media have labeled him.

鈥淧eople describe me as a watchdog over Airbnb,鈥 Mr. Cox says in an interview, dressed in a denim shirt and Nike sneakers, as he picks at a plate of vegetables and tofu at a Manhattan noodle shop. It鈥檚 a label he rejects. 鈥淚鈥檓 just a housing activist. I believe housing is a human right; not an economic tool or a commodity.鈥

Mr. Cox studied computer science at the University of Sydney and since graduating in the mid 1990s, has worked at small tech start-ups and dabbled in photojournalism. His activist streak was likely passed down by his older brother, an environmentalist who worked on campaigns to protect Australia鈥檚 wildlife.

After some globe-trotting, Mr. Cox settled down in Brooklyn in 2008. That same year, Brian Chesky, Joe Gebbia and Nathan Blecharczyk launched Airbnb, inviting strangers into their apartment in San Francisco for short-term stays to help pay rent. Before long, Airbnb had grown into the world鈥檚 biggest home-sharing platform, with more than 6 million listings in 191 countries. As it expanded, Airbnb has faced increasing pushback from many cities that say its model squelches the housing supply, raises rents and pushes long-term residents out.

Mr. Cox first started noticing this phenomenon in his own neighborhood in the summer of 2014. At the time he was working with a youth group, teaching kids about gentrification, segregation and housing pressures. Mr. Cox鈥檚 initial understanding of Airbnb was that it was a way for people to rent out spare bedrooms, bringing in a little money on the side. But in looking over the data, he was surprised to learn that, in fact, hosts were renting out entire homes.

What began as a simple class project turned into an obsession that spawned the website Inside Airbnb. Mr. Cox now spends about 10 hours a week parsing statistics from listings in more than 100 cities and fielding half a dozen queries from academics and journalists around the world. Using publicly available information, Inside Airbnb gives a view into how many listings there are in a certain zip code, how many are entire private homes versus a room in a home, the price and the number of reviews each has received.

It鈥檚 valuable information for cities that are trying to crack down on entire networks of managed Airbnb units or serial renters whose practice eliminates apartments that would be otherwise available for people looking for a place to live. A New York law from 2010 made it illegal to rent an entire apartment in a multi-unit building for less than 30 days without a tenant present. San Francisco, Barcelona and Paris are among about 30 cities that have requested Cox鈥檚 data and have imposed regulation and restrictions on Airbnb. Listings in San Francisco dropped by about half in 2015 after the city required Airbnb to automatically register hosts on its site. New York could suffer a similar fate.

Airbnb鈥檚 rebuttal is that Mr. Cox鈥檚 data lacks context. For example, not all of the listings on Airbnb are 鈥渁ctive,鈥欌 meaning that just because an apartment is listed, and included in Cox鈥檚 data, doesn鈥檛 mean it鈥檚 available. His site doesn鈥檛 take into account the fact that multiple listings might be advertising the same property. Airbnb also takes issue with Mr. Cox鈥檚 calculation of prices and how much income a host earns per month.

Academics maintain that Inside Airbnb is the best source of publicly available data about the company. 鈥淭he reality of the kind of activity that is occurring on Airbnb鈥檚 platform is at odds with the kind of image they would like to project,鈥 says David Wachsmuth, a professor at McGill University鈥檚 School of Urban Planning. Whether or not one agrees with the conclusions of Mr. Cox鈥檚 data, 鈥渢here are no grounds for disputing the fact that he鈥檚 creating a fair and accurate representation.鈥

Mr. Cox receives payments from some cities, including $200 a month from San Francisco, as well as the hotel trade association, and researchers. Maintaining the website costs him about $10,000 a year and the payments usually cover the bills, he says. In the past year, he has been flown to Barcelona, Australia, and Paris to speak at various home-sharing events about his findings.

But nowhere does Mr. Cox pose more of a threat for Airbnb than in New York. The city has some 50,000 listings and is one of the world鈥檚 top tourist destinations, attracting 65 million visitors last year. It鈥檚 also one of the most expensive cities in the country and has draconian housing laws as well as a powerful hotel lobby. The city is at loggerheads with Airbnb over a law that prevents anyone from renting out an apartment for fewer than 30 days unless the permanent tenant is present.

Every month, Mr. Cox sends statistics to New York City鈥檚 Office of Special Enforcement with detail about what kinds of homes are being rented out. His data is the backbone of the city鈥檚 recent subpoena of 17,000 Airbnb listings it presumes are illegal.

鈥淗ousing issues are at the core of a lot of problems in this city,鈥 Mr. Cox says. 鈥淚 care about social justice. I care about racial and economic equality; Airbnb is impacting those things.鈥

For example, Mr. Cox found that across 72 predominantly black New York City neighborhoods, Airbnb hosts are five times more likely to be white. His data has also shown that the majority of Airbnb listings are entire apartments rented out year round, suppressing available housing in New York by about 10% and raising rents by hundreds of dollars a year.

Mr. Cox sees his biggest coup as exposing Airbnb in 2016 for quietly wiping 1,000 illegal commercial listings off its platform in New York, allowing it to paint a rosier picture of its operations and misleading the public and city officials.

Airbnb鈥檚 outreach in February could be linked to the upcoming public offering, said Andrew Rasiej, chairman emeritus of the non-profit organization New York Tech Alliance. 鈥淚t鈥檚 reasonable to assume there鈥檚 a correlation between Airbnb wanting to meet with a vocal critic in New York and to appear as legal as possible before an IPO in order to calm investor鈥檚 fears,鈥 he said.

But Mr. Cox wasn鈥檛 calm when he walked into the meeting room on a cold day in February. 鈥淢y adrenaline was up. I didn鈥檛 know what they were going to talk about and there鈥檚 always a chance they could try and sue me,鈥 he said. Mr. Cox was welcomed by DeBold Fusco and Andrew Kalloch, an Airbnb policy manager, who dialed in via phone from Portland, where he鈥檚 based.

The pleasantries were short-lived, however, and the tension quickly grew thick as they argued over a proposal to legalize and regulate home sharing in New York. Neither side was willing to give an inch.

But a few weeks ago, Airbnb agreed to ban listings of subsidized or rent-controlled housing in New York in an effort to appease activists like Mr. Cox. The move 鈥渞eflects the fact that we are listening,鈥 said DeBold Fusco, the Airbnb spokeswoman. Mr. Cox isn鈥檛 convinced. He reached out to her last month via Twitter to see if she wanted to catch up over coffee and discuss the proposal again. This time she didn鈥檛 respond. — Bloomberg