# List road and utility works

> Announced road and utility work, with its days and streets. Billed as one records request a page. Filters: jurisdiction, region, country, kind, from, to, since.

`GET /v1/works`

Announced road and utility work, with its days and streets. Billed as one records request a page. Filters: jurisdiction, region, country, kind, from, to, since.

Authentication: `Authorization: Bearer <key>`, an `htd_test_` (sandbox) or `htd_live_` (live) key.

```bash
curl "https://data.heytownhall.com/v1/works" \
  -H "Authorization: Bearer $HTD_KEY"
```

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `jurisdiction` | query | no | A jurisdiction id. |
| `region` | query | no | A two-letter province or state code. |
| `country` | query | no | CA or US. |
| `kind` | query | no | road or utility. |
| `from` | query | no | On or after this date (YYYY-MM-DD). |
| `to` | query | no | On or before this date (YYYY-MM-DD). |
| `since` | query | no | Records read at or after this instant: what is new since your last read. |
| `limit` | query | no | Results a page, 1 to 100. Default 25. |
| `cursor` | query | no | next_cursor from the previous page. |

## Fields of each result

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `jurisdiction_id` | string |  |
| `country` | string or null |  |
| `region` | string or null |  |
| `title` | string or null |  |
| `kind` | string or null |  |
| `days` | array of string or null |  |
| `from_day` | string or null | YYYY-MM-DD. |
| `to_day` | string or null | YYYY-MM-DD. |
| `hours` | string or null |  |
| `streets` | array of string |  |
| `source_url` | string or null | The page, document, video or platform the record was read from. |
| `read_at` | string or null | When it was read. |

## Answers

| Status | Meaning |
| --- | --- |
| `200` | A page. |
| `400` | invalid_request: a parameter is missing or not valid; `param` names it. |
| `401` | unauthorized: no key, or not a valid one. |
| `402` | billing_required (a live key without a payment method, or paused for an unpaid invoice) or spend_cap_reached. |
| `429` | rate_limited: past the key's requests per minute. Retry-After says when to try again. |
| `503` | upstream_unavailable: the data could not be read. Not an empty answer; try again. |
