Home-sharing firm Airbnb has struck agreements with London and Amsterdam to limit the number of nights that hosts can offer short-term rentals in those cities.

The deal could become a template for other cities, including Vancouver and Toronto, where some people are concerned that Airbnb properties are becoming illegal hotels and removing rental housing from the market.

The limit for each homeowner to rent out a property in Amsterdam will be set at 60 days a year and in London at 90 days a year.

And Airbnb has agreed with the cities to begin monitoring the number of stays for each home beginning on Jan. 1.

"A home should remain a home," Amsterdam alderman Laurens Ivens said in a statement.

Pricey real estate and Airbnb

"With this new approach we are showing that working together with platforms such as Airbnb gives the city a new and efficient weapon to tackle illegal hotels," Ivens added.

Airbnb is facing regulation of its home-sharing services in cities around the world. (Tina Lovgreen/CBC) In cities with expensive real estate such as Amsterdam, London and Vancouver, homeowners often use the income from Airbnb rentals to help pay the mortgage.

But Toronto and Vancouver have begun looking for ways to rein in short-term rentals, because renters are being squeezed out as landlords find they can earn more from Airbnb rentals.

Vancouver Mayor Gregor Robertson unveiled a plan last month that would only allow rentals lasting fewer than 30 days in a home that's also someone's principal residence. Toronto is discussing how it could regulate services such as Airbnb.

In October, San Francisco brought in a law to restrict hosts from offering more than one property, and demanded that they register with the city.

The move by the company to mollify regulators in big European cities is seen as a sign that Airbnb knows the pressure to limit rentals will just get stronger everywhere it operates.

Facing regulations in many cities

Cities that don't have compliance from the home-sharing company are structuring bylaws to limit illegal hotels.

Airbnb issued a statement in London saying it has "a commitment to work with cities that have identified a shortage of long-term rental housing as a critical issue."

It said it had worked with the city for six months to research the problem of a lack of housing.

Airbnb's general manager for northern Europe, James McClure, said, "We want to be good partners for everyone in the city and ensure home sharing grows responsibly and sustainably."

Since the company launched in 2008, when the co-founders invited travellers to sleep on an air mattress in their San Francisco loft, Airbnb has grown to be one of the world's most valuable private startups by collecting fees when private hosts rent out accommodations listed on the site.