Skip to Content
Hey Town Hall Data docs
Documents

API reference · Documents

List bylaws

View as Markdown
GET
/v1/bylaws

Bylaws by number, title, kind and adoption date. Billed as one records request a page. Filters: jurisdiction, region, country, kind, subject, from, to, since.

Authorization

bearerAuth
headerAuthorizationBearer <token>

htd_test_ (sandbox, free, fictional towns) or htd_live_ (live, billed) key.

Query Parameters

jurisdiction?string

A jurisdiction id.

Match^[a-z0-9][a-z0-9-]{0,63}$
region?string

A two-letter province or state code.

country?string

CA or US.

kind?string

bylaw, amendment, consolidated, repeal.

Match^[a-z][a-z0-9_]{0,60}$
subject?string

A bylaw's core subject, as the bylaw-subject model read its text. fees_charges is a body's fees and charges bylaw.

Value in"zoning""building""animal_control""fire_burning""noise""trees""business_licence""fees_charges""other"
from?string

On or after this date (YYYY-MM-DD).

to?string

On or before this date (YYYY-MM-DD).

since?string

Records read at or after this instant: what is new since your last read.

limit?integer

Results a page, 1 to 100. Default 25.

cursor?string

next_cursor from the previous page.

Response Body

A page.

application/json
  1. response
query*

The filters as the API read them, defaults included.

as_of*string

ISO 8601 instant, UTC.

results*array<>
next_cursor*|

Pass as cursor for the next page; null on the last.

environment*string

sandbox answers carry fictional towns.

Value in"sandbox""live"
Example Request
curl -X GET 'https://data.heytownhall.com/v1/bylaws'
Example Response
{  "query": {    "property1": null,    "property2": null  },  "as_of": "string",  "results": [    {      "id": "string",      "jurisdiction_id": "string",      "country": "string",      "region": "string",      "number": "string",      "title": "string",      "kind": "string",      "adopted_on": "string",      "text_available": true,      "subject": "string",      "first_seen_at": "string",      "source_url": "string",      "read_at": "string"    }  ],  "next_cursor": "string",  "environment": "sandbox"}