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.

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 an address

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

Returns the jurisdiction that governs a location, plus every layer of rules that applies to it.

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 — rules apply",
    "license_required": "Yes — requires both a general business license and a short-term rental license ...",
    "tax_rate": "Denver Lodger's Tax of 10.75% on taxable lodging ...",
    "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).
last_checkedThe date we last verified the record against its source.
source_urlThe official page the record is based on, when we have one.
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.

Short-term vs. mid-term viability

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

A plain-language verdict on whether nightly rentals (under 30 days) and 30+ day stays are workable in a city. It takes the same city, state, country and id parameters as /resolve, and answers only for cities we track (404 otherwise).

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": "Viable w/ Restrictions (< 30 Days)", ... },
    "mtr": { "status": "Active", "label": "Viable for 30+ Day Stays (MTR)", ... }
  },
  "official_url": "https://www.denvergov.org/...",
  "last_verified": "2026-06-23"
}

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, 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 or monthly quota reached.Wait for Retry-After, or for the 1st of the month.
500Something failed on our side.Retry shortly. If it continues, contact us.

Using the data

Records are researched from official government sources and re-checked twice daily. 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.