Airbnb Rental Regulation Checker

Airbnb Rental Regulation Checker

You can only host in your primary residence, and you must be present during the stay for rentals under 30 days.

` }, "Taxes": { title: "Taxes", content: `

Occupancy Tax

Short-term rentals are subject to New York City's hotel room occupancy tax. In addition, New York State imposes a sales tax.

Platforms like Airbnb may collect and remit these taxes on behalf of hosts.

` }, "Zoning & Building Codes": { title: "Zoning & Building Codes", content: `

Multiple Dwelling Law

It is generally illegal to rent out an entire apartment for less than 30 days in a building with three or more units, even if you own it.

Prohibited Buildings List

OSE maintains a list of buildings where short-term rentals are prohibited.

` } }, "san francisco": { "Licensing & Registration": { title: "Licensing & Registration", content: `

Short-Term Rental Registration

Hosts must register with the Office of Short-Term Rentals and obtain a registration certificate. The registration number must be displayed on all listings.

Primary Residence Requirement

Only permanent residents of San Francisco can host short-term rentals in their primary residence.

` }, "Rental Caps": { title: "Rental Caps", content: `

90-Day Annual Limit

Un-hosted rentals (where the host is not present) are limited to a maximum of 90 days per calendar year.

` }, "Taxes": { title: "Taxes", content: `

Transient Occupancy Tax (TOT)

A 14% Transient Occupancy Tax is levied on all short-term rentals (less than 30 nights). Airbnb collects and remits this tax automatically.

` } }, "los angeles": { "Licensing & Registration": { title: "Licensing & Registration", content: `

Home-Sharing Registration

Hosts must register with the city and obtain a registration number. This number must be included in all listings.

Primary Residence Only

Short-term rentals are only permitted in a host's primary residence.

` }, "Rental Caps": { title: "Rental Caps", content: `

120-Day Annual Cap

Hosts are generally limited to 120 days of short-term rentals per year. An extension is possible under certain circumstances through a more complex process.

` }, "Taxes": { title: "Taxes", content: `

Transient Occupancy Tax (TOT)

A 14% Transient Occupancy Tax applies to rentals of 30 days or less. Airbnb collects and remits this tax on behalf of hosts.

` } } }; const searchRegulations = (query) => { loader.style.display = 'flex'; resultsContainer.classList.add('hidden'); pdfDownloadBtn.classList.add('hidden'); setTimeout(() => { const lowerCaseQuery = query.toLowerCase(); const results = regulationsDB[lowerCaseQuery]; loader.style.display = 'none'; if (results) { displayResults(results); resultsContainer.classList.remove('hidden'); pdfDownloadBtn.classList.remove('hidden'); } else { tabsContainer.innerHTML = `

No regulations found for "${query}". Please try another location.

`; tabContentsContainer.innerHTML = ''; resultsContainer.classList.remove('hidden'); prevBtn.classList.add('hidden'); nextBtn.classList.add('hidden'); } }, 1500); // Simulate API call }; const displayResults = (data) => { tabsContainer.innerHTML = ''; tabContentsContainer.innerHTML = ''; tabs = []; tabContents = []; currentTabIndex = 0; Object.keys(data).forEach((key, index) => { const item = data[key]; const tab = document.createElement('button'); tab.className = `tab py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none`; tab.textContent = item.title; tab.dataset.index = index; tabsContainer.appendChild(tab); tabs.push(tab); const tabContent = document.createElement('div'); tabContent.className = 'tab-content p-4 bg-gray-50 rounded-lg'; tabContent.innerHTML = item.content; tabContentsContainer.appendChild(tabContent); tabContents.push(tabContent); }); updateTabs(); }; const updateTabs = () => { tabs.forEach((tab, index) => { if (index === currentTabIndex) { tab.classList.add('active'); tabContents[index].classList.add('active'); } else { tab.classList.remove('active'); tabContents[index].classList.remove('active'); } }); prevBtn.disabled = currentTabIndex === 0; nextBtn.disabled = currentTabIndex === tabs.length - 1; prevBtn.classList.toggle('opacity-50', currentTabIndex === 0); nextBtn.classList.toggle('opacity-50', currentTabIndex === tabs.length - 1); } tabsContainer.addEventListener('click', (e) => { if (e.target.classList.contains('tab')) { currentTabIndex = parseInt(e.target.dataset.index); updateTabs(); } }); prevBtn.addEventListener('click', () => { if (currentTabIndex > 0) { currentTabIndex--; updateTabs(); } }); nextBtn.addEventListener('click', () => { if (currentTabIndex < tabs.length - 1) { currentTabIndex++; updateTabs(); } }); let debounceTimer; searchInput.addEventListener('input', (e) => { clearTimeout(debounceTimer); const query = e.target.value; if (query.length > 2) { debounceTimer = setTimeout(() => { searchRegulations(query); }, 500); } else { resultsContainer.classList.add('hidden'); pdfDownloadBtn.classList.add('hidden'); } }); pdfDownloadBtn.addEventListener('click', () => { const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const contentToPrint = document.createElement('div'); contentToPrint.style.padding = '20px'; const title = document.createElement('h1'); title.textContent = `Short-Term Rental Regulations for: ${searchInput.value.toUpperCase()}`; title.style.fontSize = '24px'; title.style.fontWeight = 'bold'; title.style.marginBottom = '20px'; title.style.textAlign = 'center'; contentToPrint.appendChild(title); tabContents.forEach((content, index) => { const tabTitle = document.createElement('h2'); tabTitle.textContent = tabs[index].textContent; tabTitle.style.fontSize = '18px'; tabTitle.style.fontWeight = 'bold'; tabTitle.style.marginTop = '20px'; tabTitle.style.borderBottom = '1px solid #ccc'; tabTitle.style.paddingBottom = '5px'; tabTitle.style.marginBottom = '10px'; contentToPrint.appendChild(tabTitle); const contentClone = content.cloneNode(true); contentClone.classList.remove('tab-content', 'active'); contentClone.style.display = 'block'; contentToPrint.appendChild(contentClone); }); document.body.appendChild(contentToPrint); html2canvas(contentToPrint, { scale: 2 }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const imgProps= pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save(`airbnb-regulations-${searchInput.value.replace(/\s+/g, '-')}.pdf`); document.body.removeChild(contentToPrint); }); }); });
Scroll to Top