Oakrule

API

Version 1 · OpenAPI · API terms · Terms · Acceptable use

Rental housing law at an address and a date, as JSON. Every rule carries its citation and a link to the official source. Information, not legal advice.

Authentication

Create a key under Account › API keys (needs the API plan). Send it on every request:

Authorization: Bearer ce_<id>_<secret>

We store only a hash of the secret, so we can't show it again. Lost it? Revoke the key and create a new one.

Endpoints

GET /v1/rules

Rules at an address

curl -G https://oakrule.com/v1/rules \
  -H "Authorization: Bearer $CE_KEY" \
  --data-urlencode "address=3918 Fulton St, San Francisco, CA" \
  -d date=2026-10-01 -d year_built=1923 -d units=6

GET /v1/rules

Rules by state and city

curl -G https://oakrule.com/v1/rules -H "Authorization: Bearer $CE_KEY" \
  -d state=NJ -d city=Hoboken -d units=4

POST /v1/rent-increase/check

Check a rent increase

curl https://oakrule.com/v1/rent-increase/check \
  -H "Authorization: Bearer $CE_KEY" -H "Content-Type: application/json" \
  -d '{"address": "6238 De Longpre Ave, Los Angeles, CA", "facts": {"year_built": 1964, "units": 12},
       "current_rent": 2000, "new_rent": 2080, "effective_date": "2027-01-01", "notice_date": "2026-11-15"}'

GET /v1/portfolio/changes

Upcoming changes for your buildings

curl -G https://oakrule.com/v1/portfolio/changes -H "Authorization: Bearer $CE_KEY" -d days=365

GET /v1/usage

Your usage this month

curl https://oakrule.com/v1/usage -H "Authorization: Bearer $CE_KEY"

GET /v1/dataset/latest/rules.csv

Download the rules dataset

curl -OJ https://oakrule.com/v1/dataset/latest/rules.csv -H "Authorization: Bearer $CE_KEY"

Pricing and limits

Errors

Errors are JSON: {"error": {"type": "...", "message": "..."}}. 401 bad or revoked key, 402 the API plan is off, 404 address not found, 422 invalid input or an area we don't cover yet, 429 rate limit, 503 the US Census geocoder did not answer.

Rules dataset

Every reviewed rule as one file, released monthly: rules.csv, rules.json, a JSON schema, a changelog against the previous release and SHA256SUMS. List releases with GET /v1/dataset; latest works in place of a month. Included with the API plan; downloads don't count as calls. Massachusetts is free without a key: /data.

Coverage

California, New Jersey and Massachusetts state law, plus local rules of the cities we list in the app. Outside a covered city you get state law and a note that local rules may add protections.

OpenAPI

Machine-readable description: /v1/openapi.json

Not legal advice. We quote the law from official sources and explain it in plain words. We can't tell you what to do in your situation. For that, talk to a legal aid office, your city's rent office or a lawyer.