Raw schema
{
"type": "object",
"properties": {
"database": {
"default": "underlying_1999_2020",
"description": "Which WONDER mortality database to query. \"underlying_1999_2020\" (D76) is final data for 1999–2020 and the default. \"provisional\" (D176) runs 2018 through the current year, updated weekly, and returns the most recent years labelled e.g. \"2025 (provisional)\". \"underlying_2018_2024\" (D158) is settled — not provisional — data for 2018–2024. \"multiple_1999_2020\" (D77) and \"multiple_2018_2024\" (D157) record every cause listed on the death certificate; without an mcd_icd10 filter they return the same figures as the underlying-cause database for the same era, so pick one only to use that filter. The two 1999–2020 databases report race in CDC's four bridged groups; the other three use the six single-race groups — figures broken out by race are not comparable between the two families.",
"type": "string",
"enum": [
"underlying_1999_2020",
"provisional",
"underlying_2018_2024",
"multiple_1999_2020",
"multiple_2018_2024"
]
},
"group_by": {
"default": [
"year"
],
"description": "Dimensions to break results out by (1–4, each at most once), in output-column order — e.g. [\"year\"], [\"year\",\"sex\"], [\"age_group\",\"race\"]. Results are always national. Cause of death is a filter (cause_icd10), not a grouping. \"race\" resolves to whichever race vocabulary the selected database uses — four bridged groups (Asian and Pacific Islander combined) on the 1999–2020 databases, six single-race categories on the others, one of them \"More than one race\" — so a race series from one family cannot be spliced onto one from the other.",
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"year",
"age_group",
"sex",
"race"
]
}
},
"cause_icd10": {
"description": "Filter to ICD-10 underlying causes of death — the single condition CDC certified as having started the chain of events leading to death. Takes one code or range, or a list of them for a cause defined as a code set, e.g. drug overdose as [\"X40\",\"X41\",\"X42\",\"X43\",\"X44\",\"X60\",\"X61\",\"X62\",\"X63\",\"X64\",\"X85\",\"Y10\",\"Y11\",\"Y12\",\"Y13\",\"Y14\"]. Omit for all causes. Accepted by every database. \"999--999\" is not an ICD-10 code but CDC's own marker for deaths whose cause it is still withholding under the provisional database's six-month reporting lag; it counts that backlog, and only the \"provisional\" database offers it.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"const": "999--999"
},
{
"type": "string",
"pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
"description": "ICD-10 underlying-cause code or range. WONDER takes a node of its ICD-10 tree — a chapter such as \"A00-B99\" (infectious) or \"V01-Y89\" (external causes), a block such as \"X40-X49\" (accidental poisoning) or \"C00-C97\" (malignant neoplasms), or a single code such as \"I21\" — and rejects any other span, e.g. \"X40-X44\", naming it in the error. List the codes (or blocks) to cover a span that is not a tree node."
},
{
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "999--999"
},
{
"type": "string",
"pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
"description": "ICD-10 underlying-cause code or range. WONDER takes a node of its ICD-10 tree — a chapter such as \"A00-B99\" (infectious) or \"V01-Y89\" (external causes), a block such as \"X40-X49\" (accidental poisoning) or \"C00-C97\" (malignant neoplasms), or a single code such as \"I21\" — and rejects any other span, e.g. \"X40-X44\", naming it in the error. List the codes (or blocks) to cover a span that is not a tree node."
}
],
"description": "One list entry: an ICD-10 code or range, or the withheld-cause marker."
},
"description": "A list of 1–50 entries, each in the single-value form, matched as a union: a death counts once when it matches any of them, so a code set such as X40–X44 plus X60–X64 is one series with one set of rates. Repeated entries are ignored."
}
]
},
"mcd_icd10": {
"description": "Filter to deaths with any of these ICD-10 codes recorded anywhere on the death certificate, whether or not it was the underlying cause — e.g. \"died with a respiratory condition listed\", a population no underlying-cause query can produce. Takes one code or range, or a list of them, e.g. opioid involvement as [\"T40.0\",\"T40.1\",\"T40.2\",\"T40.3\",\"T40.4\",\"T40.6\"]. Valid only when database is \"multiple_1999_2020\", \"multiple_2018_2024\", or \"provisional\"; the other databases record only the underlying cause and reject it. \"999--999\", the withheld-cause marker described under cause_icd10, is offered here too but only by \"provisional\". Combines with cause_icd10, which keeps meaning the underlying cause: a death must match both filters. Omit for all causes.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"const": "999--999"
},
{
"type": "string",
"pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
"description": "ICD-10 code or range, same form as cause_icd10 — a chapter such as \"S00-T98\" (injury and poisoning, a chapter the underlying-cause finder does not list), a block such as \"J09-J18\" (influenza and pneumonia), or a single code such as \"T40.1\" (heroin)."
},
{
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "999--999"
},
{
"type": "string",
"pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
"description": "ICD-10 code or range, same form as cause_icd10 — a chapter such as \"S00-T98\" (injury and poisoning, a chapter the underlying-cause finder does not list), a block such as \"J09-J18\" (influenza and pneumonia), or a single code such as \"T40.1\" (heroin)."
}
],
"description": "One list entry: an ICD-10 code or range, or the withheld-cause marker."
},
"description": "A list of 1–50 entries, each in the single-value form, matched as a union: a death counts once when it matches any of them, so a code set such as X40–X44 plus X60–X64 is one series with one set of rates. Repeated entries are ignored."
}
]
},
"sex": {
"default": "all",
"description": "Filter by sex.",
"type": "string",
"enum": [
"all",
"male",
"female"
]
},
"age_groups": {
"description": "Restrict to deaths in any of the listed age groups — e.g. [\"25-34\",\"35-44\"] covers both; a repeated group counts once. \"1\" is the under-1-year group. \"NS\" is the group CDC puts a death in when the age was not recorded; it is not covered by any of the ten-year groups, so a filter listing all eleven of those still leaves those deaths out and returns fewer deaths than the same query unfiltered. List \"NS\" alongside them to match an unfiltered total, or on its own to count them. Omit for all ages, which includes them.",
"type": "array",
"items": {
"type": "string",
"enum": [
"1",
"1-4",
"5-14",
"15-24",
"25-34",
"35-44",
"45-54",
"55-64",
"65-74",
"75-84",
"85+",
"NS"
]
}
},
"year_range": {
"description": "Inclusive year range; from must not be later than to. These bounds span every database (1999–2026); the years the selected one actually holds are narrower, and a range outside them is rejected with that database's span named. Omit for all years the database holds.",
"type": "object",
"properties": {
"from": {
"type": "integer",
"minimum": 1999,
"maximum": 2026,
"description": "First year (1999–2026 across all databases; the selected one holds a narrower span)."
},
"to": {
"type": "integer",
"minimum": 1999,
"maximum": 2026,
"description": "Last year (1999–2026 across all databases; the selected one holds a narrower span)."
}
},
"required": [
"from",
"to"
]
},
"limit": {
"description": "Rows to return from the table CDC sent (1–5000). Omit to take as many as fit. Either way fewer come back when the page would carry the response past its 200,000-character budget, counted over the whole result — the rows, their cell notes, and the caveats and messages, as JSON and as the rendered table together; the response says so and gives a nextOffset to resume from. WONDER's request carries no limit of its own, so this pages a table already fetched in full rather than narrowing the query: the deaths, rates, caveats and hidden-row notices are the same whichever page is read.",
"type": "integer",
"minimum": 1,
"maximum": 5000
},
"offset": {
"default": 0,
"description": "Index of the first row to return, for continuing past a previous call (default 0, max 10,000). Rows keep the order CDC returned them in, which is stable for a given query, so offset plus limit walks the table without gaps or repeats. An offset at or past the row total returns an empty page rather than an error.",
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}