How it will work: 3 steps
- Follow us on ApifyThe tool is built and waits in the queue for the Apify Store. Apify is the cloud platform where our tools run.
- Paste your input and press StartNo code needed: you fill in a form (the input). It already has a working example. For example:
data.cdc.govin Portals. Each start is one run. - Download the resultsWhen the run ends, the results are in a table (the dataset). Open Output, press Export and pick Excel or CSV. JSON and the API are there too.
This tool is an Apify Actor: a small program that runs on Apify. You can also run it on a schedule, for example every Monday. New to it? Read how it works, step by step and the 8 words you need first.
What it does
Search the open data portals of the CDC (data.cdc.gov) and HealthData.gov by keyword or dataset ID, and export the rows of the dataset as clean JSON, CSV or Excel.
- Data rows mode (default): give a dataset ID or a search query. The Actor finds the dataset, reads its rows page by page and saves each row with every source column, plus the dataset ID, dataset name, portal, last update of the data and the time of reading.
- Dataset search mode: list the datasets that match your keywords, with name, category, last update, licence, columns, page views and the API endpoint. No rows.
- Search: both portals are searched separately and the matches are merged (alternating by relevance: CDC first, then HealthData.gov; or newest first, exact for up to 100 datasets). With the default
maxDatasets: 1, rows come from the top CDC match; for a HealthData.gov table setdomainsto["healthdata.gov"]or pick its ID in Dataset search mode.
Good for
- Export a CDC table (COVID-19 deaths, vaccinations, measles, wastewater, overdose and many more) to CSV or Excel with a filter, without writing code.
- Feed health statistics to a database, a notebook or an AI agent through the Apify API, with the same field names as the source.
- Find which CDC or HHS dataset holds the numbers you need, and how fresh it is.
Not a good fit
- Only data.cdc.gov and healthdata.gov. Other Socrata portals (cities, states) are not searched.
- The Actor returns what the portal publishes. It does not fix, merge or interpret the numbers. Many CDC datasets are provisional or no longer updated; check
datasetUpdatedAt. - Some HealthData.gov entries are only links to files on other websites. They have no rows in the API; you get a free status row instead.
- Up to 50,000 rows per run. Very wide or slow datasets can stop earlier (see Pricing and limits).
Who uses it
Health researchers
Export a CDC table to Excel with a filter, without code.
Data engineers
Send health numbers to a database with the source field names.
Journalists
Find which dataset holds the numbers you need and how fresh it is.
Price
Prices will be shown after release.
Questions
Do I need a login or an API key?
No. Both portals are public. A Socrata app token is optional.
Why are some numbers null?
The source has no value there. The tool never turns a missing value into 0.
Is the data up to date?
It reads the portal live. How fresh it is depends on the dataset.
Does it search other city or state portals?
No. It searches data.cdc.gov and healthdata.gov only.
Can I get the same output as the website export?
The column names are the API field names, which can differ from the titles on the website. The values are the same; numbers are typed unless you set typedValues: false.
Details
Step by step on Apify
- Open the Input tab.
- Type keywords in Search query (
searchQuery), for examplecovid vaccinations. Or paste a dataset ID such as9bhg-hckuinto Dataset IDs or URLs (datasetIds). - Keep Max results (
maxRows) at the prefilled 20, or set up to 50,000. - Click Start.
- Open the Output tab. Check
datasetNameon the first row: it tells you which dataset matched your words.
Use cases
| Task | Input | You get | Key fields | Next step |
|---|---|---|---|---|
| Export one known CDC table with a filter | datasetIds + where | data row | source columns, datasetName, datasetUpdatedAt | CSV / Excel download, API |
| Quick look at data on a topic | searchQuery | data row | source columns, datasetName | Dataset view, API |
| Find the right dataset first | mode: datasets + searchQuery | dataset record | datasetId, datasetName, datasetUpdatedAt, columns, apiEndpoint | then run Data rows mode with that datasetId |
| Totals without downloading rows | datasetIds + select with count(*), sum(...) | one data row | your aggregate columns | API, AI agent |
Tips for better results
- Use dataset search mode first to find the right dataset.
- Check the last update date of a dataset. Some datasets are old.
- Set domains to healthdata.gov when you want a HealthData.gov table.
Limits and good to know
- Up to 50,000 rows per run (tested on an earlier build with the same row reader: 50,000 rows of a CDC dataset in 32 seconds)
- The Actor stops reading the source 250 seconds after the start, so a run fits the default 5-minute timeout. Very wide or slow datasets can stop earlier: a 135-column HealthData.gov dataset needed 204 seconds for 20,000 rows, so a bigger request on it reaches the limit. Then the run ends with
CAPPED, and the dataset's outcome inRUN_SUMMARYisstoppedwithDEADLINE_REACHED; run again with awherefilter on a date or ID to get the next part - Up to 20 dataset IDs and 20 datasets from a search per run
- The source has no published quota. If it answers HTTP 429, the Actor waits and retries; your own free Socrata app token (
appToken) raises the limit
For developers
Sample result
One result from a real test run, in JSON. Real values change from run to run. In Excel or CSV each field is a column.
{
"recordType": "row",
"status": "ok",
"datasetId": "9bhg-hcku",
"datasetName": "Provisional COVID-19 Deaths by Sex and Age",
"domain": "data.cdc.gov",
"datasetUpdatedAt": "2023-09-27T14:43:31.000Z",
"rowNumber": 1,
"sourceUrl": "https://data.cdc.gov/resource/9bhg-hcku.json?%24where=state+%3D+%27California%27&%24order=%3Aid&%24limit=21&%24offset=0",
"fetchedAt": "2026-10-17T13:26:07.250Z",
"data_as_of": "2023-09-27T00:00:00.000",
"start_date": "2020-01-01T00:00:00.000",
"end_date": "2023-09-23T00:00:00.000",
"group": "By Total",
"year": null,
"month": null,
"state": "California",
"sex": "All Sexes",
"age_group": "All Ages",
"covid_19_deaths": 109248,
"total_deaths": 1178346,
"pneumonia_deaths": 125177,
"influenza_deaths": 1753,
"footnote": null
}Data fields (28)
| Field | Type | Meaning |
|---|---|---|
recordType | string | row = one data row of a dataset; dataset = one catalog record (Dataset search mode); status = free not_found / no_rows / error row. |
status | string | ok for data rows and dataset records; not_found, no_rows or error for status rows. |
statusCode | string | Machine code on status rows, e.g. DATASET_NOT_FOUND, INVALID_DATASET_ID, SOURCE_BAD_REQUEST, RATE_LIMITED. |
statusReason | string | Plain-English reason on status rows. |
input | string | Your dataset ID or URL as given (status rows). |
datasetId | string | Socrata 4x4 dataset ID, e.g. 3rge-nu2a. |
datasetName | string | Dataset title on the portal. |
domain | string | Portal: data.cdc.gov or healthdata.gov. |
datasetUpdatedAt | string | When the dataset rows were last updated by the publisher (ISO 8601); null if the portal does not say. |
rowNumber | integer | Position of the row in this export, from 1 (data rows). |
sourceUrl | string | API URL the row or record was read from. |
fetchedAt | string | When the Actor read the data (ISO 8601). |
metadataUpdatedAt | string | When the dataset description or columns last changed (ISO 8601). |
category | string | Portal category, e.g. Vaccinations. |
license | string | Dataset licence as published, e.g. Public Domain U.S. Government. |
attribution | string | Publisher named by the portal, e.g. Centers for Disease Control and Prevention. |
permalink | string | Human page of the dataset on the portal. |
description | string | Dataset description (Dataset search mode). |
createdAt | string | When the dataset was created (ISO 8601). |
tags | array | Portal tags. |
columns | array | Columns: name, fieldName (use it in where/select), dataType, description. |
columnCount | integer | Number of data columns. |
apiEndpoint | string | SODA endpoint of the dataset rows, e.g. https://data.cdc.gov/resource/3rge-nu2a.json. |
searchQuery | string | The search query that found this dataset. |
searchRank | integer | Position in the search results, from 1. |
pageViewsLastMonth | integer | Portal page views last month, as reported by the catalog. |
pageViewsTotal | integer | Portal page views in total. |
downloadCount | integer | Downloads, as reported by the catalog. |
Input settings (12)
The main fields of the input form. With the API you send them as JSON.
| Setting | Name in the API | Type | Example value |
|---|---|---|---|
| Search query | searchQuery | string | "covid vaccinations" |
| Dataset IDs or URLs | datasetIds | array | |
| Mode | mode | string | "rows" |
| Max results | maxRows | integer | 20 |
| Filter rows (SoQL where) | where | string | |
| Columns (SoQL select) | select | string | |
| Sort rows (SoQL order) | order | string | |
| Datasets to export from a search | maxDatasets | integer | 1 |
| Portals | domains | array | ["data.cdc.gov", "healthdata.gov"] |
| Rank datasets by | sortDatasetsBy | string | "relevance" |
| Typed numbers and booleans | typedValues | boolean | true |
| Socrata app token (optional) | appToken | string |
