Spiral gives your agent every tool with one account. Browse the tools →

AlexandriaPublic RecordsAvailable now

Socrata open-data portals · Search datasets

socrata-com/open-data/search_datasets

Search 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

FieldKindDefaultDescription
tagslist—

Portal tags; with domain these are the portal's own tags (e.g. permits).

limitnumber
1 to 100
10

limit

querytext—

Free-text search over dataset names, descriptions, columns and tags, e.g. building permits, restaurant inspections, 311.

domaintext—

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 region.

offsetnumber
0 to 9999
0

Result offset (next_offset of the previous page). The Discovery API stops at 10000 results.

regionone 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 domain it is only the first region tried.

categorytext—

Category filter. With domain: the portal's own category name (e.g. Buildings). Without: Socrata's global lowercase categories (e.g. public safety).

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.