---
title: World Bank Economic Indicators API
slug: world-bank-economic-indicators
url: https://apyhub.com/martin10291/service/world-bank-economic-indicators
provider: Martin Petrov
categories: [Retrieval Kit]
tags: [world-bank-data, economic-indicators, gdp-by-country, country-comparison, macroeconomics, country-ranking]
auth: api_key
version: 1.0
service_type: sync
endpoints: 1
atoms: 100
mcp: true
---

# World Bank Economic Indicators API

World Bank economic indicators API: send countries and indicators, get GDP, population and inflation by year, rank or comparison. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/martin10291/world-bank-economic-indicators` | What it does Queries World Bank economic indicators and returns a JSON object with a row count and… | 100 |

## Endpoint reference

### World Bank Economic Indicators API

`POST https://api.eu.apyhub.com/martin10291/world-bank-economic-indicators` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `mode` | body | string | no | What to return: latest, history, rank, compare, search or countries. One of: latest, history, rank, compare, search, countries. Default: `latest`. Example: `latest`. |
| `year` | body | integer | no | For rank: the year to rank. Default: the latest year where at least half of the reporting countries have data. Example: `2020`. |
| `limit` | body | integer | no | Maximum rows returned. Default: `20`. Example: `20`. |
| `order` | body | string | no | For rank: sort direction. desc puts the highest value first. One of: desc, asc. Default: `desc`. Example: `desc`. |
| `query` | body | string | no | For search: the words to find. Only CC BY 4.0 indicators are returned. Example: `gdp per capita`. |
| `region` | body | string | no | For rank: only countries of this World Bank region. Example: `Europe & Central Asia`. |
| `toYear` | body | integer | no | For history and compare: the last year. Default: the latest year. Example: `2020`. |
| `fromYear` | body | integer | no | For history and compare: the first year. Range 1960 to 2027. Default: 20 years ago. Example: `2010`. |
| `countries` | body | array of string | no | ISO2 codes, ISO3 codes or English names. Groups such as WLD, EUU and HIC also work. Max 20 items. Example: `["US","DE"]`. |
| `indicators` | body | array of string | no | World Bank codes or plain words such as gdp or inflation. Max 10 items. rank and compare use the first one. Example: `["gdp","population"]`. |
| `incomeGroup` | body | string | no | For rank: only countries of this income group. Example: `High income`. |
| `includeAggregates` | body | boolean | no | For rank and countries: also include groups such as World or Euro area. Example: `false`. |

#### Quickstart

Get the newest population figure for two countries.

```bash
curl -X POST "https://api.eu.apyhub.com/martin10291/world-bank-economic-indicators" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"latest","countries":["US","DE"],"indicators":["population"]}'
```

#### What you'll get back

Returns a JSON object with a `count` integer and an `items` array. Each item is one country and indicator, with the latest value, the change versus the year before, and the source and licence.

```json
{
  "count": 2,
  "items": [
    {
      "change": 1781060,
      "changePct": 0.5238,
      "country": "United States",
      "dataUpdated": "2026-11-11",
      "fetchedAt": "2026-12-01T06:50:18Z",
      "incomeGroup": "High income",
      "indicator": "SP.POP.TOTL",
      "indicatorName": "Population, total",
      "iso2": "US",
      "iso3": "USA",
      "license": "CC BY 4.0",
      "licenseUrl": "https://datacatalog.worldbank.org/public-licenses#cc-by",
      "previousValue": 340003797,
      "previousYear": 2024,
      "region": "North America",
      "source": "World Bank, World Development Indicators (CC BY 4.0)",
      "sourceUrl": "https://data.worldbank.org/indicator/SP.POP.TOTL",
      "stale": false,
      "unit": "people",
      "value": 341784857,
      "year": 2025
    }
  ]
}
```

## About

## What it does

The World Bank Economic Indicators API returns country data from the World Bank, such as GDP, population, inflation, unemployment and life expectancy. Send a `mode`, plus the countries and indicators you want, and get back rows with the value, the year, the region and the income group. Every row names its source and its CC BY 4.0 licence.

Pick what you get with `mode`. `latest` returns the newest value per country and indicator, with the change from the year before. `history` returns one row per year between `fromYear` (1960 or later) and `toYear`. `rank` sorts countries by one indicator for one `year`, and you can filter by `region` or `incomeGroup`. `compare` measures growth between two years, with the total change, the yearly growth rate, the lowest value and the highest value. `search` finds indicator codes from the words in `query`. `countries` lists the countries, and with `includeAggregates` it also lists groups such as World or Euro area.

Send up to 20 countries and up to 10 indicators per call. Name countries by ISO2 code, ISO3 code or English name, and indicators by World Bank code or plain words such as `gdp`. Use `limit` (1 to 100, default 20) to cap the rows.

Teams use this World Bank economic indicators API for country dashboards, macroeconomic research, country comparisons and automated reports.

Data comes from the World Bank, World Development Indicators. AI agents can call it through ApyHub MCP.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/martin10291/service/world-bank-economic-indicators
