# Socrata Open Data Discovery API

> Search 100,000+ government open datasets across every Socrata portal: cities, states and agencies

- Vendor: `socrataopendatadiscoveryapi` · version 1.0 · category Government Data · tags socrata api, open data search api, government datasets api, open data catalog api, public data api, city open data api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/socrataopendatadiscoveryapi
- This document: https://apiclay.com/docs/socrataopendatadiscoveryapi.md
- OpenAPI 3.1: https://apiclay.com/api/socrataopendatadiscoveryapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `socrataopendatadiscoveryapi`
- Updated: 2026-11-18

## About

## Socrata Open Data Discovery API

The catalog behind Socrata, the platform that runs hundreds of government open-data portals (US cities, states and federal agencies, Canadian cities and more): search every dataset by keyword, portal domain, category or tag, with name, description, update time, columns, page views and the portal link; list a portal's categories and tags; and autocomplete dataset titles.

Data comes from **api.us.socrata.com** (https://api.us.socrata.com). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/search?q=building permits&amp;limit=10`, then read a dataset at `https:///resource/.json`.

### Routes

#### GET `/search` - Search
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | no | Keyword, e.g. `building permits`. |
| domains | query | string | no | Portal domain, e.g. `data.cityofchicago.org`; several comma-separated. |
| categories | query | string | no | Category, e.g. `Public Safety`. |
| tags | query | string | no | Tag. |
| only | query | string | no | `dataset`, `map`, `chart` or `file`. |
| order | query | string | no | `page_views_total`, `updatedAt` or `name`. |
| limit | query | number | no | Results per page (up to 100). |
| offset | query | number | no | Results to skip, for paging. |

Returns: `resultSetSize` and `results`: `resource` (`id`, `name`, `description`, `type`, `updatedAt`, `columns_name`, `page_views`), `classification`, `metadata.domain`, `permalink` and `link`.

#### GET `/domain-categories` - Domain categories
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| domains | query | string | yes | Portal domain. |

Returns: `results` of `domain_category` with dataset `count`.

#### GET `/domain-tags` - Domain tags
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| domains | query | string | no | Portal domain; all portals when left out. |
| limit | query | number | no | Tags to return. |

Returns: `results` of `domain_tag` with `count`.

#### GET `/autocomplete` - Autocomplete
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | yes | Start of a title, e.g. `crime`. |
| domains | query | string | no | Portal domain. |
| limit | query | number | no | Suggestions to return. |

Returns: `results` of `title` and `display_title` (with highlight).

### Caveats

- This is the catalog; rows are read on each portal (see the per-portal listings).
- Datasets keep the terms shown on their own portals.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by api.us.socrata.com.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /search — Search
- Gateway: `GET https://api.apiclay.com/v1/api/socrataopendatadiscoveryapi/search`
- Public query params: `q` (string), `domains` (string), `categories` (string), `tags` (string), `only` (string), `order` (string), `limit` (number), `offset` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /domain-categories — Domain categories
- Gateway: `GET https://api.apiclay.com/v1/api/socrataopendatadiscoveryapi/domain-categories`
- Public query params: `domains` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /domain-tags — Domain tags
- Gateway: `GET https://api.apiclay.com/v1/api/socrataopendatadiscoveryapi/domain-tags`
- Public query params: `domains` (string), `limit` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /autocomplete — Autocomplete
- Gateway: `GET https://api.apiclay.com/v1/api/socrataopendatadiscoveryapi/autocomplete`
- Public query params: `q` (string, required), `domains` (string), `limit` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/socrataopendatadiscoveryapi/search" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
