Look up the STR rules for any address
Send an address and get back the short-term rental rules that govern it: the city or county ordinance, the state and national layers above it, and a link to the official source for each.
New to the API? Start with the integration guide: a step-by-step walkthrough with tested Python and JavaScript code. Building a client? Import the OpenAPI 3.1 spec. Using Claude or ChatGPT? Connect LawfulStay as an MCP server.
Free sandbox key
Try the API before you buy. A sandbox key returns real data for 20 sample markets, so you can build and test your whole integration. We email the key to you, usually within a minute.
| Sandbox | Paid plans |
|---|---|
| 20 sample markets (below) | Every tracked location |
| 500 calls a month, 10 a minute | From 1,000 a month |
/resolve, /address, /viability, /changes for the sample markets | All endpoints, all locations |
| 1 webhook, sample markets only | Up to 5 (Change feed, Growth) or 25 (Enterprise) |
What counts as a call
- One call returns the rules for one place: a street address (US and international), a city or a place ID.
- Rules are kept by place, not by property. 400 homes in Denver need one Denver lookup if you reuse the answer.
- Use the change feed to re-check only the places that changed, instead of every property.
Rough fit: up to about 300 properties, Startup (1,000 calls a month); 300 to 2,000, Change feed (5,000); 2,000 to 5,000, Growth (10,000). Platforms and lenders checking every listing or loan: Enterprise (100,000) or a data license.
Sample markets: Denver, Austin, Nashville, New Orleans, San Francisco, Los Angeles, New York City, Miami Beach, Honolulu, Scottsdale, Santa Monica, Lisbon, Barcelona, Amsterdam, Paris, Rome, London, Mexico City, Toronto and Sydney. They cover every status, from Active to Banned, plus state and national layers. A lookup anywhere else returns 403 with the list of sample markets.
Jurisdiction ids: us-colorado-denver, us-texas-austin, us-tennessee-nashville, us-louisiana-new-orleans, us-ca-san-francisco, us-ca-los-angeles, us-new-york-new-york-city, us-fl-miami-beach, us-hi-honolulu, us-az-scottsdale, us-ca-santa-monica, intl-pt-lisbon, intl-spain-barcelona, intl-netherlands-amsterdam, intl-france-paris, intl-italy-rome, intl-united-kingdom-london, intl-mexico-mexico-city, intl-canada-toronto, intl-australia-sydney
Lost your key? Sign up again with the same email for a new one. The old key stops working.
Authentication
Every request needs an API key. Send it in the X-API-Key header:
curl -H "X-API-Key: lf_live_YOUR_KEY" \
"https://lawfulstay.com/api/v1/resolve?city=Denver&state=CO&country=US"
Authorization: Bearer lf_live_YOUR_KEY works too. Keys start with lf_live_.
- Getting a key. Start with a free sandbox key. For every location, buy an API plan on the API pricing page, or see the data license for an enterprise account.
- Seeing your key. The full key is shown once, when it is created. After that your account page shows only its first few characters.
- Lost or leaked key. Use Revoke & Regenerate on your account page. The old key stops working at once.
- Keep keys on your server. Do not put them in a web page or mobile app, where anyone can read them.
Resolve a place
Returns the jurisdiction that governs a location, plus every layer of rules that applies to it. For one street address, use /address.
Parameters
| Name | Example | Notes |
|---|---|---|
city | Denver | City, town or village name. |
county | Summit | Optional. "County" is added for US addresses if you leave it off. |
state | CO | State, province or region. Full names and common abbreviations both work (CO, NSW, QC). |
country | US | Country name or code (US, USA, UK, CA, AU, PT and others). |
lat, lon | 39.74, -104.99 | Optional. Used where boundary maps are loaded. Send the address parts too: coordinates alone resolve only some places. |
id | us-colorado-denver | Optional. Fetch a jurisdiction directly by the id returned earlier. |
Send at least one of city, county, state, country, lat/lon or id. The more you send, the better the match.
Response
{
"ok": true,
"confidence": "medium",
"match_method": "admin-city",
"governing": {
"jurisdiction_id": "us-colorado-denver",
"level": "city",
"jurisdiction_label": "Denver, Colorado",
"status": "Restricted",
"status_label": "Restricted",
"status_meaning": "Allowed, with material limits.",
"license_required": "Yes, requires both a general business license and a short-term rental license ...",
"tax_rate": "14.75% (2.9% Colorado state sales tax, 1% RTD, 0.1% Scientific and Cultural Facilities District, 10.75% Denver lodger's tax).",
"rental_day_cap": "None for a primary residence ...",
"primary_residence_required": "Yes, STRs are restricted to the host's primary residence ...",
"last_checked": "2026-06-23",
"source_url": "https://www.denvergov.org/...",
"single_source_warning": false
},
"stack": [
{ "jurisdiction_id": "us-colorado-denver", "level": "city", ... },
{ "jurisdiction_id": "us-colorado-statewide", "level": "state", ... }
]
}
Fields
| Field | Meaning |
|---|---|
governing | The most specific jurisdiction found. Use this one first. |
stack | Every layer that applies, most specific first: city, county, state or province, national. Rules can come from several layers at once, for example a city license plus a state tax. |
confidence | high: matched by boundary map or id. medium: matched by name. parent-level: the place itself is not tracked, so you are getting the state or national rules above it. not-tracked: nothing matched. |
status | Active (allowed with registration), Restricted, Banned, Pending (proposed rules) or None (no specific rules on record). |
status_label, status_meaning | The status as our place pages show it, and what it means in one line: Active, Conditional, Restricted, Banned, No permit required (status None) or Not yet verified (status Pending). Changed on 2026-11-21: status_label used to read “Permitted with registration”, “Restricted - rules apply” and similar. status itself did not change, so match on status, not on the label. |
last_checked | The date we last verified the record against its source. |
source_url | The official page the record is based on, when we have one. Source links include a ref parameter: keep it when you show or store the link. |
single_source_warning | true when the status rests on a single unofficial source. Confirm it before relying on it. |
Other fields (fees, min_stay, occupancy_limit, penalties, zoning_restrictions and more) appear when the record has them. Values are plain text, written to be shown to people.
Look up one street address
Send one street address. We find it and return the jurisdiction whose short-term rental rules cover it, plus every layer above it. Inside city limits that is the city. Outside them it is the county, never the city in the mailing address. A named unincorporated community we track, such as Highlands Ranch, Colorado, comes before its county. US and international addresses both work.
Parameters
| Name | Example | Notes |
|---|---|---|
address | 100 Congress Ave, Austin, TX 78701 | Required. One street address with its city and state or country, up to 300 characters. A Zillow, Redfin or Realtor.com listing link also works. |
curl -H "X-API-Key: lf_live_YOUR_KEY" \
"https://lawfulstay.com/api/v1/address?address=100%20Congress%20Ave%2C%20Austin%2C%20TX%2078701"
Response
{
"ok": true,
"match": { "geocoder": "census", "match_level": "address", "in_city_limits": true },
"governing": { "jurisdiction_id": "us-texas-austin", "level": "city", "status": "Restricted", ... },
"stack": [ { "jurisdiction_id": "us-texas-austin", ... }, { "jurisdiction_id": "us-texas-statewide", ... } ],
"str_status": "Restricted",
"str_status_label": "Restricted",
"status_reason": "Rules of the City of Austin: Allowed, with material limits.",
"why": "This address is inside Austin city limits. Austin rules apply.",
"rule_scope": "Citywide rule",
"local_missing": false,
"source_url": "https://www.austintexas.gov/...",
"last_checked": "2026-11-02",
"facts": [ { "heading": "Permit needed", "text": "..." } ],
"property_note": "This shows the citywide rules only. We haven't checked this property's zoning, deed restrictions or HOA rules, ..."
}
Fields
| Field | Meaning |
|---|---|
match | geocoder: census (US Census), nominatim (OpenStreetMap) or text. match_level: address when the street was found, place when only the city or county named in the address was used. in_city_limits: US Census matches only. |
str_status | The governing jurisdiction's status: Active, Conditional, Restricted, Banned, None or Pending, as on /resolve. |
status_reason | Whose rules these are and what the status means. It describes the local rules, not the property. |
property_note | Always present. We don't check a property's zoning, deed restrictions or HOA rules (outside the US: building or condominium rules), and any of them can rule out short-term rentals where the local rules allow them. Show this note with the status. |
local_missing | true when we only have state or national rules for this address. |
source_url | The governing jurisdiction's official source. Keep the ref parameter. |
- One request is one call. We also cap new address lookups per account per day: 2,000 US addresses, 300 outside the US, 50 on a sandbox key. An address looked up in the last 30 days is answered from our cache and doesn't count toward the cap. Over the cap you get
429with"limit_reached": true, until 00:00 UTC. - Privacy. We don't return the address, and we keep it only in a 30-day geocoder cache, never in logs.
- Errors.
404when the address can't be found or the place isn't tracked.503withRetry-Afterwhen the geocoders are busy. A sandbox key answers only for addresses in the sample markets.
Short-term status and longer stays
A short summary of a tracked place: its short-term rental status in plain words, and its rules for longer stays. It takes the same city, state, country and id parameters as /resolve, and answers only for places we track (404 otherwise). It describes the local rules, not a particular property; for one address, use /address.
curl -H "X-API-Key: lf_live_YOUR_KEY" \
"https://lawfulstay.com/api/v1/viability?city=Denver&state=CO"
{
"ok": true,
"jurisdiction_id": "us-colorado-denver",
"viability": {
"str": { "status": "Restricted", "label": "Restricted",
"summary": "Rules of Denver, Colorado: Allowed, with material limits.",
"permit_required": "Yes, ...", "rental_day_cap": "...", "stays_under": "Stays under 30 nights", ... },
"mtr": { "status": "allowed", "label": "Longer stays",
"summary": "Stays of 30 nights or more fall outside the short-term rental rules here ...",
"threshold_days": 30, "exempt_from_str_permit": true }
},
"official_url": "https://www.denvergov.org/...",
"last_verified": "2026-06-23"
}
str.statusis the status used everywhere else:Active,Conditional,Restricted,Banned,NoneorPending.str.labelandstr.summaryuse the same words as/resolve.permit_required,rental_day_capandprimary_residence_requiredare the record's own text, ornullwhen the record doesn't say.mtruses our researched rules for longer stays. When we haven't settled them for a place,mtr.statusandexempt_from_str_permitarenulland the summary says so.- Changed on 2026-11-24. Labels such as “Viable for STR” and the summaries were replaced with the shared status words;
status“Unregulated” is nowNone; values the record doesn't hold arenullinstead of a filled-in default; andmtrno longer says every place exempts 30-day stays. Field names did not change.
Change feed
Every change we make to a jurisdiction record, oldest first. Use it to keep your own copy of our data current without re-pulling every record. Each change has an increasing id. Store the next_cursor from each response and send it back as since next time.
curl -H "X-API-Key: lf_live_YOUR_KEY" \
"https://lawfulstay.com/api/v1/changes?since=0&country=US&material=true"
{
"ok": true,
"changes": [
{
"id": 1042,
"detected_at": "2026-10-20T14:05:12+00:00",
"jurisdiction_id": "us-fl-miami-beach",
"jurisdiction_label": "Miami Beach, Florida",
"country": "United States",
"state": "Florida",
"change_type": "updated",
"material": true,
"changes": [
{ "field": "rental_day_cap", "old": "None", "new": "30 days", "material": true }
],
"source": "live",
"summary": null,
"effective_date": null,
"source_url": null
}
],
"next_cursor": 1042,
"has_more": false,
"latest_cursor": 1042,
"feed_started_at": "2026-10-20T09:00:00+00:00"
}
Parameters
| Name | Example | Notes |
|---|---|---|
since | 1042 | Return changes after this id. Start with 0. |
limit | 100 | Changes per page, 1 to 500. Default 100. When has_more is true, call again with the new cursor. |
material | true | Only changes to rules (see below). Leave it off to also get edits to notes. |
country | US | Name or code. Comma-separate several. |
state | CO,UT | State, province or region. Comma-separate several. |
jurisdiction_id | us-colorado-denver | One or more ids from /resolve, comma-separated. |
since_date | 2026-11-01 | Only changes detected on or after this date (UTC). |
What counts as a change
change_typeisadded(a new jurisdiction),updated,removed(usually merged into another record) orproposed(see below).- Material changes are to
status,license_required,tax_registration_required,tax_rate,fees,rental_day_cap,min_stay,occupancy_limit,primary_residence_required,zoning_restrictions,density_rules,insurance_required,platform_obligations,penaltiesoreffective_date. Edits tocompliance_notesandkey_notesare reported withmaterial: false. - A routine re-check that finds nothing new is not a change. Spacing-only edits are ignored.
Earlier history
Changes we logged before feed_started_at are in the feed too, starting June 2026. They come first, so since=0 returns them before anything newer. They have "source": "history" and differ from live changes in a few ways:
- They carry a plain-English
summary, and aneffective_dateandsource_urlwhen we have them. Live changes have these set tonull. - Their
detected_atis the date only, at midnight UTC. - Many record several fields at once, with
"field": "multiple". For the full current record, call/resolvewith itsid. proposedmarks a rule that was under discussion and not yet adopted. It is alwaysmaterial: false. Check/resolvefor its current state.- They are never sent to webhooks.
Each call to /changes counts toward your quota like any other call.
Webhooks
Rather than polling /changes, register a URL and we will POST new changes to it as soon as we publish them. Each POST holds up to 100 changes in the same shape as the feed.
Register a URL
curl -X POST -H "X-API-Key: lf_live_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/lawfulstay", "countries": ["US"], "states": ["CO", "UT"]}' \
https://lawfulstay.com/api/v1/webhooks
{
"ok": true,
"webhook": {
"id": 7,
"url": "https://example.com/lawfulstay",
"material_only": true,
"filters": { "countries": ["united states"], "states": ["co", "colorado", "ut", "utah"] },
"status": "active",
"secret": "whsec_..."
},
"note": "Save the secret now. It is not shown again."
}
| Field | Notes |
|---|---|
url | Required. Must be https:// on the public internet. |
material_only | Default true. Set false to also receive edits to notes. |
countries, states, jurisdiction_ids | Optional lists, up to 500 items each. Leave them all off to receive every change. |
description | Optional label for your own reference. |
Webhooks are included on Change feed and Growth (up to 5 active) and Enterprise (up to 25). Startup plans can use the change feed. The Change feed plan ($249 a month) also emails a daily list of what changed, with the official source for each change.
Manage webhooks
| Call | What it does |
|---|---|
GET /api/v1/webhooks | List your webhooks and their status. |
POST /api/v1/webhooks/test {"id": 7} | Send a ping now and return the status code your server answered with. |
GET /api/v1/webhooks/deliveries?id=7 | The last 50 deliveries, with attempts and errors. |
POST /api/v1/webhooks/delete {"id": 7} | Stop sending to this URL. |
What we send
POST /lawfulstay HTTP/1.1
Content-Type: application/json
User-Agent: LawfulStay-Webhooks/1.0
X-LawfulStay-Event: jurisdiction.changes
X-LawfulStay-Delivery: dlv_5531
X-LawfulStay-Signature: t=1792500000,v1=5f2c...
{ "id": "dlv_5531", "type": "jurisdiction.changes", "created_at": "...", "changes": [ ... ] }
Answer with any 2xx status within 10 seconds. Do slow work after you reply. We do not follow redirects.
Check the signature
The signature is an HMAC-SHA256 of the timestamp, a period, and the raw request body, keyed with your webhook secret. Reject requests that do not match, or whose timestamp is more than 5 minutes old.
import hashlib, hmac, time
def is_from_lawfulstay(secret, raw_body, header):
parts = dict(p.split("=", 1) for p in header.split(","))
signed = parts["t"].encode() + b"." + raw_body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
fresh = abs(time.time() - int(parts["t"])) < 300
return fresh and hmac.compare_digest(expected, parts["v1"])
Retries
If your server does not answer with a 2xx, we retry after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours. If every attempt fails, the webhook is disabled and its reason shows in GET /api/v1/webhooks. Nothing is lost: catch up from /changes using the highest change id you processed, then register the URL again.
The same change can arrive twice, for example when your reply times out after you saved it. Use the change id to skip ones you already have.
Deliveries do not count toward your quota. Calls to the webhook management endpoints do.
Limits and quotas
Each account has a per-minute limit and a monthly quota, set by its plan. Every call made with your keys counts toward your account's quota, including calls that return 404. Quotas reset on the 1st of each month (UTC).
Each response tells you where you stand:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Calls allowed per minute. |
X-Quota-Limit | Calls included this month. |
X-Quota-Remaining | Included calls left this month. |
Retry-After | Seconds to wait, sent when you hit the per-minute limit. |
When the monthly quota runs out, your account does one of two things. New accounts start on Stop.
- Stop: calls return 429 until the next month starts.
- Continue: calls keep working, and the extra calls are added to your next invoice: $90 per 1,000 on Startup and Change feed, $45 per 1,000 on Growth, and as agreed on Enterprise.
Your account page shows calls used this month. To change plans or the overage setting, contact us.
Errors
Errors return JSON with "ok": false and an error message.
| Code | Meaning | What to do |
|---|---|---|
400 | Missing or invalid parameters. | Send an address, a city, coordinates in range, or an id. |
401 | No key, or the key is wrong or revoked. | Check the X-API-Key header. |
403 | The account is suspended. | Contact us. |
404 | No tracked jurisdiction matches. | Check spelling, or add state and country. |
429 | Per-minute limit, monthly quota, or the daily address lookup cap reached. | Wait for Retry-After, the 1st of the month, or 00:00 UTC for the address cap. |
503 | The address geocoders are busy (/address only). | Retry after Retry-After seconds. |
500 | Something failed on our side. | Retry shortly. If it continues, contact us. |
Partner promotions
Referral partners can read the offers running for their users, and their monthly figures, from GET /api/partners/me/promotions and GET /api/partners/me/report, with a partner key LawfulStay issues (Authorization: Bearer). The answer always reflects the current offer, so a partner's site can show each promotion automatically. See Partner promotions in the guide, or paste a key at /partners/kit/.
Using the data
Records are researched from official government sources, and our monitor scans for rule changes several times a day. Each record carries its source and last-checked date. Regulations change, and this data is not legal advice. Before acting on a result, especially one with single_source_warning: true or parent-level confidence, confirm it with the official source.
When you show this data to your users, credit it as Source: LawfulStay (lawfulstay.com). See our methodology for how records are collected and verified.
Questions, higher limits or a field you need? Email support@lawfulstay.com.