Data API

IMPORTANT NOTE: We have changed our data structure and are no longer supporting this API

The Tracker data API was published as part of the Oxford COVID-19 Government Response Tracker project. The underlying data structure has been updated and we are no longer actively maintaining this API, so this may break at any point. Please visit the project's Github repository to get the latest data.

Deprecated API endpoints

By country over time

The endpoints were updated on 28 April 2020.

This endpoint provides JSON by with country stringency data, confirmed cases and deaths on a day by day basis as collected by our data collection team. The stringency_actual field is the daily calculated data. The stringency field is a convenience field for visualisations which holds previous day data (up to 7 days) if data in unavailable for a given day.

Endpoint

https://covidtrackerapi.bsg.ox.ac.uk/api/stringency/date-range/{YYYY-MM-DD}/{YYYY-MM-DD} (deprecated)
https://covidtrackerapi.bsg.ox.ac.uk/api/v2/stringency/date-range/{YYYY-MM-DD}/{YYYY-MM-DD}
where last two values represent start and end dates

Response

{
  scale: Object //Scale for visualisations
    {
      deaths: Object, //Min and max int values in returned data
      confirmed: Object, //Min and max int values in returned data
      stringency: Object, //Min and max int values in returned data
    },
  countries:
    [
       Array of Strings //3 letter country codes in returned data
    ],
  data: {
    YYYY-MM-DD: {  //Key is date in YYYY-MM-DD format
      BRA: {  //3 letter country code
        date_value: YYYY-MM-DD, //Repeat of date in key
        country_code: BRA, //Repeat of country code in key
        confirmed: Integer, //Value of confirmed cases
        deaths: Integer, //Value of deaths
        stringency_actual: Integer, //Calculated value for day. Can be null if no value available
        stringency: Integer, //Display value for day **1.
        stringency_legacy: Integer, //Legacy calculation of stringency used until 28 April 2020,
        stringency_legacy_disp: Intenger, //Legacy display value for day (**1) used until 28 April 2020
      }
    }
  }
}

**1 Will be actual value if available. For previous 7 days will take last available value. Otherwise null.
1Choose a date range
2Copy the link provided
3Recommended citation for data
Hale, Thomas, Sam Webster, Anna Petherick, Toby Phillips, and Beatriz Kira (2020). Oxford COVID-19 Government Response Tracker, Blavatnik School of Government. Data use policy: Creative Commons Attribution CC BY standard.

Country data for a specific day

The endpoints were updated on 28 April 2020. You may want to migrate to Version 2.

This endpoint provides JSON for a requested country/date combination

Endpoint

https://covidtrackerapi.bsg.ox.ac.uk/api/stringency/actions/{ALPHA-3}/{YYYY-MM-DD} (deprecated)
https://covidtrackerapi.bsg.ox.ac.uk/api/v2/stringency/actions/{ALPHA-3}/{YYYY-MM-DD}
where last two values represent an ISO 3166-1 alpha-3 country code and a date

Response

{
  policyActions: {
    0...n: {  //Numerical key
      policy_type_code: String, //Policy type 2 or 3 digit code - letter/number - or NONE if no data available
      policy_type_display: String, //String describing policy value,
      policyvalue: Integer, //Represents policy status
      is_general: Boolean, //If this is a general policy,
      flagged: Boolean, //Replaces isgneral from 28 April 2020,
      policy_value_display_field: String, //Describes the level of stringency of the policy or type of policy
      notes: String, //Notes entered by contributors
    }
  },
  stringencyData: {
    date_value: String, //YYYY-MM-DD date of record
    country_code: String, //ALPHA-3 country code
    confirmed: Integer, //Recorded confirmed cases,
    deaths: Integer, //Recorded deaths,
    stringency_actual: Integer, //Calculated stringency
    stringency: Integer, //Display stringency - see notes **1 above
  }
}

Download CSV

This data can also be downloaded as a CSV file. Please refer to the 'Data' section on our project page