Brooklyn’s Airbnb black market is booming despite the city’s best efforts to stamp out illegal rentals, according to an investigator hired by a hotel-industry group.

The borough’s hipster status makes it a magnet for Airbnb listings, with three of its neighborhoods alone — Williamsburg, Bed-Stuy and Bushwick — accounting for nearly 20 percent of all of the service’s rentals in the city, according to statistics on the short-stay company’s Web site.

And that makes it ripe for scofflaws, according to former NYPD cop Herman Weisberg, whose investigative firm was hired by the Hotel Association of New York to go undercover to probe illegal activity.

Some hosts instruct customers to outright lie about their stays, claiming they’re for every reason except the real ones so they don’t get busted, Weisberg said.

“We ask our guests not to mention Airbnb because [its company execs] are working on their image,” one renter instructed, according to Weisberg.

Another host allegedly said, “Not all buildings in New York are Airbnb-friendly, so we ask that you kindly not mention Airbnb in or around the building.”

What the hosts are trying to hide is the fact that they are renting out whole unoccupied apartments and homes for less than 30 days, effectively turning the properties into revolving-door hotels, which violates city regulations.

​“Hosts are engaging deceptive practices to avoid exposure and to hide from Airbnb’s image problem,” Weisberg said.​​ “They’re putting emphasis with anonymity​. ​If I’m the guest of an illegal hotel operator and been told I can’t mention Airbnb and I’m supposed to keep it to myself, the message would be clear not to let anybody know.”

Weisberg said his crew found landlords even hiring management companies to run their illegal Airbnb “hotels.’’

But at least some of the management companies don’t keep tabs on keys or have security in place for guests, according to the ex-cop.

In one instance, Weisberg said, his investigators found several keys in a single lock box that all guests can access.

He noted that there is nothing stopping guests from making copies of keys and illegally accessing rooms they haven’t rented.

About half of the site’s city listings are illegal, according to an independent data aggregator, InsideAirbnb.com, which scours the company’s Web offerings for violators.

The problem has prompted the city to increase its regulation. The Office of Special Enforcement issued 32 percent more short-term-rental violations in the first six months of this year compared to the same period in 2016 — 1,026 vs. 693.

But an Airbnb rep said Weisberg and his PIs only make matters worse at the expense of the public.

“The hotel industry’s secret police is stooping to new lows,’’ said Airbnb spokesman Josh Meltzer.

“Responsible hosts who share their own home — and often just rooms in their homes — are now being targeted by industry-backed enforcement officials.

“These insidious tactics do nothing other than hurt already-struggling New Yorkers while protecting the multibillion-dollar, booming hotel industry.”