Reference

API reference

Base URL https://api.healthdata.dev. Every endpoint is a GET and returns JSON unless the path ends in another format.

Generated from the dataset contracts when this site was built. Add @{version} after any dataset id to pin a version (how). Errors are problem documents.

Endpoints

GET /v1

The API index for this site.

  • site, name, tagline
  • api_version: "v1"
  • links.catalog, links.status

Example: https://api.healthdata.dev/v1

GET /v1/catalog

Every dataset published on this site.

  • site
  • datasets[]: id, kind, title, description, current (version), published_at, cadence, check_every, sla, discontinued
  • datasets[].source: name, url, license, commercial_ok
  • datasets[].coverage: start, end

Example: https://api.healthdata.dev/v1/catalog

GET /v1/status

How fresh each dataset is.

  • site, generated_at, overall ("ok" or "degraded")
  • datasets[]: id, status, version, checked_at, source_updated_at, sla, consecutive_failures, last_error
  • status is one of ok, pending, late, stale-upstream, failing, blocked, discontinued

Example: https://api.healthdata.dev/v1/status

GET /v1/{dataset}

Metadata for one dataset: the version that answered, its coverage, source, validation and downloads.

  • dataset, kind, title, description, cadence
  • version, current_version, pinned, published_at
  • source: id, name, publisher, url, license, commercial_ok, attribution, retrieved_at, source_updated_at
  • coverage: start, end
  • validation: status (pass, warn), warnings[]
  • series[]: id, name; for tables also key[] and partition
  • downloads[]: name, bytes, url
  • links: locations, versions, this_version

Example: https://api.healthdata.dev/v1/overdose-deaths-county

Errors: unknown-dataset , unknown-version , data-unavailable , and rate-limited for any endpoint.

GET /v1/{dataset}/versions

The version history.

  • dataset, current, published_at
  • previous[]: earlier version ids, newest first
  • snapshots: month (YYYY-MM) to version id

Example: https://api.healthdata.dev/v1/overdose-deaths-county/versions

Errors: unknown-dataset , and rate-limited for any endpoint.

GET /v1/{dataset}/locations

What can be requested: each series with its location ids, or for tables the partitions (under the series id "table").

  • dataset, version, kind
  • series[]: id, name, locations[] (ids)
  • locations[]: id, name

Example: https://api.healthdata.dev/v1/overdose-deaths-county/locations

Errors: unknown-dataset , unknown-version , and rate-limited for any endpoint.

GET /v1/{dataset}/{series}/{location}.json

One series at one place, ordered by date. Also .csv.

  • meta: dataset, series, series_name, location, location_name, units, source, license, attribution
  • data[]: one object per row, with the dataset's columns

Example: https://api.healthdata.dev/v1/overdose-deaths-county/all-drugs/us-county-02261.json

Errors: unknown-file , unknown-format , and rate-limited for any endpoint.

GET /v1/{dataset}/table/{partition}.json

Rows of a table for one partition value; table/all has every row for tables up to 50,000 rows. Also .csv.

  • meta: dataset, key, partition (when partitioned), rows (count), units, source, license, attribution
  • rows[]: one object per row

Errors: unknown-file , unknown-format , and rate-limited for any endpoint.

GET /v1/{dataset}/download/{dataset}.csv

The whole dataset in one file. Also .parquet. Series downloads add series and location columns.

  • CSV (text/csv) or Parquet (application/vnd.apache.parquet)
  • Supports Range requests (206)

Example: https://api.healthdata.dev/v1/overdose-deaths-county/download/overdose-deaths-county.csv

Errors: unknown-file , and rate-limited for any endpoint.

GET /v1/{dataset}/{path}

A file of a files dataset, at its published path.

  • The file, with a content type from its extension

Errors: unknown-file , and rate-limited for any endpoint.

Datasets

Drug overdose deaths by county Time series

Id
overdose-deaths-county
Updates
Monthly
Series
all-drugs
Columns
date month (YYYY-MM) , deaths integer, deaths , suppressed true / false , percent_pending number, %
What Path
Metadata: version, coverage, downloads, validation /v1/overdose-deaths-county
Versions and monthly snapshots /v1/overdose-deaths-county/versions
Series and locations /v1/overdose-deaths-county/locations
All drug overdose deaths (JSON) /v1/overdose-deaths-county/all-drugs/{location}.json
All drug overdose deaths (CSV) /v1/overdose-deaths-county/all-drugs/{location}.csv
Whole dataset (CSV) /v1/overdose-deaths-county/download/overdose-deaths-county.csv
Whole dataset (Parquet) /v1/overdose-deaths-county/download/overdose-deaths-county.parquet

Drug overdose deaths by state and drug Time series

