Summary: Get historical COVID-19 data for a country Operation ID: getHistoricalCountry Auth: none
Returns historical time-series COVID-19 data for a specific country, or for provinces/states within that country. This endpoint provides day-by-day breakdowns of cases, deaths, and recoveries over time. When the country has province-level data (like US states or Chinese provinces), the response includes a `province` field and `timeline` object for each region. This is essential for building country-specific trend charts or analyzing regional differences within a nation.
Original spec description
Returns historical time series data for a specific country or province.
Usage Tips
- Can query by country name, ISO2, or ISO3: /historical/USA, /historical/US, /historical/United%20States
- For countries with provinces/states, returns an array of objects each with province name and timeline
- Use `lastdays=all` for complete history, `lastdays=7` for recent week
- The `timeline` object contains three date-indexed objects: cases, deaths, recovered
- For US state historical data, pass the state name as a province parameter or use /historical/USA
Parameters (2)
country(string, path, required)
Country name, ISO2, ISO3, or province name. Use comma-separated values for multiple countries.
lastdays(string, query, optional, default: 30)
Number of days to return. Use 'all' for full history or a number (default: 30)