US CDC open data — Socrata dataset catalogue and SoQL queries, syndicated public-health content, environmental health tracking and WONDER mortality queries.
content-media-typesnot measuredcontent-searchnot measuredcontent-topicsnot measuredcontentnot measureddataset-countnot measureddataset-rowsnot measureddatasetnot measureddatasetsnot measuredmortality-querynot measuredtracking-content-areasnot measuredtracking-indicatorsnot measuredtracking-measuresnot measured/v1/health:cdc/content-media-types5m cache0 paramschecking key…// npm i zpi-sdk
import { ZpiClient } from "zpi-sdk";
const client = new ZpiClient({ apiKey: "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" });
const data = await client.run("health:cdc", "content-media-types", {});
console.log(data);curl -X GET "https://api.zpi.web.id/v1/health:cdc/content-media-types" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"/v1/health:cdc/content-media-typesCDC syndication media-type vocabulary — the names content-search's mediaType accepts. One-shot: the upstream returns the whole list in one response, so no page envelope.This endpoint takes no parameters.
curl -X GET "https://api.zpi.web.id/v1/health:cdc/content-media-types" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 14,
"items": [
{
"name": "Badge",
"mediaCount": 20,
"description": "Badges",
"displayOrder": 10
},
{
"name": "Button",
"mediaCount": 441,
"description": "Buttons",
"displayOrder": 20
},
{
"name": "Feed",
"mediaCount": 42,
"description": "Managed Feed",
"displayOrder": 50
},
{
"name": "Feed - Import",
"mediaCount": 10,
"description": "Import Feed",
"displayOrder": 60
},
{
"name": "Feed - Aggregate",
"mediaCount": 4,
"description": "Aggregate Feed",
"displayOrder": 75
},
{
"name": "HTML",
"mediaCount": 3884,
"description": "HTML Content",
"displayOrder": 80
},
{
"name": "Image",
"mediaCount": 32,
"description": "Images",
"displayOrder": 90
},
{
"name": "Infographic",
"mediaCount": 170,
"description": "Infographics",
"displayOrder": 100
}
],
"provider": "cdc"
}/v1/health:cdc/content-searchCDC syndicated content (Public Health Media Library). `attribution` and `syndicateUrl` are what make an item legally reusable, so the mapper keeps every one of the 60 upstream fields rather than a summary subset.namestringoptionalmediaTypestringoptionaltopicIdstringoptionallanguagestringoptionalsortenumoptionalpagenumberoptionallimitnumberoptionalcurl -X GET "https://api.zpi.web.id/v1/health:cdc/content-search?name=Asthma&mediaType=HTML%2CVideo&topicId=5288&language=Spanish&sort=newest&page=1&limit=20" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 0,
"items": [],
"limit": 3,
"total": 0,
"hasMore": false,
"nextPage": null,
"provider": "cdc",
"totalPages": 0
}/v1/health:cdc/content-topicsCDC syndication topic vocabulary — the ids that content-search's topicId accepts. Topics nest one level deep, so each row carries its sub-topics as `children`.pagenumberoptionallimitnumberoptionalcurl -X GET "https://api.zpi.web.id/v1/health:cdc/content-topics?page=1&limit=20" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 3,
"items": [
{
"name": "Data & Statistics",
"topicId": 5495,
"children": [
{
"name": "Abortion Surveillance",
"topicId": 5224,
"language": "English",
"childCount": 0,
"mediaCount": 3,
"description": "Sourced data from 2.6",
"displayOrder": 0
},
{
"name": "Active Bacterial Core surveillance (ABCs)",
"topicId": 5229,
"language": "English",
"childCount": 0,
"mediaCount": 2,
"description": "Sourced data from 2.6",
"displayOrder": 0
}
],
"language": "English",
"childCount": 73,
"mediaCount": 707,
"description": "Sourced data from 2.6",
"displayOrder": 0
},
{
"name": "Diseases & Conditions",
"topicId": 5528,
"children": [
{
"name": "Acanthamoeba Infection",
"topicId": 5225,
"language": "English",
"childCount": 0,
"mediaCount": 0,
"description": "Sourced data from 2.6",
"displayOrder": 0
},
{
"name": "Acinetobacter Infection",
"topicId": 5228,
"language": "English",
"childCount": 0,
"mediaCount": 1,
"description": "Sourced data from 2.6",
"displayOrder": 0
}
],
"language": "English",
"childCount": 510,
"mediaCount": 6922,
"description": "Sourced data from 2.6",
"displayOrder": 0
}
],
"limit": 3,
"total": 13,
"hasMore": true,
"nextPage": 2,
"provider": "cdc",
"totalPages": 5
}/v1/health:cdc/content/:mediaIdOne CDC syndicated media item, with all 60 upstream fields kept. A retired or unknown id answers HTTP 200 with an empty result set rather than a 404, so emptiness is the not-found signal here.mediaIdnumberrequiredin pathcurl -X GET "https://api.zpi.web.id/v1/health:cdc/content/405289" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"name": "Respiratory Infections and Asthma",
"tags": [
{
"id": 5288,
"name": "Asthma",
"type": "Topic",
"language": "English"
}
],
"apiUrl": "https://tools.cdc.gov/api/v2/resources/media/405289.json",
"author": "lza2",
"source": {
"name": "Centers for Disease Control and Prevention",
"acronym": "CDC"
},
"status": "Published",
"mediaId": 405289,
"embedUrl": "https://tools.cdc.gov/api/v2/resources/media/405289/embed.json",
"language": {
"name": "English",
"isoCode": "eng",
"isoCode2": "en"
},
"provider": "cdc",
"embedCode": "<!-- Markup for HTML (Respiratory Infections and Asthma: Information on flu, COVID, RSV and other respiratory infections and relation to asthma) --><div class='rid_b1f78d8a_405289'…",
"mediaType": "HTML",
"pageCount": 0,
"sourceUrl": "https://www.cdc.gov/asthma/respiratory-infections/index.html",
"targetUrl": "https://www.cdc.gov/asthma/respiratory-infections/index.html",
"updatedAt": "2026-08-28T21:10:24Z",
"childCount": 0,
"contentUrl": "https://tools.cdc.gov/api/v2/resources/media/405289/content.html",
"attribution": "<div id=\"cdcAttribution\" class=\"cdcAttribution\">Content provided and maintained by the <a href=\"http://www.cdc.gov/\" target=\"_blank\">US Centers for Disease Control and Prevention</…",
"description": "Information on flu, COVID, RSV and other respiratory infections and relation to asthma",
"owningOrgId": "HCUG",
"parentCount": 0,
"publishedAt": "2026-08-28T04:00:00Z",
"syndicateUrl": "https://tools.cdc.gov/api/v2/resources/media/405289/syndicate.json",
"thumbnailUrl": "https://tools.cdc.gov/api/v2/resources/media/405289/thumbnail.png",
"owningOrgName": "NATIONAL CENTER FOR ENVIRONMENTAL HEALTH",
"persistentUrl": "https://tools.cdc.gov/api/v2/resources/purls/XXMPR",
"alternateImages": [
{
"id": 1347454,
"url": "https://tools.cdc.gov/api/v2/resources/links/1347454.png",
"name": "thumbnail",
"type": "Thumbnail",
"width": 155,
"height": 84
}
],
"isTopSyndicated": false,
"contentUpdatedAt": "2026-08-28T04:00:00Z",
"maintainingOrgId": "HCUG",
"contentAuthoredAt": "2020-03-17T19:26:21Z",
"contentReviewedAt": "2026-08-28T04:00:00Z",
"maintainingOrgName": "NATIONAL CENTER FOR ENVIRONMENTAL HEALTH",
"persistentUrlToken": "XXMPR",
"syndicationUpdatedAt": "2026-08-28T21:10:24Z",
"syndicationVisibleAt": "2026-08-28T04:00:00Z",
"syndicationCapturedAt": "2020-03-18T17:18:49Z"
}/v1/health:cdc/dataset-count/:datasetIdRow count for a CDC Socrata dataset, optionally under a SoQL filter. One-shot: the upstream has no page concept here, so no page/limit envelope.datasetIdstringrequiredin pathwherestringoptionalcurl -X GET "https://api.zpi.web.id/v1/health:cdc/dataset-count/x9gk-5huc?where=year%3D%272024%27" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"total": 425880,
"where": "year='2024'",
"provider": "cdc",
"datasetId": "x9gk-5huc"
}/v1/health:cdc/dataset-rows/:datasetIdRows from any CDC Socrata dataset via SoQL. The row shape is defined by the dataset's own column schema — NNDSS returns 11 fields, BRFSS 27 — so nothing here assumes a field name. Keys are camelCased anddatasetIdstringrequiredin pathselectstringoptionalwherestringoptionalgroupstringoptionalhavingstringoptionalorderstringoptionalquerystringoptionalexcludeSystemFieldsenumoptionalpagenumberoptionallimitnumberoptionalcurl -X GET "https://api.zpi.web.id/v1/health:cdc/dataset-rows/x9gk-5huc?select=states%2Cyear%2Cweek%2Clabel%2Cm1&where=year%3D%272024%27+AND+label%3D%27Anthrax%27&group=label&having=sum%28m1%29+%3E+100&order=sort_order+ASC&query=anthrax&excludeSystemFields=true&page=1&limit=100" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 100,
"items": [
{
"m2": "0",
"week": "1",
"year": "2022",
"label": "Anthrax",
"m1Flag": "-",
"m2Flag": "-",
"m3Flag": "-",
"m4Flag": "-",
"states": "US RESIDENTS",
"location2": "US RESIDENTS",
"sortOrder": "20220100001"
},
{
"m2": "0",
"week": "1",
"year": "2022",
"label": "Anthrax",
"m1Flag": "-",
"m2Flag": "-",
"m3Flag": "-",
"m4Flag": "-",
"states": "NEW ENGLAND",
"location2": "NEW ENGLAND",
"sortOrder": "20220100002"
},
{
"m2": "0",
"week": "1",
"year": "2022",
"label": "Anthrax",
"m1Flag": "-",
"m2Flag": "-",
"m3Flag": "-",
"m4Flag": "-",
"states": "CONNECTICUT",
"geocode": {
"type": "Point",
"coordinates": [
-72.738288,
41.575155
]
},
"location1": "CONNECTICUT",
"sortOrder": "20220100003",
"computedRegionHjspUmg2": "24",
"computedRegionSkr5Azej": "1043"
}
],
"limit": 100,
"total": null,
"fields": [
"states",
"year",
"week"
],
"hasMore": true,
"nextPage": 2,
"provider": "cdc",
"datasetId": "x9gk-5huc"
}/v1/health:cdc/dataset/:datasetIdOne CDC dataset's metadata and column schema (Socrata views API). Socrata row shape is per-dataset, so this is the schema source that dataset-rows deliberately does not guess at.datasetIdstringrequiredin pathcurl -X GET "https://api.zpi.web.id/v1/health:cdc/dataset/x9gk-5huc" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"name": "NNDSS Weekly Data",
"tags": [
"nndss"
],
"owner": {
"id": "jy77-2p5t",
"name": "Nicole Pham",
"type": "interactive",
"screenName": "Nicole Pham"
},
"author": {
"id": "jy77-2p5t",
"name": "Nicole Pham",
"type": "interactive",
"screenName": "Nicole Pham"
},
"locked": false,
"rights": [
"read"
],
"columns": [
{
"id": 554475832,
"name": "Reporting Area",
"stats": {
"count": 1958040,
"largest": "WYOMING",
"nonNull": 1958040,
"smallest": "Alabama",
"nullCount": 0,
"topValues": [
{
"count": 17705,
"value": "GUAM"
}
],
"cardinality": 1958040
},
"dataType": "text",
"position": 1,
"fieldName": "states",
"renderType": "text"
}
],
"rowsUrl": "https://data.cdc.gov/resource/x9gk-5huc.json",
"category": "NNDSS",
"isPublic": true,
"provider": "cdc",
"viewType": "tabular",
"assetType": "dataset",
"createdAt": "2021-07-20T14:27:50.000Z",
"datasetId": "x9gk-5huc",
"permalink": "https://data.cdc.gov/d/x9gk-5huc",
"viewCount": 124337,
"provenance": "official",
"attribution": "Office of Public Health Data, Surveillance, and Technology, Centers for Disease Control and Prevention",
"columnCount": 18,
"description": "NNDSS - In this Table, provisional cases* of notifiable diseases are displayed for United States, U.S. territories, and Non-U.S. residents.\n\n\n<b>Notes:</b>\n• These are weekly cases…",
"displayType": "table",
"publishedAt": "2022-01-18T19:31:36.000Z",
"ratingCount": 0,
"commentCount": 0,
"customFields": {
"Common Core": {
"Bureau Code": "009:20",
"Contact Name": "NNDSS Team",
"Program Code": "009:020",
"Contact Email": "[email protected]"
}
},
"averageRating": 0,
"downloadCount": 26861,
"rowsUpdatedAt": "2026-08-27T15:35:36.000Z",
"hideFromCatalog": false,
"publicationStage": "published",
"metadataUpdatedAt": "2026-08-27T15:35:35.000Z",
"rowIdentifierColumnId": 554475847
}/v1/health:cdc/datasetsCDC open-data catalogue (Socrata discovery API) — no key, direct fetch. This is the only supported way to resolve a dataset id: CDC retires ids withoutquerystringoptionalonlyenumoptionalcategoriesstringoptionaltagsstringoptionalorderenumoptionalpagenumberoptionallimitnumberoptionalcurl -X GET "https://api.zpi.web.id/v1/health:cdc/datasets?query=nndss&only=dataset&categories=NNDSS&tags=wonder&order=pageViewsTotal&page=1&limit=20" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 3,
"items": [
{
"url": "https://data.cdc.gov/NNDSS/NNDSS-Weekly-Data/x9gk-5huc",
"name": "NNDSS Weekly Data",
"tags": [
"2023"
],
"type": "dataset",
"owner": {
"id": "jy77-2p5t",
"name": "Nicole Pham",
"type": "interactive"
},
"domain": "data.cdc.gov",
"locked": false,
"backend": "nbe",
"columns": [
{
"name": "States",
"dataType": "Number",
"fieldName": ":@computed_region_hjsp_umg2",
"description": "This column was automatically created in order to record in what polygon from the dataset 'States' (hjsp-umg2) the point in column 'geocode' is located. This enables the creation …"
}
],
"creator": {
"id": "jy77-2p5t",
"name": "Nicole Pham",
"type": "interactive"
},
"category": "NNDSS",
"metadata": [
{
"key": "Common-Core_Bureau-Code",
"value": "009:20"
}
],
"viewType": "tabular",
"createdAt": "2021-07-20T14:27:50.000Z",
"datasetId": "x9gk-5huc",
"pageViews": {
"total": 124337,
"lastWeek": 1356,
"lastMonth": 6533
},
"permalink": "https://data.cdc.gov/d/x9gk-5huc",
"updatedAt": "2026-08-27T15:35:36.000Z",
"provenance": "official",
"attribution": "Office of Public Health Data, Surveillance, and Technology, Centers for Disease Control and Prevention",
"description": "NNDSS - In this Table, provisional cases* of notifiable diseases are displayed for United States, U.S. territories, and Non-U.S. residents.\n\n\n<b>Notes:</b>\n• These are weekly cases…",
"displayType": "table",
"publishedAt": "2022-01-18T19:31:36.000Z",
"contactEmail": "[email protected]",
"dataUpdatedAt": "2026-08-27T15:35:36.000Z",
"downloadCount": 26861,
"metadataUpdatedAt": "2026-08-27T15:35:35.000Z"
}
],
"limit": 3,
"query": "nndss",
"total": 294,
"hasMore": true,
"nextPage": 2,
"provider": "cdc"
}/v1/health:cdc/mortality-queryCDC WONDER mortality query (D-series databases, D76 = Underlying Cause of Death). WONDER answers an incomplete request document with HTTP 500 carrying a parsed,databasestringoptionalgroupBystringoptionalmeasuresstringoptionalshowTotalsenumoptionalparametersstringoptionalin bodyrequestXmlstringoptionalin bodycurl -X POST "https://api.zpi.web.id/v1/health:cdc/mortality-query?database=D76&groupBy=D76.V1-level1&measures=D76.M1%2CD76.M2%2CD76.M3&showTotals=true" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 23,
"items": [
{
"type": "data",
"year": "1999",
"deaths": 2391399,
"crudeRate": 857,
"population": 279040168
},
{
"type": "data",
"year": "2000",
"deaths": 2403351,
"crudeRate": 854,
"population": 281421906
},
{
"type": "data",
"year": "2001",
"deaths": 2416425,
"crudeRate": 848,
"population": 284968955
},
{
"type": "data",
"year": "2002",
"deaths": 2443387,
"crudeRate": 849.5,
"population": 287625193
},
{
"type": "data",
"year": "2003",
"deaths": 2448288,
"crudeRate": 843.9,
"population": 290107933
},
{
"type": "data",
"year": "2004",
"deaths": 2397615,
"crudeRate": 818.8,
"population": 292805298
},
{
"type": "data",
"year": "2005",
"deaths": 2448017,
"crudeRate": 828.4,
"population": 295516599
},
{
"type": "data",
"year": "2006",
"deaths": 2426264,
"crudeRate": 813.1,
"population": 298379912
}
],
"title": "Underlying Cause of Death, 1999-2020 Results Form",
"columns": [
{
"key": "year",
"code": "D76.V1-level1",
"type": "group",
"label": "Year"
},
{
"key": "deaths",
"code": "D76.M1",
"type": "measure",
"label": "Deaths"
},
{
"key": "population",
"code": "D76.M2",
"type": "measure",
"label": "Population"
},
{
"key": "crudeRate",
"code": "D76.M3",
"type": "measure",
"label": "Crude Rate"
}
],
"groupBy": [
"D76.V1-level1"
],
"vintage": "2020",
"database": "D76",
"measures": [
"D76.M1",
"D76.M2",
"D76.M3"
],
"provider": "cdc",
"databaseLabel": "Underlying Cause of Death, 1999-2020"
}/v1/health:cdc/tracking-content-areasEnvironmental Public Health Tracking content areas — the top of the contentArea → indicator → measure hierarchy. The gateway answers HTTP 200 even when it refuses: the real verdict is theThis endpoint takes no parameters.
curl -X GET "https://api.zpi.web.id/v1/health:cdc/tracking-content-areas" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 27,
"items": [
{
"name": "Air Quality",
"shortName": "AQ",
"contentAreaId": 11
},
{
"name": "Asthma",
"shortName": "AS",
"contentAreaId": 3
},
{
"name": "Biomonitoring: Population Exposures",
"shortName": "BIO",
"contentAreaId": 18
},
{
"name": "Birth Defects",
"shortName": "BD",
"contentAreaId": 5
},
{
"name": "Built Environment",
"shortName": "BE",
"contentAreaId": 42
},
{
"name": "Cancer",
"shortName": "CR",
"contentAreaId": 9
},
{
"name": "Childhood Cancers",
"shortName": "CHCR",
"contentAreaId": 10
},
{
"name": "Childhood Lead Poisoning",
"shortName": "CLP",
"contentAreaId": 6
}
],
"provider": "cdc"
}/v1/health:cdc/tracking-indicators/:contentAreaIdIndicators inside one Environmental Public Health Tracking content area. The route carries no format segment — `/indicators/{id}/json` is a 400, verifiedcontentAreaIdnumberrequiredin pathcurl -X GET "https://api.zpi.web.id/v1/health:cdc/tracking-indicators/1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 13,
"items": [
{
"name": "Arsenic in Community Water Systems (CWS)",
"shortName": "Arsenic in CWS",
"indicatorId": 42
},
{
"name": "Atrazine in Community Water Systems (CWS)",
"shortName": "Atrazine in CWS",
"indicatorId": 82
},
{
"name": "Di(2-ethylhexyl) phthalate (DEHP) in Community Water Systems (CWS)",
"shortName": "DEHP in CWS",
"indicatorId": 83
},
{
"name": "Disinfection Byproducts in Community Water Systems (CWS)",
"shortName": "Byproducts in CWS",
"indicatorId": 43
},
{
"name": "Nitrates in Community Water Systems (CWS)",
"shortName": "Nitrates in CWS",
"indicatorId": 44
},
{
"name": "Per- and Polyfluoroalkyl Substances (PFAS) in Community Water Systems (CWS)",
"shortName": "PFAS in Community Water Systems",
"indicatorId": 139
},
{
"name": "Perchlorate in Drinking Water",
"shortName": "Perchlorate in Drinking Water",
"indicatorId": 147
},
{
"name": "Private Well Water",
"shortName": "Pvt Well Wt",
"indicatorId": 240
}
],
"provider": "cdc",
"contentAreaId": 1
}/v1/health:cdc/tracking-measures/:indicatorIdMeasures published under one Environmental Public Health Tracking indicator. The route carries no format segment — `/measures/{id}/json` is a 400, verifiedindicatorIdnumberrequiredin pathcurl -X GET "https://api.zpi.web.id/v1/health:cdc/tracking-measures/42" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 5,
"items": [
{
"name": "Annual Mean Concentration of Arsenic (µg/L)",
"measureId": 769,
"shortName": "Annual mean Arsenic concentrations (µg/L)",
"temporalsSortedAscending": false
},
{
"name": "Annual Percent of CWS by Maximum Arsenic Concentrations (µg/L)",
"measureId": 1047,
"shortName": "Percent of CWS by annual maximum Arsenic concentrations (µg/L)",
"temporalsSortedAscending": false
},
{
"name": "Annual Percent of CWS by Mean Arsenic Concentrations (µg/L)",
"measureId": 1045,
"shortName": "Percent of CWS by annual mean Arsenic concentrations (µg/L)",
"temporalsSortedAscending": false
},
{
"name": "Annual Percent of People Served by CWS by Maximum Arsenic Concentrations (µg/L)",
"measureId": 1048,
"shortName": "Percent Population served by CWS by annual maximum Arsenic concentrations (µg/L)",
"temporalsSortedAscending": false
},
{
"name": "Annual Percent of People Served by CWS by Mean Arsenic Concentrations (µg/L)",
"measureId": 1046,
"shortName": "Percent of population served by CWS by annual mean Arsenic concentrations (µg/L)",
"temporalsSortedAscending": false
}
],
"provider": "cdc",
"indicatorId": 42
}