How it will work: 3 steps
- Follow us on ApifyThe tool is built and waits in the queue for the Apify Store. Apify is the cloud platform where our tools run.
- Paste your input and press StartNo code needed: you fill in a form (the input). It already has a working example. For example:
USin Countries and regional aggregates. Each start is one run. - Download the resultsWhen the run ends, the results are in a table (the dataset). Open Output, press Export and pick Excel or CSV. JSON and the API are there too.
This tool is an Apify Actor: a small program that runs on Apify. You can also run it on a schedule, for example every Monday. New to it? Read how it works, step by step and the 8 words you need first.
What it does
Export annual World Bank data for the countries, indicators and years you choose. Get a long or wide table with values, missing data and source details from World Development Indicators (WDI). No API key is needed.
- Gets annual data from the official World Bank API, source 2 (WDI).
- Supports country codes and regional aggregate codes, such as
US,BRA,WLDandEAS. - Returns long tables or wide country-year tables.
- Keeps missing values as
null, or filters them out. - Gets the latest annual periods with
mostRecentValues. - Adds indicator descriptions, data providers, source links and the database update date.
Who uses it
Students and teachers
Get a clean table for a class project.
Analysts
Compare GDP and population across countries.
Dashboard builders
Feed yearly data into a sheet or warehouse.
Price
Prices will be shown after release.
Questions
Is this an official World Bank tool?
No. It uses the official World Bank API, but it is not a World Bank product.
How many countries can I add?
Up to 20 countries and 20 indicators per run, for up to 30 years.
Can I get only the latest values?
Yes. Use the most recent values setting to get the latest years.
Do I need an API key?
No. The World Bank data is free to access.
Details
Step by step on Apify
- Keep the example input in the form: five countries, GDP and population, 2015–2024.
- Click Start. Use the default 256 MB and 300-second timeout.
- Open the Dataset. The example returns 100 observations.
- Download JSON, CSV, Excel or a table from Apify. For wide data, JSON keeps the nested values and metadata most clearly.
Use cases
- Compare GDP and population across countries.
- Build a country or regional dashboard.
- Download a clear data table for a report or class project.
- Feed annual WDI observations into a spreadsheet or data warehouse.
Tips for better results
- Find indicator codes on the World Bank indicator list first.
- Use region codes like WLD or EAS for world and regional totals.
- Use wide format for one row per country and year.
Limits and good to know
- Maximum 20 countries/aggregates × 20 indicators × 30 annual years, up to 12,000 retained observations
- Annual WDI data only, from 1960 to the current year. No other World Bank source databases
- All-country downloads, monthly/quarterly series and historical data vintages are outside this Actor
- Regional codes give provider aggregates; they do not expand to their member countries
- Latest periods can contain nulls. New annual figures can arrive with a delay. Data is not real-time
- A typo in some codes,
maxObservationsor Maximum cost per run givespartial, and the run still succeeds. With the cost limit,statusReasonisCHARGE_LIMIT; saved rows are complete observations and are charged - A source outage or changed response format is an error, not a successful empty export. The run is marked failed. Long format saves rows after each source page, so rows saved before the failure stay in the Dataset; the summary shows
partialwithstatusReasonSOURCE_ERROR. Wide format saves rows after the source scan, so a failure leaves no wide rows - If Apify moves or reboots the run, the run continues on the new server and skips observations that are already saved. While the run is moving,
RUN_SUMMARYshowspartialwithstatusReasonMIGRATING; the continued run replaces it. Each charge is recorded before its rows are saved and settled once after a restart. If it cannot be confirmed whether a charge went through, the Actor does not charge it again, so in rare cases saved observations may be left uncharged
Troubleshooting
| Result | What to do |
|---|---|
| Input error | Provide non-empty arrays; check year order, types and limits. |
not_found | Check country codes and period. Try keeping null values. |
partial | Read statusReason and invalidCodes. For CHARGE_LIMIT or OBSERVATION_LIMIT, raise the cost limit or maxObservations, or split the job. |
Failed run with partial | A source error stopped the export after some rows were saved. Use the saved rows with care and run the job again later. |
INPUT_CHANGED | The run was resurrected with a different input. Start a new run instead. |
RATE_LIMITED / source error | Try again later with fewer countries or indicators. |
SOURCE_SCHEMA_CHANGED | Send the run ID to support. Do not treat the result as an empty dataset. |
| Wide CSV looks nested | Download JSON, or choose long format. |
For developers
Sample result
One result from a real test run, in JSON. Real values change from run to run. In Excel or CSV each field is a column.
{
"recordType":"long",
"country":{"code":"BRA","iso2":"BR","name":"Brazil","isAggregate":false},
"indicator":{"code":"SP.POP.TOTL","name":"Population, total","unit":""},
"year":2024,
"value":211998573,
"decimal":0,
"obsStatus":"",
"source":{"id":"2","name":"World Development Indicators"},
"provider":"World Bank",
"lastUpdated":"2026-10-08",
"sourceUpdatedAt":"2026-10-08"
}Data fields (17)
| Field | Type | Meaning |
|---|---|---|
recordType | string | long or wide row |
country | object | World Bank ISO3 code, ISO2 code, name, isAggregate flag |
indicator | object | Long only: code, name, unit (may be empty), sourceNote and sourceOrganization |
year | integer | Calendar year |
value | number | Long only: provider value or explicit missing null |
decimal | integer | Long only: provider display precision, not value rounding |
obsStatus | string | Long only: provider observation status; empty means no flag |
values | object | Wide only: indicator codes mapped to numeric or null values; absent means series was not returned |
metadata | object | Wide only: per-indicator metadata, decimal, obsStatus, source, update date, sourceUrl |
provider | string | World Bank |
source | object | Source 2 World Development Indicators |
lastUpdated | string | Provider database update date; not an observation release date |
sourceUpdatedAt | string | Same provider date as lastUpdated |
fetchedAt | string | UTC retrieval timestamp |
sourceUrl | string | Long only: exact official API response URL |
license | string | Default CC BY 4.0 with exceptions and additional terms; check indicator data providers |
licenseUrl | string | Official World Bank dataset terms |
Input settings (8)
The main fields of the input form. With the API you send them as JSON.
| Setting | Name in the API | Type | Example value |
|---|---|---|---|
| Countries and regional aggregates required | countries | array | ["US", "GB", "DE", "BR", "IN"] |
| WDI indicator codes required | indicators | array | ["NY.GDP.MKTP.CD", "SP.POP.TOTL"] |
| First year | startYear | integer | 2015 |
| Last year | endYear | integer | 2024 |
| Table format | format | string | "long" |
| Most recent annual values | mostRecentValues | integer | 0 |
| Keep missing values | includeNullValues | boolean | true |
| Observation limit | maxObservations | integer | 12000 |
