API Documentation

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.

SandboxPaid plans
20 sample markets (below)Every tracked location
500 calls a month, 10 a minuteFrom 1,000 a month
/resolve, /address, /viability, /changes for the sample marketsAll endpoints, all locations
1 webhook, sample markets onlyUp 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_.

Resolve a place

GEThttps://lawfulstay.com/api/v1/resolve

Returns the jurisdiction that governs a location, plus every layer of rules that applies to it. For one street address, use /address.

Parameters

NameExampleNotes
cityDenverCity, town or village name.
countySummitOptional. "County" is added for US addresses if you leave it off.
stateCOState, province or region. Full names and common abbreviations both work (CO, NSW, QC).
countryUSCountry name or code (US, USA, UK, CA, AU, PT and others).
lat, lon39.74, -104.99Optional. Used where boundary maps are loaded. Send the address parts too: coordinates alone resolve only some places.
idus-colorado-denverOptional. 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

FieldMeaning
governingThe most specific jurisdiction found. Use this one first.
stackEvery 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.
confidencehigh: 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.
statusActive (allowed with registration), Restricted, Banned, Pending (proposed rules) or None (no specific rules on record).
status_label, status_meaningThe 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_checkedThe date we last verified the record against its source.
source_urlThe 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_warningtrue 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

GEThttps://lawfulstay.com/api/v1/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

NameExampleNotes
address100 Congress Ave, Austin, TX 78701Required. 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

FieldMeaning
matchgeocoder: 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_statusThe governing jurisdiction's status: Active, Conditional, Restricted, Banned, None or Pending, as on /resolve.
status_reasonWhose rules these are and what the status means. It describes the local rules, not the property.
property_noteAlways 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_missingtrue when we only have state or national rules for this address.
source_urlThe governing jurisdiction's official source. Keep the ref parameter.

Short-term status and longer stays

GEThttps://lawfulstay.com/api/v1/viability

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"
}

Change feed

GEThttps://lawfulstay.com/api/v1/changes

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

NameExampleNotes
since1042Return changes after this id. Start with 0.
limit100Changes per page, 1 to 500. Default 100. When has_more is true, call again with the new cursor.
materialtrueOnly changes to rules (see below). Leave it off to also get edits to notes.
countryUSName or code. Comma-separate several.
stateCO,UTState, province or region. Comma-separate several.
jurisdiction_idus-colorado-denverOne or more ids from /resolve, comma-separated.
since_date2026-11-01Only changes detected on or after this date (UTC).

What counts as a change

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:

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

POSThttps://lawfulstay.com/api/v1/webhooks
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."
}
FieldNotes
urlRequired. Must be https:// on the public internet.
material_onlyDefault true. Set false to also receive edits to notes.
countries, states, jurisdiction_idsOptional lists, up to 500 items each. Leave them all off to receive every change.
descriptionOptional 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

CallWhat it does
GET /api/v1/webhooksList 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=7The 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:

HeaderMeaning
X-RateLimit-LimitCalls allowed per minute.
X-Quota-LimitCalls included this month.
X-Quota-RemainingIncluded calls left this month.
Retry-AfterSeconds 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.

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.

CodeMeaningWhat to do
400Missing or invalid parameters.Send an address, a city, coordinates in range, or an id.
401No key, or the key is wrong or revoked.Check the X-API-Key header.
403The account is suspended.Contact us.
404No tracked jurisdiction matches.Check spelling, or add state and country.
429Per-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.
503The address geocoders are busy (/address only).Retry after Retry-After seconds.
500Something 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.