Overview
The Covid Tracking Project (CTP) was a volunteer-led initiative launched in 2020 to collect and publish comprehensive data on the COVID-19 pandemic in the United States. Recognizing a gap in consistent public health reporting during the initial phase of the pandemic, the project aimed to provide a centralized, daily updated source of information from state and territorial health authorities. The CTP API serves as a programmatic interface to this extensive dataset, which includes metrics such as confirmed cases, deaths, hospitalizations, and testing figures at a state level.
The API is particularly well-suited for academic research and public health analysis, offering granular historical data that can be used to model disease spread, analyze policy impacts, or conduct epidemiological studies. Journalists and reporters frequently utilized the data for accurate and consistent reporting during the pandemic, and it continues to be a resource for retrospective analysis. Data scientists can integrate the API into their projects for various applications, including dashboard creation, predictive modeling, and data visualization. The project officially ceased active data collection on March 7, 2021, as government agencies assumed more consistent data reporting. However, the entire historical dataset remains accessible via the API and data exports, ensuring its continued utility as a historical record of the pandemic's early stages in the US.
The project's commitment to open data and public accessibility meant that all data and the API itself were provided entirely free of charge, reflecting its non-profit, public service mission. This approach distinguished it from some commercial data providers and facilitated widespread use across various sectors. The data collection methodology involved daily review of official state health department websites, press releases, and public dashboards, followed by standardized input into their database. This manual collection and harmonization process aimed to create a consistent time series across disparate state reporting formats. While the project is no longer actively updating data, its historical archive represents a significant contribution to understanding the pandemic's progression in the US. For instance, researchers can compare CTP data on testing rates with broader pandemic trends documented by organizations like Our World in Data to contextualize regional impacts.
Key features
- State-level COVID-19 Data API: Provides programmatic access to daily historical data for all 50 US states, the District of Columbia, and five US territories.
- Comprehensive Metrics: Includes data points such as positive cases, negative tests, hospitalized currently, hospitalized cumulative, in ICU currently, in ICU cumulative, on ventilators currently, on ventilators cumulative, recovered, and deaths.
- JSON and CSV Formats: Data is available in both JSON and CSV formats for flexible integration into various applications and analysis tools.
- Historical Data Archives: Offers a complete archive of data collected from March 2020 to March 2021, preserving the early evolution of the pandemic's impact in the US.
- Data Visualizations: Provides charts and graphs on the website to visualize key trends and allow for quick data exploration without direct API calls.
- Bulk Data Exports: Facilitates download of entire datasets or specific subsets in CSV format for offline analysis and integration into larger data science projects.
- Well-Documented API: Features clear documentation for endpoints, parameters, and data structures, aiding developers in quick implementation, as detailed in the Covid Tracking Project API documentation.
Pricing
The Covid Tracking Project dataset and API are entirely free to use. There are no subscription fees, usage limits, or hidden costs associated with accessing the historical COVID-19 data.
| Feature | Cost | Notes |
|---|---|---|
| API Access | Free | Access to all historical state-level COVID-19 data. |
| Data Downloads | Free | Bulk CSV exports of the entire dataset. |
| Usage Limits | None specified | Designed for open and unlimited public access. |
Pricing as of 2026-05-28. For details, refer to the Covid Tracking Project API documentation.
Common integrations
- Data Visualization Tools: Integrate with tools like Tableau, Power BI, or d3.js to create custom dashboards and charts showing COVID-19 trends.
- Statistical Computing Environments: Utilize with R or Python for advanced statistical analysis, epidemiological modeling, and machine learning applications.
- Web and Mobile Applications: Incorporate historical data into educational apps, news aggregators, or public health information portals.
- Research Databases: Populate local or institutional databases with harmonized COVID-19 data for long-term research projects.
- Geographic Information Systems (GIS): Combine with mapping platforms like ESRI ArcGIS to visualize geographic spread and impact of the pandemic.
Alternatives
- Our World in Data: Offers global COVID-19 data, including cases, deaths, testing, and vaccinations, often with visualizations and research articles.
- Johns Hopkins University CSSE COVID-19 Data: Provides a widely-used global dataset, including confirmed cases, deaths, and recoveries, often organized by country and state/province.
- Centers for Disease Control and Prevention (CDC): The official US government source for public health data, including COVID-19 cases, deaths, and hospitalizations, with regular updates and detailed reports.
Getting started
To get started with the Covid Tracking Project API, you can use a simple Python script to fetch daily data for all states. The API is RESTful and publicly accessible without authentication. Here's an example using the requests library:
import requests
import json
# Define the API endpoint for daily state data
api_url = "https://api.covidtracking.com/v1/states/daily.json"
try:
# Make the GET request to the API
response = requests.get(api_url)
response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
# Parse the JSON response
data = response.json()
# Print the first 5 entries to demonstrate the data structure
print(f"Successfully fetched {len(data)} entries. Displaying first 5:")
for entry in data[:5]:
print(json.dumps(entry, indent=2))
# Example: Find data for a specific state on a specific date
# Note: Dates are in YYYYMMDD format
state_code = "NY"
date_string = "20210307" # Last day of active data collection
ny_data_on_date = [item for item in data if item.get('state') == state_code and item.get('date') == int(date_string)]
if ny_data_on_date:
print(f"\nData for {state_code} on {date_string}:")
print(json.dumps(ny_data_on_date[0], indent=2))
else:
print(f"\nNo data found for {state_code} on {date_string}")
except requests.exceptions.RequestException as e:
print(f"Error fetching data: {e}")
except json.JSONDecodeError:
print("Error decoding JSON response.")
This Python script connects to the /v1/states/daily.json endpoint, fetches all available daily state-level data, and then prints the first few entries to the console. It also includes an example of how to filter for data from a specific state on a particular date. For more options and specific endpoints, consult the Covid Tracking Project API documentation.