CDC WONDER Mortality Data Scraper
parseforge/cdc-wonder-mortality-scraper
Developer toolsAutomationOther
Scrapes aggregated mortality counts and population data from CDC WONDER databases. Filter by year range, U.S. state, and ICD-10 cause-of-death chapter, and group results by dimensions like year, state, sex, or age group.
- Total users
- 2
- Monthly active
- 1
- Total runs
- 108
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 8 days ago
Overview
CDC WONDER Mortality Data Scraper
Scrape CDC WONDER mortality data for any U.S. state, year range, or cause of death, up to a million records per run. Every row returns death counts and population figures, grouped by your chosen dimensions. No API key or manual web form clicks. Export to CSV, JSON, Excel, or XML.
CDC WONDER's web interface forces you to click through multi-step forms, one query at a time, and copy-paste results by hand. This Actor reads the public mortality databases directly, letting you pull death counts for any combination of year, state, and ICD-10 cause-of-death chapter in a single run. It returns every matching record in one fixed schema, ready for analysis.
| Who uses it | What they scrape CDC WONDER for |
|---|---|
| Epidemiologists | Track leading causes of death across states and years for public health reports. |
| Health policy analysts | Compare state-level mortality trends to evaluate the impact of health interventions. |
| Academic researchers | Pull structured mortality datasets for peer-reviewed studies without manual web scraping. |
| Insurance actuaries | Model mortality risk by cause, geography, and demographic group for pricing. |
| Data journalists | Build data-driven stories on death rates, COVID-19 impact, or the opioid crisis. |
What it does
This Actor collects aggregated mortality counts and population data from CDC WONDER by database, year range, state, and cause of death, and returns each record as a flat row.
- ποΈ Six mortality databases: Underlying Cause of Death, Multiple Cause, Infant Deaths, Linked Birth/Infant Death, and two Provisional datasets.
- π Flexible grouping: Aggregate by year, state, sex, age group, ICD-10 chapter, or combinations like Year + State + Sex.
- π·οΈ ICD-10 chapter filter: Narrow results to a single cause-of-death category, from neoplasms to external causes to COVID-19.
- πΊοΈ State-level drill-down: Filter to any U.S. state by FIPS code, or pull all states in one run.
- π Multi-year ranges: Set a start and end year to collect longitudinal data across decades.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with CDC WONDER data
π Track leading causes of death over time.
An epidemiologist pulls Underlying Cause of Death data grouped by Year + ICD-10 Chapter from 2010 to 2023 to identify rising mortality trends for a public health bulletin.
πΊοΈ Compare state-level mortality rates.
A health policy analyst collects death counts grouped by State + Year for all 50 states to rank states by circulatory disease mortality and inform resource allocation.
π¦ Study COVID-19 mortality impact.
A researcher queries the Provisional Mortality database filtered to ICD-10 chapter U00-U99, grouped by Year + State + Age Group, to measure pandemic-era excess deaths.
πΆ Analyze infant death patterns.
A maternal health advocate scrapes the Linked Birth/Infant Death database grouped by State + Sex + Age Group to identify disparities in infant mortality outcomes.
π° Build a data-driven news story.
A data journalist pulls Multiple Cause of Death data for a single state over five years, grouped by ICD-10 chapter, to report on the opioid crisis using external cause mortality figures.
Why choose this scraper
| What you get | |
|---|---|
| No manual form clicks | Bypass the CDC WONDER web interface and pull thousands of records in one automated run. |
| Structured output | Every record arrives as a flat row with death counts, population, and your chosen grouping columns. |
| Six databases in one tool | Switch between Underlying Cause, Multiple Cause, Infant Deaths, and Provisional datasets from a single input. |
| ICD-10 chapter filtering | Target specific causes like circulatory diseases, neoplasms, or COVID-19 without post-processing. |
| Multi-year collection | Pull data across decades by setting a year range, no repeated manual queries needed. |
How it compares
No other Store actor targets CDC WONDER the same way, so the honest comparison is with the alternatives teams actually weigh.
| CDC WONDER Mortality Data Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When CDC WONDER changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the Actor by selecting a mortality database, a grouping dimension, and optional filters for year range, state, and ICD-10 chapter. Filters run server-side so only matching records reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{
"maxItems": 10,
"database": "D76",
"groupBy": "year-state",
"yearFrom": 2020,
"yearTo": 2020
}
A larger pull:
{
"maxItems": 200,
"database": "D76",
"groupBy": "year-state",
"yearFrom": 2020,
"yearTo": 2020
}
Pricing
Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the CDC WONDER Mortality Data Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to CDC WONDER through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/cdc-wonder-mortality-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check that your Year From and Year To values fall within the range supported by your chosen database. Also verify that your ICD-10 Chapter filter is not too restrictive for the selected state and years. Try widening the year range or removing the cause filter.
The run is taking a long time. Is that normal?
Large queries with many grouping dimensions and wide year ranges can take several minutes because CDC WONDER processes each request server-side. Reduce the year range or choose a simpler grouping to speed up the run.
I see 'Request failed' or timeout errors.
CDC WONDER may rate-limit or throttle large requests. Try reducing the maxItems count, narrowing your year range, or splitting your query into multiple smaller runs. The Actor will retry automatically for transient errors.
The population column is empty for some rows.
Population data availability varies by database and grouping. Some databases or grouping combinations do not include population figures. Check the CDC WONDER documentation for your selected database to confirm population data is provided for your chosen dimensions.
Can I filter by a specific ICD-10 code instead of a chapter?
This Actor supports ICD-10 chapter-level filtering only. If you need sub-chapter or individual code filtering, you can export the full chapter data and filter in your analysis tool, or contact support to discuss a custom solution.
FAQ
| Question | Answer |
|---|---|
| What is CDC WONDER? | CDC WONDER is the U.S. Centers for Disease Control and Prevention's online database for public health data, including detailed mortality statistics. It provides death counts and population data queryable by cause, location, and demographics. |
| Do I need an API key or login to scrape CDC WONDER? | No. This Actor reads the public CDC WONDER data feeds directly. You do not need to register an application, obtain an API key, or log in. |
| Which mortality databases can I query? | You can choose from six databases: Underlying Cause of Death (1999-current), Multiple Cause of Death (1999-current), Infant Deaths (2007-current), Linked Birth/Infant Death (2017-current), Provisional Mortality (recent), and Underlying Cause of Death Provisional. |
| How do I filter by a specific cause of death? | Use the ICD-10 Chapter input to select a cause category, such as I00-I99 for circulatory diseases or U00-U99 for COVID-19. Leave it empty to include all causes. |
| Can I get data for a single U.S. state? | Yes. Select a state from the State (FIPS code) dropdown. Leave it set to 'All states' to pull data for the entire United States in one run. |
| What grouping options are available? | You can group results by Year, State, Year + State, Year + State + Sex, Year + State + Age Group, Year + ICD-10 Chapter, or State + Sex + Age Group. |
| How many records can I collect in one run? | You can set the maximum records up to 1,000,000 per run. The actual number returned depends on your chosen grouping, year range, and filters. |
| What output formats are supported? | You can export your dataset to CSV, JSON, Excel, or XML directly from the Apify platform. |
| Does this Actor return individual death records? | No. CDC WONDER provides aggregated death counts and population figures, not individual-level records. Each row represents a group defined by your chosen dimensions. |
| What years of data are available? | The Underlying and Multiple Cause databases go back to 1999. Infant Deaths start in 2007, Linked Birth/Infant Death in 2017, and the Provisional databases cover recent years. |
Related actors
- google-trends-scraper: Use this to correlate mortality search interest with actual death data from CDC WONDER.
Browse the full ParseForge collection for more scrapers.
π Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
β οΈ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Centers for Disease Control and Prevention. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| maxItems | integer | Maximum number of records to collect per run. | 10 |
| database | string (6 options) | Which CDC WONDER mortality database to query. | D76 |
| groupBy | string (7 options) | How to aggregate the mortality counts. | year-state |
| yearFrom | integer | Start year (inclusive). | 2020 |
| yearTo | integer | End year (inclusive). | 2020 |
| state | string (52 options) | Filter to a single U.S. state by FIPS code. Leave empty for all states. | not set |
| icd10Chapter | string (23 options) | Filter by ICD-10 chapter code. Leave empty for all causes. | not set |
Pricing
from $19.00 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| result | Single result in the default dataset. | $0.019 to $0.021 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~cdc-wonder-mortality-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
