# World Bank API

> Returns World Bank indicator values, country and aggregate details, indicator metadata and per-year snapshots across all countries.

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

World Bank projects and operations, newest approval first, filtered by country or a text query: loans, grants and their sectors.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | no | ISO 3166 alpha-2 country code, such as ID, to list the projects of one country. (e.g. ID) |
| `query` | string | no | Text to find in a project's name or description, such as education. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 5) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `agency` (string), `approvedDate` (string), `borrower` (string), `closingDate` (string), `country` (string), `grantUsd` (integer (int64)), `ibrdUsd` (integer (int64)), `id` (string), `idaUsd` (integer (int64)), `name` (string), `region` (string), `sector` (string), `totalUsd` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/worldbank/projects?country=ID&limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/project

One World Bank project or operation by its id, such as P515028: country, amounts, approval and closing dates, borrower and sectors.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | World Bank project id, such as P515028. (e.g. P515028) |
| `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: `agency` (string), `approvedDate` (string), `borrower` (string), `closingDate` (string), `country` (string), `grantUsd` (integer (int64)), `ibrdUsd` (integer (int64)), `id` (string), `idaUsd` (integer (int64)), `name` (string), `region` (string), `sector` (string), `totalUsd` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/worldbank/project?id=P515028" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/indicator

Values of one indicator for one country, 50 per page, newest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | yes | ISO 2 or 3 letter country code, such as US or USA, or an aggregate such as WLD. (e.g. ID) |
| `indicator` | string | yes | Indicator code, such as NY.GDP.MKTP.CD for GDP in current US dollars. (e.g. NY.GDP.MKTP.CD) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `date` (string), `value` (number (double) | null)

```bash
curl "https://api.hoshime.com/v1/worldbank/indicator?country=ID&indicator=NY.GDP.MKTP.CD" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/country

One country or aggregate: its names, region, income level and capital.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | yes | ISO 2 or 3 letter country code, such as US or USA. (e.g. ID) |
| `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: `capitalCity` (string), `code` (string), `incomeLevel` (string), `iso2` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `region` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/country?country=ID" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/countries

Every country and regional aggregate the World Bank lists, with region and income level, 50 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `capitalCity` (string), `code` (string), `incomeLevel` (string), `iso2` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `region` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/countries" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/snapshot

One indicator for every country and aggregate, in one year or all years, 50 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `indicator` | string | yes | Indicator code, such as NY.GDP.MKTP.CD for GDP in current US dollars. (e.g. NY.GDP.MKTP.CD) |
| `year` | integer | no | Year to return. Omit it for every year the indicator covers. (e.g. 2024) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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), `date` (string), `value` (number (double) | null)

```bash
curl "https://api.hoshime.com/v1/worldbank/snapshot?indicator=NY.GDP.MKTP.CD&year=2024" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/indicators

The indicators the World Bank publishes, 50 per page, or those of one topic.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `topic` | integer | no | Topic id from the topics endpoint, such as 1 for Agriculture & Rural Development. Omit it for every indicator. (e.g. 1) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `id` (string), `name` (string), `source` (string), `sourceId` (string), `sourceNote` (string), `sourceOrganization` (string), `topics` (Topic[]), `topics[].id` (string), `topics[].name` (string), `topics[].sourceNote` (string), `unit` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/indicators?topic=1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/indicatorInfo

One indicator: its name, unit, source, what it measures and its topics.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `indicator` | string | yes | Indicator code, such as NY.GDP.MKTP.CD for GDP in current US dollars. (e.g. NY.GDP.MKTP.CD) |
| `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: `id` (string), `name` (string), `source` (string), `sourceId` (string), `sourceNote` (string), `sourceOrganization` (string), `topics` (Topic[]), `topics[].id` (string), `topics[].name` (string), `topics[].sourceNote` (string), `unit` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/indicatorInfo?indicator=NY.GDP.MKTP.CD" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/topics

The World Bank's topics, such as Agriculture & Rural Development, with what each covers.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `id` (string), `name` (string), `sourceNote` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/topics" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/sources

The databases the World Bank's indicators come from, such as World Development Indicators, 50 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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), `dataAvailable` (boolean), `description` (string), `id` (string), `metadataAvailable` (boolean), `name` (string), `updateDate` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/sources" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/worldbank/classes

The World Bank country groupings of one kind: regions, income levels or lending types.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `kind` | string | yes | Grouping to list: region, incomeLevel or lendingType. (one of region, incomeLevel, lendingType; e.g. incomeLevel) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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), `id` (string), `name` (string)

```bash
curl "https://api.hoshime.com/v1/worldbank/classes?kind=incomeLevel" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
