Skip to Content
Hey Town Hall Data docs
Search

API reference · Search

Search the records

View as Markdown
GET
/v1/search

One full-text search (English) across agenda items, motions, meeting transcripts, document and bylaw titles, and posts, newest first. Billed as one search request a page.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Query Parameters

q*string

Words to find. Quotes keep a phrase; a leading minus leaves a word out (Postgres web search syntax).

in?string

What to search, comma-separated: agenda_items, motions, transcripts, documents, bylaws, posts. Default all within a jurisdiction; without one, transcripts, bylaws, posts (agenda items, motions and documents need a jurisdiction for now).

jurisdiction?string

A jurisdiction id.

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

A two-letter province or state code.

from?string

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

to?string

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

limit?integer

Results a page, 1 to 100. Default 25.

cursor?string

next_cursor from the previous page.

Response Body

A page of hits.

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/search?q=string'
Example Response
{  "query": {    "property1": null,    "property2": null  },  "as_of": "string",  "results": [    {      "family": "agenda_item",      "id": "string",      "jurisdiction_id": "string",      "meeting_id": "string",      "date": "string",      "title": "string",      "snippet": "string",      "source_url": "string",      "read_at": "string"    }  ],  "next_cursor": "string",  "environment": "sandbox"}