# Search legislation

Search all legislation (ordinances, resolutions, orders, appointments...). Newest first by final action or introduction date. Routine items (e.g. parking permits) are excluded unless include_routine=true.

`GET https://www.chicagopolitics.org/api/v1/legislation`

## Authorizations

| Header | Value |
| --- | --- |
| `Authorization` | `Bearer <key>`. [Get a key](https://www.chicagopolitics.org/account); see [authentication](https://www.chicagopolitics.org/developers/authentication). |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string |  | Words in the title or nickname, or a record number. |
| `type` | string |  | e.g. Ordinance, Resolution, Order, Appointment |
| `status` | string |  | Substring of the status, e.g. Final, Committee |
| `committee` | string |  | Committee slug |
| `sponsor` | integer |  | Member id of the lead sponsor |
| `key` | boolean |  | Only legislation the Clerk marks as key |
| `include_routine` | boolean |  |  |
| `introduced_from` | string (date) |  |  |
| `introduced_to` | string (date) |  |  |
| `sort` | string |  | One of: `newest`, `oldest`. Default `newest`. |
| `limit` | integer |  | Default `50`. |
| `cursor` | string |  | From meta.nextCursor of the previous page. |

## Response

200 Legislation: a list in `data`, with `meta` and `links` (see [pagination](https://www.chicagopolitics.org/developers/requests)).

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `record` | string |  |
| `title` | string |  |
| `nickname` | string \| null |  |
| `type` | string |  |
| `category` | string \| null |  |
| `status` | string \| null |  |
| `introduced` | string \| null |  |
| `finalAction` | string \| null |  |
| `committee` | string \| null |  |
| `sponsor` | object |  |
| `key` | boolean |  |
| `routine` | boolean |  |
| `links` | object |  |

## Example request

```bash
curl "https://www.chicagopolitics.org/api/v1/legislation" \
  -H "Authorization: Bearer $CHICAGO_POLITICS_KEY"
```

Errors: `400`, `401`, `429` (see [errors](https://www.chicagopolitics.org/developers/errors)).

---
Source: https://www.chicagopolitics.org/developers/api/search-legislation · Chicago Politics, an independent, nonpartisan tracker of the Chicago City Council. Guide for agents: https://www.chicagopolitics.org/llms.txt
