# Search documents

Semantic search over archived City documents and meeting transcripts. Best passage per document, by meaning (not just keywords).

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

## 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 | yes | What to look for |
| `kind` | string |  | One of: `matter`, `meeting`, `money`. |
| `doc_type` | string |  |  |
| `year` | integer |  |  |
| `limit` | integer |  | Default `10`. |

## Response

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

| Field | Type | Description |
| --- | --- | --- |
| `title` | string |  |
| `record` | string \| null |  |
| `kind` | string |  |
| `documentType` | string \| null |  |
| `date` | string \| null |  |
| `score` | number |  |
| `passage` | string |  |
| `document` | string |  |
| `links` | object |  |

## Example request

```bash
curl "https://www.chicagopolitics.org/api/v1/search?q=..." \
  -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-documents · Chicago Politics, an independent, nonpartisan tracker of the Chicago City Council. Guide for agents: https://www.chicagopolitics.org/llms.txt
