Data.gov API - US Open Government Datasets avatar

Data.gov API - US Open Government Datasets

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Data.gov API - US Open Government Datasets

Data.gov API - US Open Government Datasets

Access the Data.gov catalog of 300,000+ US government datasets. Search datasets by topic, agency, format, and keywords. Discover open data from federal, state, and local governments

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

0

Monthly active users

2 days ago

Last modified

Share

Data.gov API - US Open Government Data Catalog

Access the Data.gov catalog of 300,000+ US government datasets. Search datasets by topic, agency, format, and keywords. Discover open data from federal, state, and local governments.

Note: this actor runs in Demo Mode by default, so a default free run returns sample data. Set demoMode to false to fetch real data.


Quick Start

Test with Demo Mode (free, no API key needed)

{
"demoMode": true
}

Run with real data

{
"demoMode": false,
"task": "search_datasets",
"searchQuery": "air quality",
"limit": 20
}

Input Parameters

ParameterTypeDefaultRequiredDescription
taskstring"search_datasets"Yes*The operation to perform
searchQuerystring-NoKeywords to search in dataset titles and descriptions
datasetIdstring-NoUnique dataset identifier
agencystring-NoFederal agency name or abbreviation
topicstring-NoDataset topic/category
formatstring-NoDataset file format
licensestring-NoData license type
limitinteger100NoMaximum number of results to return
webhookUrlstring-NoURL to receive results via webhook
demoModebooleantrueNoRun with sample data (no API required)

Data sources and limits (updated 2026-10-15)

data.gov replaced its old CKAN API, so this actor now uses the new catalog API at catalog.data.gov (no key needed).

  • datasetId is the dataset slug from its catalog.data.gov URL.
  • search_by_agency accepts an organization slug (for example noaa, census) or name.
  • search_by_topic matches dataset keywords; get_topics lists the most common keywords (data.gov no longer has CKAN groups).
  • get_recent sorts by the date data.gov last harvested each record.
  • format filters the returned page by distribution format.
  • Results report returnedCount; the new catalog does not report a total match count.

Pricing

Each successful live call charges one event named after the task you ran (prices are on the Pricing tab), plus the standard Actor start fee. Not charged: Demo Mode runs, calls that fail or return an error row, and calls that return no rows.


Troubleshooting

"API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

No results or empty dataset

Check the run log for error messages. Common causes:

  • Invalid input format (check the examples above)
  • The target data doesn't exist or is too small to track

How do I test without an API key?

Enable Demo Mode in the input. This returns realistic sample data so you can verify the output format works for your workflow.


Built by John Rippy | Actor Arsenal