SAN JOSE — Striking one of the first deals in the country with Airbnb, San Jose is ready to start taxing residents who offer their homes for strangers, often as a way to help pay off their own sky-high housing costs.

The San Jose City Council on Tuesday is set to approve a 10 percent tax on all Airbnb rentals in the city, the same rate already charged on hotel rooms. At the same time, the city would legalize what is technically now a prohibited practice of home-sharing — though it hasn’t stopped hundreds of residents from advertising spare rooms or even entire homes for rent on a nightly basis.

Most cities prevent the kind of hotel-like stays in residences that have been popularized by the San Francisco-based company, which has set up 25 million home guest stays around the world in the past six years. The new San Jose law, which Airbnb has consented to and will administer by adding the tax as a line-item on travelers’ bills, would require hosts to notify the city — so neighbors concerned with parking, noise and other issues can be alerted — and limit them to 180 visits per year if they’re not present.

“It is significant that, as the capital of Silicon Valley, we want to stay ahead of and support the sharing economy,” said Kim Walesh, the city’s economic development director. “As our residents are earning additional income, it helps them stay in their homes in a place where the cost of living is high. And our hotels are at capacity.”

San Jose has been working on an Airbnb tax since Mayor Chuck Reed first proposed it in March, though it has received little attention compared to the national media scrutiny focused on similar efforts this year to regulate Airbnb stays in San Francisco. There, as in other costly big cities — but not San Jose — some landlords have been criticized for essentially wiping rental units off the map by making them full-time Airbnb homes.

In San Jose, there are only about 300 hosts offering Airbnb rooms, compared with more than 3,000 in the tourist hub of San Francisco. Most people who use the site to stay in San Jose are business travelers, though some come to check out neighborhoods as a potential place to move, while long-haul Silicon Valley commuters sometimes need a nearby place to crash at the end of a long day.

In addition to the 14 percent tax San Francisco officials approved in October, Portland is charging up to 12.5 percent on Airbnb stays, making San Jose the third city to regulate the service, with Chicago ready to follow suit.

“We’ve had good conversations with officials in cities all over the world about taxes, including San Jose, and even though this is a complicated challenge, we want to work together to ensure that tax rules for home-sharing are clear, fair and easy to follow,” Airbnb said in a statement.

The tax would generate about $150,000 a year for San Jose, a drop in the city’s $1 billion budget bucket, and not even enough money to pay for the salary and benefits of one police officer.

Despite the lack of tourism in Silicon Valley, local hosts say demand is strong and they have to turn away travelers more often than they have vacant rooms. In all, San Jose guests on Airbnb stay for an average of a week and pay an average of $88 per night.

The tax comes on top of the 6 to 12 percent fee Airbnb already charges guests for each booking, depending on how expensive the room is, though many hotels also charge separate fees.

The most common rooms are in townhomes and condos near the airport and downtown, but visitors can also find bedrooms in single-family houses in Willow Glen, near Santana Row and elsewhere, according to current listings on the site. Even some full homes, including a $5,000-a-day mansion, are available.

Airbnb says San Jose hosts book an average of 56 nights per year, or about one night per week, though most only offer their rooms for a portion of the year. The typical host’s revenue is nearly $5,000 per year, before fees, taxes and operating expenses.

Several hosts interviewed for this story were mixed on the city’s proposed new rules. Some, like Karyn Nguyen, said the tax could drive away guests and eat into the bottom lines of hosts, who already have to report their income on their taxes and give 3 percent of their revenue to Airbnb.

“We’re just going to pass it on somewhat to our guests. It’s not going to make it more affordable for guests to stay anymore,” said Nguyen, who charges $78 per night for a room in her 3-bedroom condo in Communications Hill.

But other hosts view the proposal as fair since all Airbnb users will be subject to the same tax, and hotels already pay it. Host Keith Washo argues the tax is small enough that it isn’t likely to make it more expensive than a hotel.

“Some people who never use it won’t even know the difference,” said Washo, who charges $88 per night for a bedroom in his North San Jose townhome. “Some people who do use it would think it’s an extra $7 or so. And what else are you going to do?”

With lower home prices, more Californians could afford a home purchase in the fourth quarter of 2018 compared to the previous quarter, but the California Association of Realtors reports higher interest rates lowered affordability from the previous year for most counties.