Socrata Discovery API
Free Socrata Discovery API with no key: search dataset metadata across thousands of US government open data portals in one query, with page-view popularity built in. Tested example.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Socrata Discovery API?
The Socrata Discovery API is a free, key-free search endpoint that indexes dataset metadata from every public Socrata portal — thousands of US federal, state and city domains — so one query can find datasets across all of them at once, ranked with real page-view counts.
Individual portal APIs answer "what does Colorado publish?". This one answers "who publishes anything about restaurant inspections?", which is a fundamentally different and much harder question. It sits above the whole Socrata estate and lets you filter by `domains`, `categories`, `tags` or full text, then returns each match with the domain it came from and the four-by-four ID you need to query the data itself.
The genuinely unusual field is `page_views`, which reports last week, last month and all-time view counts plus logarithmic variants of each. Socrata uses the log values for its own relevance ranking, and you can too — raw totals are dominated by a handful of famous datasets, whereas the log scale surfaces things that are quietly popular in their own region. Note that `type` distinguishes datasets from stories, charts, maps and filtered views, and a `story` has no tabular endpoint behind it.
Quick facts
- Base URL
https://api.us.socrata.com/api/catalog/v1- Authentication
- No key required. A free Socrata app token raises rate limits for heavy crawling.
- Rate limit
- Anonymous per-IP throttling. Cache aggressively when crawling many domains.
- Pricing
- Free. The catalogue metadata is open; individual datasets keep their publisher's terms.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Socrata Discovery API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Search one portal's catalogue through the Discovery API
GET https://api.us.socrata.com/api/catalog/v1?domains=data.colorado.gov&limit=1
curl 'https://api.us.socrata.com/api/catalog/v1?domains=data.colorado.gov&limit=1'const res = await fetch("https://api.us.socrata.com/api/catalog/v1?domains=data.colorado.gov&limit=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.us.socrata.com/api/catalog/v1?domains=data.colorado.gov&limit=1", timeout=20)
res.raise_for_status()
print(res.json()){
"results": [
{
"resource": {
"name": "Transparency Online Project (TOPS) - State Government Revenue and Expenditures in Colorado",
"id": "fjyf-bdat",
"resource_name": null,
"parent_fxf": [],
"description": "Revenue and Expenditures for Colorado State Governmental departments provided by the Department of Personnel & Administration and the Office of the State Controller. Documentation can be found in the long description of the dataset.",
"attribution": "DPA - Department of Personnel and Administration",
"attribution_link": "https://dpa.colorado.gov/",
"contact_email": null,
"type": "story",
"updatedAt": "2022-10-28T21:00:51.580Z",
"createdAt": "2022-10-27T21:53:17.000Z",
"metadata_updated_at": "2026-02-19T01:11:44.000Z",
"data_updated_at": "2022-10-28T21:00:51.580Z",
"page_views": {
"page_views_last_week": 3636,
"page_views_last_month": 15972,
"page_views_total": 773277,
"page_views_last_week_log": 11.828533210455618,
"page_views_last_month_log": 13.963347680316964,
"page_views_total_log": 19.56062764294506
},
"columns_name": [],
"columns_field_name": [],
"columns_datatype": [],
"columns_description": [],
"columns_format": [],
"download_count": 0,
"provenance": "official",
"lens_view_type": "story",
"lens_display_type": "story",
"locked": false,
"backend": "not_a_dataset",
"blob_mime_type"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | query | Optional | Full-text search across titles, descriptions and column names. restaurant inspections |
domains | query | Optional | Comma-separated portal domains to restrict the search to. data.colorado.gov,data.cityofnewyork.us |
categories | query | Optional | Filter by portal category. Public Safety |
tags | query | Optional | Filter by tag. budget |
only | query | Optional | Restrict asset type — `datasets`, `charts`, `maps`, `stories`, `filters`. datasets |
limit | query | Optional | Results per page, up to 100. 1 |
offset | query | Optional | Pagination offset. 100 |
Response fields
results[].resource.idstring- Four-by-four asset ID. Combine with the domain to build the data URL.
results[].resource.name / descriptionstring- Title and summary of the asset.
results[].resource.typestring- `dataset`, `story`, `chart`, `map` or `filter`. Only datasets have a queryable `/resource` endpoint.
results[].resource.attributionstring- Publishing body, with `attribution_link` pointing at its site.
results[].resource.page_viewsobject- View counts for last week, last month and all time, plus `_log` variants used for ranking.
results[].resource.updatedAt / data_updated_atstring- Asset and underlying-data update times, which frequently differ.
results[].resource.columns_name / columns_field_namearray- Column labels and machine names. Empty for non-tabular assets.
resultSetSizeinteger- Total matches across all indexed domains, independent of your page size.
What you can build with the Socrata Discovery API
- Find every US city publishing a given kind of dataset
- Build a cross-portal open data search engine
- Rank datasets by real popularity rather than recency
- Discover which agencies publish on a topic before writing a scraper
- Audit how consistently a dataset type is published across jurisdictions
Common errors and how to fix them
400
An unrecognised filter parameter or a malformed `domains` list.
Fix: Use bare hostnames with no scheme or trailing slash, comma-separated with no spaces.
Empty results with a broad query
Filters combine with AND.
Fix: Drop `categories` or `tags` first — a category that exists on one portal may not exist on another.
429
Anonymous throttling while crawling.
Fix: Add delays and cache. A free app token raises the ceiling.
Asset has no data endpoint
The result is a story, chart or map.
Fix: Filter with `only=datasets` when you need something you can actually query.
Socrata Discovery API — frequently asked questions
What does the Socrata Discovery API cover?
Public asset metadata from every Socrata portal that opts into discovery — thousands of US federal, state, county and city domains. It indexes metadata only; the rows themselves stay on each portal.
Do I need an API key?
No. Anonymous queries work fine. A free app token exists only to lift rate limits, which matters if you are crawling many domains rather than running occasional searches.
What are the page_views _log fields for?
Socrata ranks relevance on the logarithm of view counts, because raw totals let a few famous datasets swamp everything else. Using the log values gives you the same balanced ordering the portals themselves use.
How do I fetch the actual data after finding a dataset?
Combine the domain with the four-by-four ID: `https://{domain}/resource/{id}.json`, then add SoQL parameters such as `$limit` and `$where`. Only assets with `type: dataset` have that endpoint.
Tools that pair with this API
JSON Path Finder
Evaluate a dot/bracket path against your JSON and list every leaf path for discovery. Free online JSON path finder that runs 100% in your browser.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Socrata Discovery API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.