TL;DR
The COVID Tracking Project API (archived) provides the most comprehensive historical record of COVID-19 testing, hospitalizations, and outcomes for all 50 US states, DC, and US territories from January 2020 through March 2021 when the project concluded. Data was collected daily directly from state health department websites and includes positive/negative tests, hospitalizations (including ICU and ventilators), deaths, and total tests. While the project is no longer actively updating, the historical dataset remains available and is invaluable for retrospective analysis, modeling, and visualization.
Quick start: https://api.covidtracking.com/v1/us/current.json
No API key needed — just make a request!
How to Use This API
1. Current US National Totals
https://api.covidtracking.com/v1/us/current.json
2. Current Data for a Specific State
https://api.covidtracking.com/v1/states/ca/current.json
3. Daily Historical for US
https://api.covidtracking.com/v1/us/daily.json
4. JavaScript — State Comparison
fetch('https://api.covidtracking.com/v1/us/current.json')
.then(r => r.json())
.then(d => {
console.log('US Total Cases:', d[0].positive);
console.log('Hospitalized:', d[0].hospitalizedCurrently);
console.log('Deaths:', d[0].death);
console.log('Tests:', d[0].totalTestResults);
});
5. Python — State Trends
import requests
# Get daily NY data for Jan 2021
resp = requests.get('https://api.covidtracking.com/v1/states/ny/daily.json')
data = resp.json()
for day in data[:30]:
print(f"{day['date']}: +{day.get('positiveIncrease', 0):,} cases, "
f"{day.get('hospitalizedCurrently', 0):,} hospitalized")
https://api.covidtracking.com/v1/us/current.json
API Details
- API URL
https://api.covidtracking.com/v1- Documentation
- covidtracking.com/data/api
- Category
- Health
- Authentication
- Not Required
- Geographic Coverage
- USA — 50 states plus DC and territories
Frequently Asked Questions
- Is this API still active?
- The COVID Tracking Project ended data collection on March 7, 2021. The API remains available as a static historical archive, but no new data is added.
- What data fields are available per state?
- Fields include:
positive,negative,hospitalizedCurrently,inIcuCurrently,onVentilatorCurrently,death,totalTestResults,recovered, and daily increases likepositiveIncrease. - What date range does the data cover?
- Data runs from January 2020 through March 7, 2021. Historical daily data is available for both national and state levels.
- How are state abbreviations used?
- Use lowercase two-letter state codes:
cafor California,nyfor New York,txfor Texas, etc. The/v1/statesendpoint lists all available states. - What format is the data in?
- JSON format with one object per day or per state. Daily endpoints return arrays sorted by date (YYYYMMDD format in the
datefield).
What You Can Build
- COVID-19 timeline visualization for the US pandemic
- State-by-state comparison dashboard
- Hospitalization capacity analysis over time
- Testing positivity rate trend calculator
- Academic research dataset for epidemiological modeling