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 2597 mshttps://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 (March 10, 2023) 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 newhttps://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 any county's COVID-19 trends.
operationalhttps://www.plansafe.xyz/api/v1.2/covid/us/trends
Request parameters
state (string)
county (string)
month (integer)
day (integer)
year (integer)
Note: If no date is provided, the latest data (March 10, 2023) 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
yesterday_date Date one day prior
last_week_date Date one week prior
fatality_ratio_pct Fatality rate as a percentage of the infected
fatality_ratio_daily_change Change in fatality ratio from previous day
fatality_ratio_weekly_change Change in fatality ratio from previous week
per_100k Incidence rate per 100,000 people (scaled for the county)
per_100k_daily_change Change in per 100k rate from previous day
per_100k_weekly_change Change in per 100k rate from previous week
total_confirmed_cases Total confirmed COVID-19 cases in the county
total_cases_daily_change Absolute change in cases from previous day
total_cases_daily_pct_change Percent change in cases from previous day
total_cases_weekly_change Absolute change in cases from previous week
total_cases_weekly_pct_change Percent change in cases from previous day
total_deaths Total COVID-19 deaths in the county
total_deaths_daily_change Absolute change in deaths from previous day
total_deaths_daily_pct_change Percent change in deaths from previous day
total_deaths_weekly_change Absolute change in deaths from previous week
total_deaths_weekly_pct_change Percent change in deaths from previous day
fatality_ratio_weekly_change Change in fatality ratio from previous week
per_100k_weekly_change Change in per 100k rate from previous week
total_cases_daily_pct_change Percent change in cases from previous day
total_cases_weekly_change Absolute change in cases from previous week
total_cases_weekly_pct_change Percent change in cases from previous day
total_deaths_daily_pct_change Percent change in deaths from previous day
total_deaths_weekly_change Absolute change in deaths from previous week
total_deaths_weekly_pct_change Percent change in deaths from previous day
Get a county's COVID-19 status in words.
operationalhttps://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 (March 10, 2023) will be returned.
Response fields
words A couple sentences summarizing the COVID-19 situation in the county.
Get a county's CDC profile.
operational newhttps://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
COVID-19 data for Cabarrus County, North Carolina as of March 10, 2023
GET https://www.plansafe.xyz/api/v1.2/covid/us?state=nc&county=cabarrus
LIVE 2597 ms{
"FIPS": 37025,
"active_cases": 71756,
"county": Cabarrus,
"date": 2023-03-10 04:21:03,
"fatality_ratio_pct": 0.7839829653084082,
"per_100k": 33412.79631143944,
"state": North Carolina,
"total_confirmed_cases": 72323,
"total_deaths": 567
}
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
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
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