# Sources

> Documentation index: [llms.txt](https://westkite.com/docs/llms.txt). Every page is also at its URL plus `.md`.

List every data source West Kite serves, holds or has left out, with its publisher, how we get it, how often we check it, the publisher's terms and when a release last loaded it. Sources is free and needs no key.

```endpoint
GET /v1/sources
GET /v1/sources/{id}
```

## Parameters

| Name | Type | Description |
|---|---|---|
| `status` | string | `served`, `registered`, `held` or `not-covered`. |
| `state` | string | A two-letter code. Nationwide sources always match. |
| `dataset` | string | A dataset id from the answer's `datasets` list, such as `permits`. |
| `licence` | string | `open`, `attribution`, `unclear`, `permission`, `licensed`, `held`, `paid` or `not-recorded`. |
| `q` | string | Text in the id, name, publisher or what the source provides. |
| `limit` | integer | Sources per page, 1 to 1,000. Default 100. |
| `offset` | integer | Skip this many matches. Use `next_offset` from the previous page. |
| `format` | string | `csv` returns every match as one CSV file instead of a page. |

Served sources come first, then registered, held and not covered.

## Request

```curl
curl "https://api.westkite.com/v1/sources?state=FL&status=served&limit=20"
```

```typescript
const res = await fetch("https://api.westkite.com/v1/sources?dataset=permits");
const { data } = await res.json();
```

```python
import requests

res = requests.get("https://api.westkite.com/v1/sources", params={"licence": "unclear", "limit": 1000})
sources = res.json()["data"]["sources"]
```

## Response

Each source has:

- `id`: the id property records cite.
- `name`, `publisher`, `url`.
- `provides` and `datasets`.
- `coverage`, with `label`, `states` and `counties`.
- `method` and `cadence`.
- `licence`, with `status`, `label`, `text`, `terms_url`, `attribution`, `redistribution` and `rights_record_on_file`.
- `status` and `reason`.
- `last_load`, with `release`, `loaded_at` and `records`.
- `last_check`, with `checked_at` and `outcome`.
- `last_run`: the newest run report from the ingestion line. It has `run` (`build` or `load`), `verdict` (`pass` or `hold`), `failed_checks`, `release`, `rows` and `last_success_at`, the last passing run that changed something.

A field we haven't recorded is `null`, never zero. `counts` totals every match by status and by terms.

A commercial provider's source is named only as "Commercial data provider".
