The COVID Tracking Project API changes
The COVID Tracking Project API changes
covidtracking.com

New field: hospitalizedDischarged

We have added a new field, hospitalizedDischarged for several states. More states will be added as we get data:

  • AZ
  • CO
  • CT
  • IN
  • KS
  • NC
  • NJ
  • NY
  • RI
  • VA

It’s Time: The COVID Tracking Project Will Soon Come to an End

After a year of collecting, analyzing, and interpreting COVID-19 data for the United States, we’re ending our data compilation work in early March. The existing API will continue to work until May 2021, but will only include data up to May 7.

Deprecating state grades

As part of a move to a new assessment process, we are officially deprecating the field dataQualityGrade from our state endpoints. The new state assessment data will be available by February 5 from our data downloads page.

On February 15, we will null out the dataQualityGrade field.

Announcing Version 2 of our API

As the COVID Tracking Project approaches our first year, we have been learning-while-doing with building our API. Our API powers thousand of applications, with millions of users per month, and is core to our mission to provide the most accurate and timely data about COVID in the US to a wide audience.

Our current API is a flat, CSV-file like endpoint, with very little flexibility to add new fields or remove old deprecated ones. Because it was so quickly adopted, we were unable to change these fields around without breaking applications.

Today, we are announcing a beta of version 2 of our API with the following features:

  • Every datapoint includes calculations like percents of population and seven-day averages where appropriate. This can be turned off by requesting a “simple” endpoint
  • Endpoints return data in a structured format of categories. For example, instead of hospitalizedCumulative, use outcomes.hospitalized.total
  • Human-readable field titles are included with every endpoint. For example, the states daily endpoint includes definition for outcomes.hospitalized.total: Cumulative hospitalized/Ever hospitalized
  • All annotations or warnings are included in the state’s metadata

These features were built against an RFP that got considerable public and private feedback from select API users.

Will the “v1” API change or go down?

No. We will never take offline or remove features from the v1 API. We may still change deprecated fields as we always have.

When will the v2 API be available?

It is available now, but all URLs are prefixed with /v2beta. We will take it out of beta on February 15.

How can I provide feedback?

Feel free to contact us with any questions or concerns (select "API in the dropdown) about the new API.

Removing negative test results from various states

We are removing negatives that were created from mixed units (specimens minus cases or test encounters minus cases) for states that are using explicit totals in totalTestResults.

As of January 27, 2021, these states will have a null value for negative.

National recovered field is now deprecated

Per our announcement on November 18, 2020 the national recovered field in the US endpoints is now deprecated and all US recovered values are now null.

Deprecation of state URLs

On December 28, we will be deprecating the following fields in the States metadata endpoints:

  • covid19Site
  • covid19SiteOld
  • covid19SiteSecondary
  • covid19SiteTertiary
  • covid19SiteQuaternary
  • covid19SiteQuinary

Deprecation of national recovered data

On December 2, 2020 we will officially deprecate the recovered field in our national endpoints (i.e. https://api.covidtracking.com/v1/us/daily.json).

As of January 8, 2021, this field returns null.

Learn more about why we are deprecating national recovered data.

Deprecation of the public spreadsheet

Since the COVID Tracking Project started in March, we have been collating and publishing our data in the form of a single Google Sheet. Our API and website both used that sheet to publish all our core dataset. As our data collection effort has matured, we have built new tools to improve our publishing process. To that end, all of our API and website data are now based on an improved publishing system that no longer uses Google sheets.

However, people have been using our public sheets to import our data in ways that were never intended. We only support pulling data through our API. Supporting users whose apps broke because we changed the public sheet has had a significant impact on our support teams.

We encourage anyone who is using the public sheet for importing data to switch to our API, or import the CSV files available from our download page. As of November 30, the sheet will be static and no longer get new rows or columns, and on December 24, it will be taken offline.

States: Deprecation of totalTestResultsSource

The field totalTestResultsSource in the states/daily endpoints are now marked as deprecated, and will return null in two weeks.

Instead you should use the field totalTestResultsField in the states/info endpoint to find out what field is used to compute for totalTestResults.