# Data.gov API reference

> 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…

Source: https://osinttools.io/apis/data-gov/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/data-gov/

- Base URL: https://catalog.data.gov/api/3/action
- Authentication: No key needed. Functions that require authorisation take a CKAN API token in the Authorization header; the searches below are plain reads.
- Rate limits: Not stated in the docs
- Vendor docs: https://docs.ckan.org/en/latest/api/

## Overview

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.

## Errors

| Status | Meaning |
| --- | --- |
| 400 | Major formatting problem in the request |
| 409 | Major formatting problem in the request |
| 500 | Server error |

## Datasets

### Search dataset metadata with a Solr query and filters.

`GET /package_search`

- Footprint: passive (the target is not contacted)

Returns matching datasets. `count` is the total number of matches, not the number returned. Rows default to 10, with an upper limit of 1000 unless the site changed it.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | no | Solr query Example: water quality |
| `fq` | query | string | no | Filter query, such as tags:economy Example: tags:economy |
| `rows` | query | integer | no | Maximum results to return Example: 10 |
| `start` | query | integer | no | Result offset Example: 0 |
| `sort` | query | string | no | Comma-separated field and order Example: metadata_modified desc |

Response fields:

- `success` (boolean): Whether the call worked
- `result.count` (integer): Total matches
- `result.results[]` (object): Matching dataset records
- `result.search_facets` (object): Facet counts when requested

```bash
curl 'https://catalog.data.gov/api/3/action/package_search'
```

Example response (200):

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

### Get one dataset's metadata and resources by id or name.

`GET /package_show`

- Footprint: passive (the target is not contacted)

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

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | string | yes | The id or name of the dataset Example: example-dataset |

Response fields:

- `success` (boolean): Whether the call worked
- `result` (object): The dataset's metadata and resources

```bash
curl 'https://catalog.data.gov/api/3/action/package_show?id=example-dataset'
```

Example response (200):

```json
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=package_show",
  "success": true,
  "result": {
    "name": "example-dataset"
  }
}
```

### Get one resource's metadata by id.

`GET /resource_show`

- Footprint: passive (the target is not contacted)

Returns a dictionary with the resource's metadata.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | string | yes | The id of the resource Example: 00000000-0000-0000-0000-000000000000 |

Response fields:

- `success` (boolean): Whether the call worked
- `result` (object): The resource's metadata

```bash
curl 'https://catalog.data.gov/api/3/action/resource_show?id=00000000-0000-0000-0000-000000000000'
```

Example response (200):

```json
{
  "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

### List organization names, or full records with all_fields.

`GET /organization_list`

- Footprint: passive (the target is not contacted)

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

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sort` | query | string | no | Field and order: name, package_count or title Example: package_count desc |
| `limit` | query | integer | no | Maximum organizations to return Example: 25 |
| `offset` | query | integer | no | Result offset Example: 0 |
| `all_fields` | query | boolean | no | Return full records instead of names Example: true |

Response fields:

- `success` (boolean): Whether the call worked
- `result[]` (string): Organization names (records with all_fields)

```bash
curl 'https://catalog.data.gov/api/3/action/organization_list'
```

Example response (200):

```json
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=organization_list",
  "success": true,
  "result": [
    "example-agency"
  ]
}
```

### List tag names, optionally filtered by a string.

`GET /tag_list`

- Footprint: passive (the target is not contacted)

Returns tag names; with all_fields returns full tag dictionaries.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | string | no | Only tags whose names contain this string Example: water |
| `all_fields` | query | boolean | no | Return full tag dictionaries Example: false |

Response fields:

- `success` (boolean): Whether the call worked
- `result[]` (string): Tag names

```bash
curl 'https://catalog.data.gov/api/3/action/tag_list'
```

Example response (200):

```json
{
  "help": "https://catalog.data.gov/api/3/action/help_show?name=tag_list",
  "success": true,
  "result": [
    "water"
  ]
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
