Discover and download datasets from data.gov using the CKAN API

domain: data.gov · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Search for datasets by keyword via GET https://catalog.data.gov/api/3/action/package_search?q={keyword}&rows=10 — no API key is required for read operations
  2. Inspect the 'results' array in the response, reviewing each package's 'title', 'notes', 'organization', and 'metadata_modified' fields to identify the most current relevant dataset
  3. Retrieve full metadata for a specific dataset via GET https://catalog.data.gov/api/3/action/package_show?id={dataset_id}
  4. Locate downloadable resource URLs in the 'resources' array of the package metadata, filtering by 'format' (e.g., 'CSV', 'JSON', 'XML') to select the appropriate file
  5. Download the resource directly from its 'url' field; large files may be hosted on agency-specific servers rather than data.gov itself

Known gotchas

Related routes

Search and harvest dataset metadata from data.gov using the CKAN API
catalog.data.gov · 6 steps · unrated
Query the data.gov CKAN API to discover and access US federal open datasets
catalog.data.gov · 6 steps · unrated
Search and retrieve federal open-dataset metadata using the Data.gov CKAN API
catalog.data.gov · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans