Logo

Plansafe COVID-19 Data Platform

A free set of simple APIs for granular, county-level COVID-19 and CDC data.

Get any county's COVID-19 data.

operational 3422 ms
https://www.plansafe.xyz/api/v1.2/covid/us

Request parameters

state (string)
county (string)
month (integer)
day (integer)
year (integer)

Note: If no county is provided, data for all counties in the state will be returned.

Note: If no date is provided, the latest data will be returned.

Response fields

FIPS County FIPS ID
county Name of the county
state Name of the state
date Date at which data was reported to source
fatality_ratio_pct Fatality rate as a percentage of the infected
per_100k Incidence rate per 100,000 people (scaled for the county)
total_confirmed_cases Total confirmed COVID-19 cases in the county
total_deaths Total COVID-19 deaths in the county
active_cases Current number of active COVID-19 cases in the county

Get a county's COVID-19 vaccination data.

operational new
https://www.plansafe.xyz/api/v1.2/covid/us/vaccine

Request parameters

state (string)
county (string)

Response fields

county Name of the county
state Name of the state
date Date at which data was reported to source
full_vacc_pct* Percent of eligible county population that have completed COVID-19 vaccination
initiated_vacc_pct* Percent of eligible county population with at least one COVID-19 vaccine dose

*Only if available.

Get a county's COVID-19 status in words.

operational
https://www.plansafe.xyz/api/v1.2/covid/us/words

Request parameters

state (string)
county (string)
month (integer)
day (integer)
year (integer)

Note: If no date is provided, the latest data will be returned.

Response fields

words A couple sentences summarizing the COVID-19 situation in the county.

Get a county's CDC profile.

operational new
https://www.plansafe.xyz/api/v1.2/covid/us/info

Request parameters

state (string)
county (string)

Response fields

county Name of the county
state Name of the state
population Date at which data was reported to source
population_density Population density (people per sq. mile)
household_size Average household size
pct_uninsured Percent of county population uninsured
pct_poverty Percent of county population living in poverty
pct_65_older Percent of county population over 65 years old
cdc_sv_index CDC Social Vulnerability Index (SVI)
cdc_ccv_index COVID-19 Community Vulnerability Index (CCVI)
metro_class Metropolitan Classification
nchs_class NCHS Urban/Rural Classification

Example requests/responses

Today's COVID-19 data for Cabarrus County, North Carolina

GET https://www.plansafe.xyz/api/v1.2/covid/us?state=nc&county=cabarrus
LIVE 3422 ms
{
"FIPS": 37025,
"active_cases": 21995,
"county": Cabarrus,
"date": 2021-06-20 04:21:48,
"fatality_ratio_pct": 1.1727174694464415,
"per_100k": 10282.139771682536,
"state": North Carolina,
"total_confirmed_cases": 22256,
"total_deaths": 261
}

Nov. 14, 2020 COVID-19 data for Harris County, Texas

GET https://www.plansafe.xyz/api/v1.2/covid/us?state=tx&county=harris&month=11&day=14&year=2020

Today's COVID-19 data for all counties in California

GET https://www.plansafe.xyz/api/v1.2/covid/us?state=ca

Jan. 6, 2021 COVID-19 data for all counties in North Dakota

GET https://www.plansafe.xyz/api/v1.2/covid/us?state=nd&month=1&day=6&year=2021

Today's COVID-19 trends for Champaign County, Illinois

GET https://www.plansafe.xyz/api/v1.2/covid/us/trends?state=il&county=champaign

A paragraph describing the latest COVID-19 situation for Essex County, Massachusetts

GET https://www.plansafe.xyz/api/v1.2/covid/us/words?state=ma&county=essex

The latest COVID-19 vaccination statistics for Santa Clara County, California

GET https://www.plansafe.xyz/api/v1.2/covid/us/vaccine?state=ca&county=santa%20clara

Sample implementations

Python

import requests
url = "https://www.plansafe.xyz/api/v1.2/covid/us"
params = {"state":"tx", "county":"harris"}
res = requests.get(url, params=params)
res.json()

JavaScript

let api_endpoint = new URL('https://www.plansafe.xyz/api/v1.2/covid/us');
api_endpoint.search = new URLSearchParams({
 state: "tx",
 county: "harris"
});

fetch(api_endpoint)
 .then(function(response) {
  if(response.ok) {
   response.json().then(function(data) {
    console.log(data)
   });
  } else {
   console.log("response failed");
  }
 });

What is this API for?

If you want comprehensive COVID-19 data for any county in the United States, this endpoint can help your efforts. You can leverage this API to gain information from any day about a county's COVID-19 situation. Plenty of APIs already exist for cumulative nationwide and statewide data, but this API aims to provide the same level of information at a greater granularity. In addition, support for vaccination statistics is now present for all counties in the United States. Get the latest (or historical) COVID-19 trends, numbers, and summaries to your application in no time. Happy building.

Sources

Data is consolidated from a multitude of individual territory, state, and county dashboards as well as the COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University. In addition, data is sourced from the Center for Disease Control (CDC) as well as other sources on the web. Learn more about sources in our data explanation page.

Version history

v1.2 (2/21/2021) - moved to query parameters only

v1.1 (1/24/2021) - changed endpoint (considerable speed improvements due to caching)

v1.0 (12/9/2020) - initial version

Read about it

Issues?