Last week's fire that killed 36 people living in a California warehouse underscored the dangers of creating residential spaces without the needed approvals. Here in New York such illegal conversions are a big problem, especially as rents keep rising. NY1's Ruschell Boone joined city inspectors on the hunt for illegal apartments.

Department of Buildings inspectors bust a real estate agent trying to rent them an illegally converted apartment. 

The illegal conversion problem is citywide, but severe in Brooklyn and Queens.

"A lot of this has to do with the current economic conditions that people in order to pay their mortgages try and bring in a little extra rent, and don't take into consideration the safety of the people that they put into these apartments, and don't realize the  potential that it causes for loss of life," says Timothy Hogan, deputy commissioner of enforcement of the Department of Buildings.

NY1 was the only news outlet there when the sting when down.

An illegal conversion is an alteration of a building to create housing without city approval. Like this apartment, many lack proper exits, have unsafe gas hookups and other safety violations. 

"I'm closing it up and I'm leaving," says a broker.

Inspectors usually enter if someone gives them access. In this case they were allowed in, and they slapped the property owner with a violation and a vacate order. 

If extreme violations are suspected, inspectors can seek a court warrant.

"In some of these instances we find that 2 and 3 family houses and made into 20, 25, 30 apartments," says Hogan.

Last year, DOB received more than 19,000 complaints. 

More than half of the complaints were in Queens.

DOB says it investigated about 70 percent of those complaints, but only gained access to less than half of those buildings.

Violations were issued for nearly 23,000 properties.

The city is also trying to be proactive. Its Living Safely Awareness Campaign alerts building owners and renters about the dangers and potentially deadly consequences of illegal conversions.

"We realize the housing shortage and the demands on everyone of all kinds of incomes is very, very great," says Department of Buildings Commissioner Rick Chandler "But it's just not worth putting yourself in those situations where there are multiple hazards."

In addition, there are penalties. Some realtors face fines and potential loss of license.