Annual Country Indicators: GDP & Population
Pricing
$0.80 / 1,000 numeric observations
Annual Country Indicators: GDP & Population
Compare GDP, GDP per capita, GDP growth, population and life expectancy across countries and years. Export cited observations from World Development Indicators with revision dates and license links.
Pricing
$0.80 / 1,000 numeric observations
Rating
0.0
(0)
Developer
Atesen Software
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Compare annual GDP, GDP per capita, GDP growth, population and life expectancy using World Development Indicators. Choose countries or regional aggregates, then request an annual range or the latest nonempty observations. The Actor uses the public data API without credentials.
Use cases
- Country comparisons and dashboards: pull GDP, population or life expectancy for a hand-picked set of countries over exact years, with clean numeric values.
- Academic and policy research: every observation carries the indicator and country codes and names, unit, footnote, source database ID and source last-update date, so citations stay traceable.
- Economics education and demos: small runs capped at 100 observations for teaching examples and quick lookups.
- Reproducible pipelines: values are returned as supplied, deduplicated by indicator, ISO3 and year, with the original API URL saved on every row.
Input
Choose 1–10 country or aggregate codes and any of the five verified indicators. date accepts YYYY or YYYY:YYYY, with up to 101 annual observations from 1960 to 2100. Omit date to request latestValues (default 1, maximum 10). The latest available year can vary across countries and indicators.
| Field | What it does |
|---|---|
countries | 1–10 ISO2/ISO3 country codes or aggregate codes such as US, CA or WLD. |
indicators | NY.GDP.MKTP.CD (GDP), NY.GDP.PCAP.CD (GDP per capita), NY.GDP.MKTP.KD.ZG (GDP growth), SP.POP.TOTL (population), SP.DYN.LE00.IN (life expectancy). |
date | Optional annual range, used instead of latestValues. |
latestValues | Only when date is omitted: how many recent nonempty observations per country and indicator. |
maxRecords | Hard cap on saved numeric observations per run (default 20, maximum 100). |
maxRequests | Hard cap on API pages requested (default 5, maximum 10). Automatic retries after a temporary World Bank error do not use it up. |
{"countries": ["US", "CA"],"indicators": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"],"date": "2020:2023","maxRecords": 20,"maxRequests": 5}
Requests are serial with at least one second between them, and indicator requests follow input order — so a small maxRecords or maxRequests may stop before later indicators are visited. World Bank does not guarantee a user-controlled sort order. Aggregate codes return aggregate values, not individual country values. ISO2 and ISO3 aliases and repeated records are deduplicated.
Output
Each saved row is an observation (paid, numeric value) or a free status row. Observation fields:
recordType,indicatorCode,indicatorName,countryCode,countryName,countryIso3year,value,unit,observationStatus,decimal,footnotesourceId,sourceDataset,sourceLastUpdated,sourceUrl,indicatorUrl,attribution,licenseUrl,termsUrl,fetchedAt
Illustrative observation (not a captured live result):
{"recordType": "observation","indicatorCode": "NY.GDP.MKTP.CD","indicatorName": "GDP (current US$)","countryCode": "TUR","countryName": "Turkiye","countryIso3": "TUR","year": 2023,"value": 1118084257757.35,"unit": "","observationStatus": "","decimal": null,"footnote": null,"sourceId": "2","sourceLastUpdated": "2024-09-13","sourceDataset": "World Development Indicators","sourceUrl": "https://api.worldbank.org/v2/country/TUR/indicator/NY.GDP.MKTP.CD?source=2&format=json&date=2023","indicatorUrl": "https://data.worldbank.org/indicator/NY.GDP.MKTP.CD","attribution": "World Bank, World Development Indicators; listed data providers: National Statistical Organizations and/or Central Banks; OECD National Accounts; World Bank staff estimates. Selected metadata was normalized; the observation value is unchanged.","licenseUrl": "https://creativecommons.org/licenses/by/4.0/","termsUrl": "https://data.worldbank.org/summary-terms-of-use","fetchedAt": "2026-10-22T10:00:00.000Z"}
Values are returned as supplied: a blank unit is preserved rather than inferred, and null observations are excluded (a numeric zero counts as a genuine observation). Free status rows carry status, message, plus a run summary with requests, resultRows, missingValues, and — when a long Retry-After delay ends the run — retryAt. Export JSON, CSV or Excel through the Apify dataset.
Pricing
Each saved numeric observation triggers one result event. Status rows are free. See the Store pricing tab for the current rate. The Actor checks the result budget before requesting data and before saving observations. Apify platform usage may apply separately.
Use via API
One request runs the Actor, waits for it and returns the dataset items as JSON. Send your token in the Authorization header, not in the URL:
curl -X POST "https://api.apify.com/v2/acts/atesen-software~world-bank-indicators/run-sync-get-dataset-items?timeout=120" \-H "Authorization: Bearer $APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"countries":["US","DE"],"indicators":["NY.GDP.MKTP.CD"],"date":"2023"}'
The synchronous endpoint waits up to 300 seconds. For longer jobs start a run with POST https://api.apify.com/v2/acts/atesen-software~world-bank-indicators/runs and read the dataset when it finishes.
JavaScript (npm install apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('atesen-software/world-bank-indicators').call({ countries: ["US", "DE"], indicators: ["NY.GDP.MKTP.CD"], date: "2023" });const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Use with AI agents (MCP)
Claude Desktop, Cursor, VS Code and other MCP clients can call this Actor as a tool through the Apify MCP server. Load only this Actor with:
https://mcp.apify.com?tools=atesen-software/world-bank-indicators
Client config (sign in with Apify OAuth when the browser opens, or add an Authorization: Bearer <APIFY_TOKEN> header instead):
{"mcpServers": {"apify": { "url": "https://mcp.apify.com?tools=atesen-software/world-bank-indicators" }}}
Then ask in plain words, for example: "What was the GDP of the US and Germany in 2023 according to the World Bank?" The agent fills the same input fields you see on the Input tab, and runs are billed to your Apify account at the prices on the Pricing tab.
FAQ
Can I request all countries and all indicators? Choose up to 10 country or aggregate codes and select from the five listed indicators. The Actor checks that the response came from World Development Indicators before saving data.
Why do my "latest" values have different years for different countries?
latestValues maps to the API's mrnev (most recent nonempty value) parameter. Some countries lag by a year or more, so the newest available value differs per country and indicator. Set an explicit date range if you need aligned years.
How far back does the data go? Annual data from 1960 to 2100 (World Bank publishes projections for some indicators), up to 101 years per request.
How big can a run be? Hard caps: 100 saved observations and 10 API page requests (plus at most 3 automatic retries per page on temporary errors), with serial requests at least one second apart. Small runs are the design, not a bug.
What happens on an upstream error?
Access failures end the run with a free status row rather than returning partial data silently; partial observations saved before a later request fails remain available in the dataset. Unexpected parser or storage errors fail the run. HTTP 401/403/429 handling includes stopping with a retryAt timestamp on long Retry-After delays.
Temporary World Bank errors (HTTP 500, 502, 503, 504, a short HTTP 429, connection resets or timeouts) are retried up to 3 times for the affected page with exponential backoff (2, 4 and 8 seconds). Retries do not count toward maxRequests. If the API is still down after the 4th attempt, the run ends SUCCEEDED with one free status row (status: "upstream_unavailable", the HTTP code, the number of attempts and a plain message); you pay only for observations saved before the outage. Run it again a few minutes later.
How fresh is the data?
As fresh as the World Bank API at run time; every row stores sourceLastUpdated so you know which revision you got.
Support and legal
- Questions or problems: use the Issues tab of this actor. This actor is not affiliated with or endorsed by the World Bank.
- Primary sources: World Bank API access and authentication, parameters, pagination, dates and MRNEV, country queries, indicator metadata.
- Each observation includes the publisher, dataset, listed source organizations, indicator page, CC BY 4.0 license and World Bank dataset terms. Keep those fields with redistributed data.
- No personal data is collected. This Actor does not provide financial advice or forecast future observations.
Run and verify locally
npm cinpm testLOCAL_MODE=1 INPUT_PATH=input.example.json OUTPUT_DIR=evidence/local npm start