Socrata open-data portals · Search datasets
socrata-com/open-data/search_datasetsSearch public records with Socrata open-data portals · Search datasets from Alexandria through one Spiral API key. Start here for city, county or state open data (permits, inspections, 311, code violations, business licenses, crime, property) when the dataset id is unknown. Then describe_dataset for the full column list and row count, and query_dataset for rows. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
tags | list | — | Portal tags; with |
limit | number 1 to 100 | 10 | limit |
query | text | — | Free-text search over dataset names, descriptions, columns and tags, e.g. |
domain | text | — | Limit to one portal: hostname or URL (data.cityofchicago.org). Verified as a Socrata domain (US region first, then EU). Omit to search every public Socrata portal in |
offset | number 0 to 9999 | 0 | Result offset (next_offset of the previous page). The Discovery API stops at 10000 results. |
region | one of us, eu | us | Discovery API region for an all-portal search (us: US/Canada/most portals; eu: European portals such as opendata.rdw.nl). With |
category | text | — | Category filter. With |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "socrata-com/open-data/search_datasets",
"input": {
"tags": [
"<tags>"
]
}
}'Frequently asked questions
How much does Socrata open-data portals · Search datasets cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use Socrata open-data portals · Search datasets through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "socrata-com/open-data/search_datasets"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use Socrata open-data portals · Search datasets?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use Socrata open-data portals · Search datasets?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.