# Economic Indicators: World Bank & Eurostat (GDP, Inflation) (`nightwave-owner/global-economic-indicators`) Actor

Returns economic indicators (GDP, GDP growth, inflation, unemployment, population, government debt and any World Bank or Eurostat code) per country and year from the official World Bank and Eurostat APIs, one row per data point. Supports onlyNew for scheduled runs.

- **URL**: https://apify.com/nightwave-owner/global-economic-indicators.md
- **Developed by:** [Viktor Wiberg](https://apify.com/nightwave-owner) (community)
- **Categories:** Developer tools, AI, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 data points

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Economic Indicators: World Bank & Eurostat (GDP, Inflation)

GDP, GDP growth, inflation, unemployment, population, government debt and trade figures per country and year, from the official World Bank Indicators API and the Eurostat API. You get one row per country, indicator and period in the same schema whichever source the number comes from, ready for a spreadsheet, a database or an AI agent.

- Common names (`gdp`, `inflation`, `unemployment`) work out of the box, so you do not need to know that World Bank inflation is `FP.CPI.TOTL.ZG`.
- Any of the World Bank's indicator codes and any Eurostat dataset can be fetched as well.
- About 290 World Bank countries and aggregates (World, European Union, income groups) and Eurostat's European countries and EU or euro area totals.
- `onlyNew` turns the actor into a monitor: a scheduled run returns only figures published since the last run.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `indicators` | array | `["gdp", "inflation", "unemployment"]` | Common names, World Bank codes or Eurostat datasets. See the table below. |
| `countries` | array | `["SE", "US", "DE"]` | ISO2 (`SE`) or ISO3 (`SWE`). World Bank aggregates such as `WLD` (World) and `EUU` (European Union). With Eurostat also `EU27_2020` and `EA20`. |
| `yearFrom` | integer | end year minus 4 | First year. |
| `yearTo` | integer | current year | Last year. |
| `source` | string | `auto` | `auto`, `worldbank` or `eurostat`. See "Choosing a source". |
| `onlyNew` | boolean | `false` | Return only data points that earlier runs with the same input did not deliver. |
| `maxResults` | integer | `50` | Maximum number of data points (rows). 1 to 100 000. |

A run with empty input returns GDP, inflation and unemployment for Sweden, the United States and Germany for the last few years: 35 rows in our test run on 3 October 2026.

#### Common indicator names

| Name | World Bank code | Eurostat dataset |
|---|---|---|
| `gdp` | `NY.GDP.MKTP.CD` (current US$) | `nama_10_gdp`, B1GQ, million EUR |
| `gdp-growth` | `NY.GDP.MKTP.KD.ZG` (annual %) | `nama_10_gdp`, B1GQ, chain linked volumes, % change |
| `gdp-per-capita` | `NY.GDP.PCAP.CD` (current US$) | `nama_10_pc`, B1GQ, EUR per capita |
| `inflation` | `FP.CPI.TOTL.ZG` (consumer prices, annual %) | `prc_hicp_ainr`, HICP all items, annual average rate of change |
| `unemployment` | `SL.UEM.TOTL.ZS` (% of labour force, ILO estimate) | `une_rt_a`, age 15-74, % of labour force |
| `population` | `SP.POP.TOTL` | `demo_pjan`, population on 1 January |
| `government-debt` | `GC.DOD.TOTL.GD.ZS` (% of GDP) | `gov_10dd_edpt1`, general government gross debt, % of GDP |
| `exports` | `NE.EXP.GNFS.ZS` (% of GDP) | World Bank only |
| `imports` | `NE.IMP.GNFS.ZS` (% of GDP) | World Bank only |
| `current-account` | `BN.CAB.XOKA.GD.ZS` (% of GDP) | World Bank only |

Synonyms such as `CPI`, `HICP`, `GDP per capita`, `unemployment rate` and `public debt` are recognised.

#### Your own codes

- **World Bank:** any indicator code from [data.worldbank.org/indicator](https://data.worldbank.org/indicator), for example `NY.GDP.PCAP.PP.CD` (GDP per capita, PPP) or `SP.DYN.LE00.IN` (life expectancy).
- **Eurostat:** a dataset code from the [Eurostat data browser](https://ec.europa.eu/eurostat/databrowser/), optionally with filters as `dataset?dimension=CODE&dimension=CODE`. Example: `prc_hicp_minr?coicop18=TOTAL&unit=RCH_A` gives monthly inflation. Leave out `geo` and `time`, the actor sets them from `countries` and the years. If a dimension is left open you get one series per code, and the code's label is added to `indicatorName`.

#### Choosing a source

- `auto` (default): World Bank for every country, so the numbers are comparable worldwide and in the same unit. Eurostat is used only for areas the World Bank does not have, such as `EU27_2020` and `EA20`.
- `eurostat`: Eurostat only. Covers EU and EFTA countries and candidates, often has the previous year a few months earlier than the World Bank, and reports money in euro. Countries Eurostat does not cover return no rows.
- `worldbank`: World Bank only.

World Bank codes and Eurostat datasets always go to their own source.

Example input:

```json
{
  "indicators": ["inflation", "unemployment", "gdp-growth"],
  "countries": ["SE", "NO", "FI", "DK", "EU27_2020"],
  "source": "eurostat",
  "yearFrom": 2023,
  "maxResults": 50
}
```

### Output

| Field | Description |
|---|---|
| `country` | ISO2 code (`SE`), or the source's own code for aggregates (`EU27_2020`, `WLD`) |
| `countryIso3` | ISO3 code (`SWE`), `null` for Eurostat-only areas |
| `countryName` | Name as given by the source |
| `indicator` | The name or code you asked for (`inflation`, `NY.GDP.PCAP.PP.CD`) |
| `indicatorName` | Readable name |
| `sourceIndicator` | Exact code at the source, with Eurostat filters |
| `period` | `2025`, `2025-08` (monthly) or `2025-Q2` (quarterly) |
| `year` | Year as a number |
| `frequency` | `annual`, `quarterly` or `monthly` |
| `value` | The number |
| `unit` | Unit, for example `current US$`, `annual %`, `% of labour force` |
| `status` | Source flag, for example Eurostat `p` (provisional) or `e` (estimated), otherwise `null` |
| `source` | `World Bank` or `Eurostat` |
| `license` | License of the source |
| `lastUpdated` | When the source last updated the dataset, `YYYY-MM-DD` |

Rows come newest period first within each indicator and country. Periods without a value are left out and not charged.

Extract from a cloud run on 3 October 2026 with empty input (run `qVnfieuaHGDPufp1p`, 35 rows):

```json
{
  "country": "DE",
  "countryIso3": "DEU",
  "countryName": "Germany",
  "indicator": "gdp",
  "indicatorName": "GDP",
  "sourceIndicator": "NY.GDP.MKTP.CD",
  "period": "2025",
  "year": 2025,
  "frequency": "annual",
  "value": 5050922925047.05,
  "unit": "current US$",
  "status": null,
  "source": "World Bank",
  "license": "CC BY 4.0 (World Bank Open Data)",
  "lastUpdated": "2026-07-13"
}
```

And from the example input above (Eurostat, run `RtU7VkUIUn3XAx00N`, 2026-10-03, 45 rows):

```json
{
  "country": "EU27_2020",
  "countryIso3": null,
  "countryName": "European Union - 27 countries (from 2020)",
  "indicator": "inflation",
  "indicatorName": "Inflation, consumer prices",
  "sourceIndicator": "prc_hicp_ainr?coicop18=TOTAL&freq=A&unit=RCH_A_AVG",
  "period": "2025",
  "year": 2025,
  "frequency": "annual",
  "value": 2.5,
  "unit": "annual %",
  "status": null,
  "source": "Eurostat",
  "license": "Eurostat free re-use policy (Commission Decision 2011/833/EU), source must be acknowledged",
  "lastUpdated": "2026-09-17"
}
```

### Example from a real run

Input:

```json
{
  "indicators": [
    "gdp"
  ],
  "countries": [
    "SE"
  ],
  "maxResults": 5
}
```

Output (first 3 of 4 rows, values unchanged):

```json
[
  {
    "country": "SE",
    "countryIso3": "SWE",
    "countryName": "Sweden",
    "indicator": "gdp",
    "indicatorName": "GDP",
    "sourceIndicator": "NY.GDP.MKTP.CD",
    "period": "2025",
    "year": 2025,
    "frequency": "annual",
    "value": 668998664082.081,
    "unit": "current US$",
    "status": null,
    "source": "World Bank",
    "license": "CC BY 4.0 (World Bank Open Data)",
    "lastUpdated": "2026-07-13"
  },
  {
    "country": "SE",
    "countryIso3": "SWE",
    "countryName": "Sweden",
    "indicator": "gdp",
    "indicatorName": "GDP",
    "sourceIndicator": "NY.GDP.MKTP.CD",
    "period": "2024",
    "year": 2024,
    "frequency": "annual",
    "value": 604827393488.582,
    "unit": "current US$",
    "status": null,
    "source": "World Bank",
    "license": "CC BY 4.0 (World Bank Open Data)",
    "lastUpdated": "2026-07-13"
  },
  {
    "country": "SE",
    "countryIso3": "SWE",
    "countryName": "Sweden",
    "indicator": "gdp",
    "indicatorName": "GDP",
    "sourceIndicator": "NY.GDP.MKTP.CD",
    "period": "2023",
    "year": 2023,
    "frequency": "annual",
    "value": 578990915246.07,
    "unit": "current US$",
    "status": null,
    "source": "World Bank",
    "license": "CC BY 4.0 (World Bank Open Data)",
    "lastUpdated": "2026-07-13"
  }
]
```

Run lvc89Ra9eQuZTOsW4 on 2026-10-04, 4 rows, 2 seconds.

### Use cases

- Country comparison tables and dashboards (Google Sheets, Excel, Power BI, Looker Studio).
- Macro context for market reports, sales planning and country risk screening.
- Feeding economic data to an AI agent through the Apify MCP server: the defaults are small and the field names are stable.
- Watching for new releases: a scheduled run with `onlyNew` tells you when a new year or month has been published.

### Monitoring and scheduling

Set `onlyNew` to `true` to use the actor for recurring monitoring. The actor then remembers which data points it has delivered for the same input, in a named key-value store in your Apify account (`nightwave-state-global-economic-indicators`, one record per input). Each run returns and charges only data points that earlier runs did not deliver. The first run returns everything in the selection. A run without news finishes successfully with 0 rows.

A data point is identified by source, source code, country and period. A revised value for a period you already have is not delivered again; run without `onlyNew` to get the current values. `onlyNew` and `maxResults` are not part of the remembered input, so you can change them without starting over. Changing any other field starts a fresh state.

Example: a daily run at 07:00 that tells you when Eurostat publishes new monthly inflation for the Nordic countries and the euro area. In Apify Console, open **Schedules**, create a schedule with the cron expression `0 7 * * *` and add this actor with the input below. Leave out `yearFrom` and `yearTo` so the window follows the calendar.

```json
{
  "indicators": ["prc_hicp_minr?coicop18=TOTAL&unit=RCH_A"],
  "countries": ["SE", "FI", "DK", "EA20"],
  "onlyNew": true,
  "maxResults": 300
}
```

The same schedule through the Apify API:

```sh
curl -X POST "https://api.apify.com/v2/schedules?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"name": "daily-economic-indicators", "cronExpression": "0 7 * * *", "timezone": "Europe/Stockholm", "isEnabled": true, "isExclusive": true,
       "actions": [{"type": "RUN_ACTOR", "actorId": "nightwave-owner~global-economic-indicators",
                    "runInput": {"contentType": "application/json; charset=utf-8", "body": "<the input above as a JSON string>"}}]}'
```

Connect a webhook or an integration (Slack, e-mail, Google Sheets) to the actor in Apify Console if you want the new rows sent somewhere when the run finishes.

### Good to know

- **World Bank and Eurostat figures differ.** The World Bank reports GDP in US dollars and uses CPI inflation; Eurostat uses euro and the harmonised index (HICP). The `source`, `sourceIndicator` and `unit` fields always tell you which one you have. Do not mix them in one comparison.
- **Annual figures arrive late.** Most annual values are published 6-18 months after the year ends, so the current year usually has no rows yet. The World Bank updates its World Development Indicators a few times a year.
- Unknown country codes are skipped with a warning. An unknown indicator code gives a warning and the run continues with the others; the run fails only if none of the indicators could be fetched.
- Failed requests are retried three times. Large Eurostat selections that the API answers asynchronously are split and fetched one country at a time.
- The actor fetches public statistics only. No personal data, and no login or scraping of web pages.
- This is statistical data, not investment advice.

### Data sources and licenses

- **World Bank Indicators API** (`api.worldbank.org/v2`). The World Bank licenses its datasets under [Creative Commons Attribution 4.0 (CC BY 4.0)](https://datacatalog.worldbank.org/public-licenses), which allows commercial use with attribution. Credit "The World Bank: World Development Indicators" when you publish the data. A few indicators come from partner organisations (IMF, ILO, UN); the source organisation is shown on each indicator's page at data.worldbank.org.
- **Eurostat API** (`ec.europa.eu/eurostat/api`). Eurostat data may be reused free of charge, also commercially, provided the source is acknowledged, under the Commission's reuse policy (Decision 2011/833/EU). See [Eurostat copyright notice](https://ec.europa.eu/eurostat/about-us/policies/copyright). Credit "Source: Eurostat" when you publish the data.

This actor is not affiliated with the World Bank or Eurostat.

### Pricing

Pay per event: you pay for each data point (row) in the dataset, event `data-point`. Rows without a value are never charged, and with `onlyNew` you pay only for new rows. The price is 0.002 USD per data point, which is 2.00 USD per 1 000 data points. The empty-input example above is 35 data points.

Rows are delivered only after they have been charged. If you set a maximum cost per run (maxTotalChargeUsd), the run stops there and its status message says how many rows were delivered.

### Contact

Built and maintained by Nightwave AB. Questions, bugs and feature requests: kontakt@nightwave.se

### På svenska

Actorn hämtar ekonomisk statistik per land och år från Världsbankens och Eurostats öppna API:er: BNP, BNP-tillväxt, inflation, arbetslöshet, befolkning, statsskuld och handel, eller valfri indikatorkod från någon av källorna. Varje rad är ett värde för ett land, en indikator och en period, i samma format oavsett källa.

Exempel från en verklig körning: input och de första raderna i outputen finns i avsnittet Example from a real run ovan (körning lvc89Ra9eQuZTOsW4, 2026-10-04, 4 rader, 2 sekunder).

- Skriv vanliga namn som `gdp`, `inflation` eller `unemployment`, eller en kod från Världsbanken (`NY.GDP.MKTP.CD`) eller Eurostat (`prc_hicp_minr?coicop18=TOTAL&unit=RCH_A`).
- Länder anges med ISO2 (`SE`) eller ISO3 (`SWE`). Med Eurostat går också `EU27_2020` och `EA20`.
- `source: auto` använder Världsbanken för alla länder så att siffrorna går att jämföra. `eurostat` ger europeiska siffror i euro, ofta några månader tidigare.
- Tom input ger BNP, inflation och arbetslöshet för Sverige, USA och Tyskland de senaste åren. `maxResults` är som standard 50.
- Med `onlyNew: true` levereras bara värden som tidigare körningar med samma input inte har levererat, till exempel ett nytt år eller en ny månad. Det passar för schemalagda körningar (se "Monitoring and scheduling").
- Källor: Världsbanken (CC BY 4.0) och Eurostat (fri återanvändning med källhänvisning). Ange källan när du publicerar datan.
- Pris: 0.002 USD per datapunkt (rad) i datasetet, alltså 2.00 USD per 1 000, händelsen `data-point`. Tomma värden debiteras aldrig.
- Kontakt: kontakt@nightwave.se

# Actor input Schema

## `indicators` (type: `array`):

What to fetch. Common names: gdp, gdp-growth, gdp-per-capita, inflation, unemployment, population, government-debt, exports, imports, current-account. You can also give a World Bank code (NY.GDP.MKTP.CD) or a Eurostat dataset with filters (prc_hicp_minr?coicop18=TOTAL\&unit=RCH_A). Defaults to gdp, inflation and unemployment.

## `countries` (type: `array`):

Countries as ISO2 (SE) or ISO3 (SWE) codes. World Bank aggregates work too (WLD for the world, EUU for the EU), and with Eurostat also EU27_2020 and EA20. Defaults to SE, US and DE.

## `yearFrom` (type: `integer`):

First year to include. Example: 2015. Defaults to four years before the end year.

## `yearTo` (type: `integer`):

Last year to include. Example: 2025. Defaults to the current year. Annual figures usually appear 6-18 months after the year ends.

## `source` (type: `string`):

auto: World Bank for every country, so values are comparable worldwide, and Eurostat only for EU areas such as EU27_2020. worldbank: World Bank only. eurostat: Eurostat only (European countries, often a year fresher, values in EUR). World Bank codes and Eurostat datasets always use their own source.

## `onlyNew` (type: `boolean`):

For scheduled runs: return and charge only data points that earlier runs with the same input have not returned, for example a newly published year. The first run returns everything in the selection.

## `maxResults` (type: `integer`):

Maximum number of data points in total. Each data point (one country, indicator and period) is one row and one billable event.

## Actor input object example

```json
{
  "indicators": [
    "gdp-growth",
    "inflation",
    "NY.GDP.PCAP.PP.CD"
  ],
  "countries": [
    "SE",
    "NO",
    "FI",
    "DK"
  ],
  "yearFrom": 2015,
  "yearTo": 2025,
  "source": "auto",
  "onlyNew": false,
  "maxResults": 50
}
```

# Actor output Schema

## `results` (type: `string`):

All data points returned by the run, one row per country, indicator and period, as JSON. Open in Apify Console or download via the dataset API.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "indicators": [
        "gdp",
        "inflation",
        "unemployment"
    ],
    "countries": [
        "SE",
        "US",
        "DE"
    ],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("nightwave-owner/global-economic-indicators").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "indicators": [
        "gdp",
        "inflation",
        "unemployment",
    ],
    "countries": [
        "SE",
        "US",
        "DE",
    ],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("nightwave-owner/global-economic-indicators").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "indicators": [
    "gdp",
    "inflation",
    "unemployment"
  ],
  "countries": [
    "SE",
    "US",
    "DE"
  ],
  "maxResults": 50
}' |
apify call nightwave-owner/global-economic-indicators --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nightwave-owner/global-economic-indicators"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Z5jcQaY2JlxOTh15x/builds/1HvRqalFNOd0NFo8V/openapi.json
