Covid-19 Government Response API

Health / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

The Covid-19 Government Response API tracks policy measures taken by governments worldwide during the pandemic, such as lockdowns, travel restrictions, and vaccination campaigns. Data is sourced from Oxford University's Blavatnik School of Government and is updated regularly. It is a great free resource for researchers, students, and developers building public health dashboards.

💡

Beginner Tip

This dataset uses a CSV/spreadsheet format rather than a typical JSON REST API, so you may need to parse or convert the data before using it in your app.

Available Data

track name and artist
album metadata
audio preview URLs
popularity score
genre classification
case counts and statistics

Example Response

JSON Response
{
  "name": "Bohemian Rhapsody",
  "artist": "Queen",
  "album": "A Night at the Opera",
  "duration_ms": 354000,
  "popularity": 92,
  "preview_url": "https://p.scdn.co/mp3-preview/..."
}

Field Reference

CountryName Full name of the country for the data row.
CountryCode ISO 3166-1 alpha-3 country code (e.g., USA, GBR).
Date Date of the observation in YYYYMMDD format.
StringencyIndex Composite index (0-100) of overall policy stringency across all tracked measures.
C1_School closing Ordinal value indicating school closure policy level (0 = no measures, 3 = require closing all levels).

Implementation Example

const url = "https://covidtracker.bsg.ox.ac.uk/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Large file download timeout The dataset file can be several megabytes; slow connections may time out.
Use streaming downloads or download the file in a background job, then process it locally.
CSV parsing errors Some fields may contain commas within quoted strings, causing naive parsers to misread columns.
Use a proper CSV parsing library (e.g., PapaParse in JS or the csv module in Python) that handles quoted fields correctly.
Stale data The dataset is updated periodically, not in real time.
Check the dataset's last-updated timestamp and cache locally to avoid hammering the source server.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 888ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Health
Difficulty Beginner
Verified: 2026-04-07

Similar APIs

View All →