Skip to Content
Hey Town Hall Data docs
Jurisdictions

API reference · Jurisdictions

List jurisdictions

View as Markdown
GET
/v1/jurisdictions

Every public body held: municipalities, regional districts and counties, school districts, First Nations, special districts. Each with its kind, parent, population, time zone, register ids and whether its boundary is held. Billed as one records request a page. Filters: region, country, kind, parent, name.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Query Parameters

region?string

A two-letter province or state code.

country?string

CA or US.

kind?string

municipality, regional_district, school_district, first_nation, improvement_district, library, …

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

The regional district or county a jurisdiction sits in.

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

Words in the name.

Length2 <= length <= 100
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/jurisdictions'
Example Response
{  "query": {    "property1": null,    "property2": null  },  "as_of": "string",  "results": [    {      "id": "string",      "kind": "string",      "name": "string",      "name_fr": "string",      "country": "string",      "region": "string",      "parent_id": "string",      "population": 0,      "time_zone": "string",      "legal_form": "string",      "website": "string",      "register_ids": {        "property1": [          "string"        ],        "property2": [          "string"        ]      },      "has_boundary": true,      "ingest_profile": "string",      "dissolved_at": "string",      "source_url": "string",      "read_at": "string"    }  ],  "next_cursor": "string",  "environment": "sandbox"}