Access the data.gov CKAN API at https://catalog.data.gov/api/3/ without authentication for most read operations; the API follows the CKAN API v3 specification
Search for datasets using POST /action/package_search with a JSON body containing the q (full-text search query), fq (filter query using Solr syntax, e.g., fq=organization:irs-gov), rows, and start parameters for pagination
Parse the result.results array in the response; each dataset record contains the name (URL slug), title, organization, resources (list of files with URL, format, and description), and tags fields
Retrieve a specific dataset's full metadata using GET /action/package_show?id={dataset-name-or-id}; this returns all resource URLs, update frequency, license, publisher, and spatial/temporal coverage if available
Download a dataset resource by following the URL in the resources[].url field; resources may be CSV, JSON, XML, Excel, shapefile, or API endpoints — check the format field before assuming the download format
For datasets that provide an API resource rather than a file download, the resource URL may point to a Socrata, ArcGIS, or agency-specific API; use the resource description and format fields to identify the downstream API and consult its own documentation
Known gotchas
Data.gov aggregates metadata from agency data portals but does not host all datasets directly; many resource URLs redirect to agency-specific portals or APIs that may have their own authentication or access requirements separate from data.gov
Dataset freshness varies widely; the metadata_modified date on a dataset reflects the last catalog update, not necessarily a new data delivery — check the resource-level last_modified field and the dataset's stated update frequency before relying on the data as current
The CKAN search API uses Solr under the hood; complex filter queries using fq must follow Solr query syntax, and some Solr operators available in standard CKAN may not be enabled on data.gov's specific CKAN configuration
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp