# Our World in Data API

> Returns Our World in Data indicators by country: COVID-19 cases, deaths and vaccination, population, GDP per capita, CO2 emissions, internet use, HDI and fertility, as full series or the latest value for up to 25 countries.

Category: Government & Open Data. Region: global. 3 endpoints at `https://api.hoshime.com/v1/owid/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/owid
## GET /v1/owid/indicators

Search the Our World in Data indicators hoshime serves: COVID-19 cases, deaths and vaccination, population, GDP per capita, CO2 emissions, internet use, HDI and fertility.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Words to find in the title or description, such as covid or emissions. Omit to list all. (e.g. covid) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 50. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `id` (string), `license` (string), `source` (string), `title` (string), `unit` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/owid/indicators?query=covid" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/owid/indicator

Full time series of one Our World in Data indicator for one country or region, such as COVID-19 cases in Indonesia or CO2 per capita in Germany.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `indicator` | string | yes | Indicator id, such as covidCases, population or co2PerCapita. List them with indicators. (one of covidCases, covidDeaths, covidCasesPerMillion, covidDeathsPerMillion, covidWeeklyCases, covidWeeklyCasesPerMillion, covidVaccinatedShare, covidFullyVaccinatedShare, population, gdpPerCapita, co2Emissions, co2PerCapita, internetUsers, hdi, fertility; e.g. population) |
| `country` | string | yes | ISO 3166-1 alpha-3 code (IDN) or OWID country or region name (Indonesia, World, Europe). (e.g. IDN) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `code` (string), `country` (string), `description` (string), `id` (string), `license` (string), `points` (Point[]), `points[].period` (string), `points[].value` (number (double)), `source` (string), `title` (string), `unit` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/owid/indicator?indicator=population&country=IDN" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/owid/latest

Newest value of one Our World in Data indicator for up to 25 countries or regions at once, with the year or day of each value.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `indicator` | string | yes | Indicator id, such as covidCases, population or co2PerCapita. List them with indicators. (one of covidCases, covidDeaths, covidCasesPerMillion, covidDeathsPerMillion, covidWeeklyCases, covidWeeklyCasesPerMillion, covidVaccinatedShare, covidFullyVaccinatedShare, population, gdpPerCapita, co2Emissions, co2PerCapita, internetUsers, hdi, fertility; e.g. co2PerCapita) |
| `countries` | string | yes | Comma-separated ISO 3166-1 alpha-3 codes or names, up to 25, such as IDN,USA,India,World. (e.g. IDN,USA,IND) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `code` (string), `country` (string), `period` (string), `value` (number (double))

```bash
curl "https://api.hoshime.com/v1/owid/latest?indicator=co2PerCapita&countries=IDN%2CUSA%2CIND" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