Id
overdose-deaths
Updates
Monthly
Series
all-drugs, opioids, synthetic-opioids, heroin, natural-opioids, methadone, natural-opioids-methadone, all-opioids-excl-heroin, cocaine, psychostimulants, all-causes
Columns
date month (YYYY-MM) , deaths integer, deaths , predicted_deaths integer, deaths , percent_complete number, % , percent_pending number, % , pct_drugs_specified number, % , suppressed true / false , underreported true / false
What Path
Metadata: version, coverage, downloads, validation /v1/overdose-deaths
Versions and monthly snapshots /v1/overdose-deaths/versions
Series and locations /v1/overdose-deaths/locations
All drug overdose deaths (JSON) /v1/overdose-deaths/all-drugs/{location}.json
All drug overdose deaths (CSV) /v1/overdose-deaths/all-drugs/{location}.csv
Opioids (T40.0-T40.4, T40.6) (JSON) /v1/overdose-deaths/opioids/{location}.json
Opioids (T40.0-T40.4, T40.6) (CSV) /v1/overdose-deaths/opioids/{location}.csv
Synthetic opioids other than methadone, mainly fentanyl (T40.4) (JSON) /v1/overdose-deaths/synthetic-opioids/{location}.json
Synthetic opioids other than methadone, mainly fentanyl (T40.4) (CSV) /v1/overdose-deaths/synthetic-opioids/{location}.csv
Heroin (T40.1) (JSON) /v1/overdose-deaths/heroin/{location}.json
Heroin (T40.1) (CSV) /v1/overdose-deaths/heroin/{location}.csv
Natural and semi-synthetic opioids, such as oxycodone (T40.2) (JSON) /v1/overdose-deaths/natural-opioids/{location}.json
Natural and semi-synthetic opioids, such as oxycodone (T40.2) (CSV) /v1/overdose-deaths/natural-opioids/{location}.csv
Methadone (T40.3) (JSON) /v1/overdose-deaths/methadone/{location}.json
Methadone (T40.3) (CSV) /v1/overdose-deaths/methadone/{location}.csv
Natural and semi-synthetic opioids and methadone (T40.2, T40.3) (JSON) /v1/overdose-deaths/natural-opioids-methadone/{location}.json
Natural and semi-synthetic opioids and methadone (T40.2, T40.3) (CSV) /v1/overdose-deaths/natural-opioids-methadone/{location}.csv
Natural, semi-synthetic and synthetic opioids and methadone (T40.2-T40.4) (JSON) /v1/overdose-deaths/all-opioids-excl-heroin/{location}.json
Natural, semi-synthetic and synthetic opioids and methadone (T40.2-T40.4) (CSV) /v1/overdose-deaths/all-opioids-excl-heroin/{location}.csv
Cocaine (T40.5) (JSON) /v1/overdose-deaths/cocaine/{location}.json
Cocaine (T40.5) (CSV) /v1/overdose-deaths/cocaine/{location}.csv
Psychostimulants with abuse potential, mainly methamphetamine (T43.6) (JSON) /v1/overdose-deaths/psychostimulants/{location}.json
Psychostimulants with abuse potential, mainly methamphetamine (T43.6) (CSV) /v1/overdose-deaths/psychostimulants/{location}.csv
Deaths from all causes (JSON) /v1/overdose-deaths/all-causes/{location}.json
Deaths from all causes (CSV) /v1/overdose-deaths/all-causes/{location}.csv
Whole dataset (CSV) /v1/overdose-deaths/download/overdose-deaths.csv
Whole dataset (Parquet) /v1/overdose-deaths/download/overdose-deaths.parquet

Health insurance coverage by county and state Time series

Id
uninsured
Updates
Yearly
Series
under-65, adults-18-64, children-under-19
Columns
date year (YYYY) , uninsured_pct number, % , uninsured_pct_moe number, % , uninsured integer, people , uninsured_moe integer, people , population integer, people , population_moe integer, people
What Path
Metadata: version, coverage, downloads, validation /v1/uninsured
Versions and monthly snapshots /v1/uninsured/versions
Series and locations /v1/uninsured/locations
People under 65 (JSON) /v1/uninsured/under-65/{location}.json
People under 65 (CSV) /v1/uninsured/under-65/{location}.csv
Adults 18 to 64 (JSON) /v1/uninsured/adults-18-64/{location}.json
Adults 18 to 64 (CSV) /v1/uninsured/adults-18-64/{location}.csv
Children under 19 (JSON) /v1/uninsured/children-under-19/{location}.json
Children under 19 (CSV) /v1/uninsured/children-under-19/{location}.csv
Whole dataset (CSV) /v1/uninsured/download/uninsured.csv
Whole dataset (Parquet) /v1/uninsured/download/uninsured.parquet