Search data gov datasets

When the user asks whether the U.S. government has data on a topic — climate, public health, economics, local budgets — or wants to find datasets from federal, tribal, or municipal agencies. Search the Data.gov CKAN catalog for dataset metadata and download links.

search-data-gov-datasets · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/search-data-gov-datasets. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/search-data-gov-datasets/SKILL.md.

When to use this skill

When the user asks whether the U.S. government has data on a topic — climate monitoring, public health records, economic statistics, local government budgets — or wants to find downloadable datasets from federal agencies, tribal governments (including nations like the Confederated Salish and Kootenai Tribes), or city and county governments. The Data.gov CKAN API returns metadata: titles, descriptions, publishers, and download links — not the underlying data files. When the user already has a dataset and wants its raw data, this is the wrong skill; they need the dataset's own API or download URL.

Your best first call

curl "https://catalog.data.gov/api/3/action/package_search?q=coral+reef&rows=5"

No auth. No key. Returns JSON where result.count reports total matches across the entire catalog (not per-page) and result.results is an array of dataset packages. Each package has title (human-readable name), notes (description), name (slug for package_show lookups), organization (publisher object with a name slug like noaa-gov or city-of-chicago), resources (array of download links with url and format), and tags (subject keywords). Use q for full-text search, fq for structured filters (e.g. fq=organization:noaa-gov), and rows to cap page size — the catalog holds ~330,000 datasets, so always narrow with q or fq.

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can search the Data.gov catalog for U.S. government datasets and return titles, publishers, and download links — but I return metadata, not the underlying data files.

APIs this skill uses

Data.gov · primary · verified

The Data.gov CKAN API provides access to the federal government's open data catalog. Search and retrieve metadata about datasets published by government agencies. Data.gov is the home of the U.S. government's open data, providing public ac…

Generated from

Data.gov tutorial Getting Started with the Data.gov Catalog API

SKILL.md source (frontmatter + body)
---
name: search-data-gov-datasets
description: When the user asks whether the U.S. government has data on a topic — climate, public health, economics, local budgets — or wants to find datasets from federal, tribal, or municipal agencies. Search the Data.gov CKAN catalog for dataset metadata and download links.
---

## When to use this skill

When the user asks whether the U.S. government has data on a topic — climate monitoring, public health records, economic statistics, local government budgets — or wants to find downloadable datasets from federal agencies, tribal governments (including nations like the Confederated Salish and Kootenai Tribes), or city and county governments. The Data.gov CKAN API returns metadata: titles, descriptions, publishers, and download links — not the underlying data files. When the user already has a dataset and wants its raw data, this is the wrong skill; they need the dataset's own API or download URL.

## Your best first call

```bash
curl "https://catalog.data.gov/api/3/action/package_search?q=coral+reef&rows=5"
```

No auth. No key. Returns JSON where `result.count` reports total matches across the entire catalog (not per-page) and `result.results` is an array of dataset packages. Each package has `title` (human-readable name), `notes` (description), `name` (slug for `package_show` lookups), `organization` (publisher object with a `name` slug like `noaa-gov` or `city-of-chicago`), `resources` (array of download links with `url` and `format`), and `tags` (subject keywords). Use `q` for full-text search, `fq` for structured filters (e.g. `fq=organization:noaa-gov`), and `rows` to cap page size — the catalog holds ~330,000 datasets, so always narrow with `q` or `fq`.

## Fallbacks (when the best call isn't enough)

- **Looking for a specific dataset by name or slug** → `package_show?id=<slug>` returns full metadata for one dataset, including all resource download links and version history.
- **Need the exact publisher slug before filtering** → `organization_list` returns every publisher slug in the catalog (federal departments, tribal governments, city and county governments). Run it once, find the slug, then filter `package_search` with `fq=organization:<slug>`.
- **Browsing thematic groups** → `group_list` returns seven editorial groups (agriculture, climate, energy, local, maritime, ocean, older-adults-health-data). Useful as a structural map, but most datasets are found through `package_search`, not group browsing.

## Pitfalls

- Calling `package_search` with no `q` parameter returns metadata for all ~330,000 datasets, 10 rows at a time. Always include a narrowing `q` or `fq` parameter.
- `fq=tags:economy` can silently zero out results even when datasets about the topic exist — tag strings are inconsistent across publishers. Filter by `organization` slug instead, or drop `fq` and rely on `q` alone.
- Organization slugs are inconsistent: `cfpb-gov` abbreviates the Consumer Financial Protection Bureau, `usace-army-mil` uses the Army Corps domain, and `board-of-governors-of-the-federal-reserve-system` is written out in full. Run `organization_list` first and match the slug exactly before using it as a filter.
- `package_show?id=` accepts the dataset's slug or UUID, not its display title. A 404 with `"__type": "Not Found Error"` means the slug changed or the dataset was removed — both happen in a catalog this large.

## One-line summary for the user

I can search the Data.gov catalog for U.S. government datasets and return titles, publishers, and download links — but I return metadata, not the underlying data files.

« Back to all skills