Skip to content
OSINTtools.io

Data.gov API

The US government's open data catalogue, listing federal, state and local datasets with a documented catalogue API.

Base URL
https://catalog.data.gov/api/3/action
Sign-in
No key
Format
REST
Endpoints
5

Compiled by OSINTtools.io editors from docs.ckan.org · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

Data.gov's catalog runs on CKAN and exposes a JSON API to the dataset metadata (not the data inside the datasets). An investigator can use it to find US government datasets by keyword or tag, and to read a dataset's description and resource links.

Calls go to https://catalog.data.gov/api/3/action/{name}. CKAN's Action API accepts JSON by POST; read-only functions also accept GET with URL parameters. Every response is a JSON object with help, success and result, and error when success is false. The API aims to return HTTP 200 even on errors, so check success.

Full documentation is CKAN's own Action API reference. Functions that need authorisation take an API token in the Authorization header. Data.gov's page does not state rate limits.

Quick start

  1. No key needed

    The Data.gov API answers without an account or key.

  2. Make your first request

    Search dataset metadata with a Solr query and filters.. Replace the example values and run it in a terminal, or use Try it on the endpoint.

    curl 'https://catalog.data.gov/api/3/action/package_search'
  3. Read the response

    A 200 response looks like this.

    {
      "help": "https://catalog.data.gov/api/3/action/help_show?name=package_search",
      "success": true,
      "result": {
        "count": 1,
        "results": [
          {
            "name": "example-dataset"
          }
        ],
        "search_facets": {}
      }
    }

Authentication

No key or account: every endpoint answers without one.

Functions that require authorisation take a CKAN API token in the Authorization header; the searches below are plain reads.

Rate limits and pricing

Not stated in the docs

Errors

StatusMeaning
400Major formatting problem in the request
409Major formatting problem in the request
500Server error

Datasets

  • Passive: the target is not contacted

Returns a dictionary with the dataset's metadata and its resources.

Query parameters

idstringrequired

The id or name of the dataset

Example: example-dataset
Response fields · 2Show

successboolean

Whether the call worked

resultobject

The dataset's metadata and resources

curl 'https://catalog.data.gov/api/3/action/package_show?id=example-dataset'
No key needed
Response
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=package_show",
  "success": true,
  "result": {
    "name": "example-dataset"
  }
}
  • Passive: the target is not contacted

Returns a dictionary with the resource's metadata.

Query parameters

idstringrequired

The id of the resource

Example: 00000000-0000-0000-0000-000000000000
Response fields · 2Show

successboolean

Whether the call worked

resultobject

The resource's metadata

curl 'https://catalog.data.gov/api/3/action/resource_show?id=00000000-0000-0000-0000-000000000000'
No key needed
Response
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=resource_show",
  "success": true,
  "result": {
    "id": "00000000-0000-0000-0000-000000000000"
  }
}

Organizations and tags

  • Passive: the target is not contacted

Returns organization names by default. With all_fields, returns group dictionaries with a package_count each.

Query parameters

sortstring

Field and order: name, package_count or title

Example: package_count descDefault: title asc
limitinteger

Maximum organizations to return

Example: 25
offsetinteger

Result offset

Example: 0
all_fieldsboolean

Return full records instead of names

Example: true
Response fields · 2Show

successboolean

Whether the call worked

result[]string

Organization names (records with all_fields)

curl 'https://catalog.data.gov/api/3/action/organization_list'
No key needed
Response
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=organization_list",
  "success": true,
  "result": [
    "example-agency"
  ]
}
  • Passive: the target is not contacted

Returns tag names; with all_fields returns full tag dictionaries.

Query parameters

querystring

Only tags whose names contain this string

Example: water
all_fieldsboolean

Return full tag dictionaries

Example: false
Response fields · 2Show

successboolean

Whether the call worked

result[]string

Tag names

curl 'https://catalog.data.gov/api/3/action/tag_list'
No key needed
Response
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=tag_list",
  "success": true,
  "result": [
    "water"
  ]
}