World Bank Indicators Export — GDP & Population avatar

World Bank Indicators Export — GDP & Population

Pricing

from $0.07 / 1,000 saved observations

Go to Apify Store
World Bank Indicators Export — GDP & Population

World Bank Indicators Export — GDP & Population

Export World Bank annual indicators by country and year. Long or wide tables with missing values, regional aggregates, source metadata and update dates. No API key.

Pricing

from $0.07 / 1,000 saved observations

Rating

0.0

(0)

Developer

Cliqto Media

Cliqto Media

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

World Bank Indicators Export

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. The 100-observation example costs $0.04 on the Free tier.

World Bank Indicators Export: choose countries and years, get annual values and source metadata

On this page: Data · Start · Input · Output · Price · Limits · Help

What it does

  • Gets annual data from the official World Bank API, source 2 (WDI).
  • Supports country codes and regional aggregate codes, such as US, BRA, WLD and EAS.
  • 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.

The source is free to access. This Actor adds a ready-to-use Apify export, input checks, formats and run reports. It is not an official World Bank product.

What data you get

GDP, population, inflation, unemployment and other annual WDI indicators. You choose the indicator codes. Data may include country estimates and regional totals. Check each series definition before comparing values.

Use the World Bank indicator list to find codes. The API may leave the unit field empty even when the name shows a unit. This Actor keeps the original unit and description. It does not guess a unit or change the numbers.

Quick start

  1. Keep the example input in the form: five countries, GDP and population, 2015–2024.
  2. Click Start. Use the default 256 MB and 300-second timeout.
  3. Open the Dataset. The example returns 100 observations.
  4. Download JSON, CSV, Excel or a table from Apify. For wide data, JSON keeps the nested values and metadata most clearly.

For API runs, provide countries and indicators. An empty {} request is an input error. Form prefills and Restore example input provide the demo; they are not a hidden API fallback.

Input fields

FieldTypeDefault or form exampleRange and effect
countriesarray of stringsRequired in API. Form: US, GB, DE, BR, IN1–20 ISO2/ISO3 or World Bank aggregate codes. Case does not matter. Duplicate aliases count once. all is not supported.
indicatorsarray of stringsRequired in API. Form: NY.GDP.MKTP.CD, SP.POP.TOTL1–20 annual WDI codes. Other World Bank databases are not supported.
startYearinteger2015First year, inclusive. At least 1960. A range may contain at most 30 years.
endYearinteger2024Last year, inclusive. At most the current year; cannot be before startYear.
formatstringlonglong gives one observation per row. wide gives one country-year per row.
mostRecentValuesinteger00 uses the year range. 1–30 gets the latest N annual periods instead; year fields are ignored for the query. Null periods can be included. This is not “latest N non-empty values.”
includeNullValuesbooleantrueKeep explicit missing observations as null. Use false if you only want numeric values. Filtered null observations are not billed.
maxObservationsinteger120001–12,000 retained observations across all series. Includes null when kept. Wide rows may contain several observations. A shorter export reports partial.

Choose a small country list first. For large exports, split jobs by country or indicator. For MRV, year fields still need to be valid if supplied, even though they do not set the query period.

Input examples

GDP and population:

{"countries":["US","GB","DE","BR","IN"],"indicators":["NY.GDP.MKTP.CD","SP.POP.TOTL"],"startYear":2015,"endYear":2024,"format":"long"}

Country and regional data in a wide table:

{"countries":["USA","BRA","WLD"],"indicators":["NY.GDP.MKTP.CD","SP.POP.TOTL"],"startYear":2023,"endYear":2024,"format":"wide"}

Latest two annual periods:

{"countries":["US","EAS"],"indicators":["SP.POP.TOTL"],"mostRecentValues":2,"includeNullValues":true}

Output example

A real observation from a test run (long format, short example):

{
"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"
}

Full rows also include sourceNote, sourceOrganization, fetchedAt, sourceUrl, license and licenseUrl.

Wide rows contain values, such as {"SP.POP.TOTL":211998573}, and a metadata object keyed by each returned indicator code. A missing key means the series was not returned. A key with null means the provider returned a missing observation. CSV stores these objects as JSON cells; it does not create a separate column for every indicator.

Output fields

FieldType / nullMeaning
recordTypestringlong or wide.
country.codestringWorld Bank ISO3/aggregate code, e.g. BRA or WLD.
country.iso2stringProvider ISO2 code, e.g. BR; aggregates may use codes such as 1W.
country.namestringProvider country or aggregate name.
country.isAggregatebooleanTrue when the World Bank catalogue marks this as an aggregate.
indicator.codestring; long onlyIndicator code, e.g. SP.POP.TOTL.
indicator.namestring; long onlyProvider label, e.g. Population, total.
indicator.unitstring; long onlyOriginal unit. Empty string is possible. Read the name and note too.
indicator.sourceNotestring or null; long onlyDefinition and measurement notes from WDI.
indicator.sourceOrganizationstring or null; long onlyOriginal data providers and organizations.
yearintegerAnnual observation year, e.g. 2024.
valuenumber or null; long onlyOriginal value. Zero stays zero; missing stays null.
decimalinteger; long onlyProvider display precision. Values are not rounded by this Actor.
obsStatusstring; long onlyProvider status flag; empty string means no supplied flag.
valuesobject; wide onlyIndicator codes mapped to numbers or explicit nulls.
metadataobject; wide onlyEach returned code maps to indicator, decimal, obsStatus, source, lastUpdated, sourceUrl.
sourceobjectDatabase ID 2 and name World Development Indicators.
providerstringWorld Bank.
lastUpdatedstringDatabase update date. This is not an individual observation release date.
sourceUpdatedAtstringSame source database date as lastUpdated. In wide rows, per-indicator dates are in metadata.
fetchedAtstringUTC fetch timestamp. In wide rows, time of the first observation in that row.
sourceUrlstring; long onlyExact official API URL for the source page. In wide rows, read metadata[code].sourceUrl.
licensestringDefault CC BY 4.0 notice, with provider exceptions and additional World Bank terms.
licenseUrlstringOfficial dataset terms URL.

The Observations view shows long data. The Wide table view shows wide data. Select the view that matches your input format. Dataset JSON, Dataset CSV and Run summary links are available in the output.

RUN_SUMMARY in the key-value store includes status, statusReason, errorCode, message, saved rows, saved observations, null observations, requests, retries, invalid codes, errors, timestamps, source date and normalized input. It can report complete, partial, not_found, error, invalid_input or resource_error. An invalid_input run (statusReason INVALID_INPUT) ends without failing, with no rows and an extra inputErrors list (field, message, example). statusReason tells why: CHARGE_LIMIT, OBSERVATION_LIMIT, INVALID_CODES, NOT_FOUND, SOURCE_ERROR, RUNTIME_ERROR, INVALID_INPUT, SOURCE_DEADLINE (the run time ran out), SOURCE_TIME_BUDGET (the 210-second source time budget ran out), INPUT_CHANGED (a resurrected run's input no longer matches its saved data), RESOURCE_ERROR (memory other than 256 MB), CRASH (unexpected Actor error) or MIGRATING (a short-lived partial summary while Apify moves the run to another server; the continued run replaces it). errorCode gives the exact code, such as SOURCE_TIMEOUT.

Price

Pay per event: $0.03 per valid run start + $0.10 per 1,000 saved observations on the Free tier. Bronze: $0.095/1,000; Silver: $0.09/1,000; Gold: $0.085/1,000. The start fee is the same on each tier. See the live pricing tab for your plan.

One observation is one country × indicator × year. Kept null observations count. Dropped nulls and unsaved observations do not count. Wide format uses the same observation count as long format. It does not use the number of wide rows.

Saved observationsFree tier total
10$0.031
100 (form example)$0.04
1,000$0.13
12,000$1.23

A run whose own Timeout was too short to save a row pays the $0.03 start fee only; no source read is charged. A valid empty run pays the $0.03 start fee. Input validation errors pay no events. A source failure after startup can still pay the start fee; it never pays for unsaved observations. Set Maximum cost per run to limit events (minimum $0.03). The platform rejects a limit below the minimum; the runtime also checks the start fee before source requests. A budget limit can give a partial export. Charges already made remain charged after cancellation. Platform billing rules apply.

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.

Repeated exports and schedules

Run the same input again to get the current provider data. The World Bank can revise past values. This Actor does not keep data vintages, a baseline or a change log. You can set up an Apify schedule yourself; this Actor does not create one for you.

API and integrations

Use Apify API, a saved task, Make, Zapier or your own data pipeline. Use your own Apify token in the request header.

curl -X POST 'https://api.apify.com/v2/acts/cliqtomedia~world-bank-indicators-export/runs?memory=256&timeout=300&maxTotalChargeUsd=0.50' \
-H 'Authorization: Bearer YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"countries":["US"],"indicators":["SP.POP.TOTL"],"startYear":2020,"endYear":2024}'

Poll the run until it finishes, then read its Dataset and RUN_SUMMARY. Check the summary status before using the data.

Use with AI agents (MCP)

In the Apify MCP server, search for World Bank Indicators Export, read its input details and call cliqtomedia/world-bank-indicators-export. Pass country and indicator codes as arrays. Use long for one observation per row, or wide for a country-year table. Check RUN_SUMMARY for partial or missing results. A large job may need run polling. Limited permissions and pay-per-event pricing are used.

  • MCP URL: https://mcp.apify.com?tools=cliqtomedia/world-bank-indicators-export
  • Minimal input: {"countries": ["US", "DE"], "indicators": ["SP.POP.TOTL"], "startYear": 2020, "endYear": 2024}
  • Key output fields: country.code, indicator.code, year, value (null = missing), obsStatus, lastUpdated, sourceUrl.
  • Typical call: about 10 seconds; 100 observations cost about $0.04 on the Free plan ($0.03 start + $0.10 per 1,000 observations).

Limits and partial results

  • 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, maxObservations or Maximum cost per run gives partial, and the run still succeeds. With the cost limit, statusReason is CHARGE_LIMIT; saved rows are complete observations and are charged.
  • The Actor stops work 45 seconds (or 10% of the run Timeout, if larger) before the Timeout ends, so the results and the summary are always saved. Long format keeps the rows saved so far and the run ends SUCCEEDED with a ⚠️ message; wide format saves rows after the source scan, so a stop before the end leaves no wide rows.
  • 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 partial with statusReason SOURCE_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_SUMMARY shows partial with statusReason MIGRATING; 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.
  • Resurrecting a finished run repeats its summary. No new rows, source requests or charges. Resurrecting a failed run continues it within the same source limits; the start is not charged again. If the run's input was changed before a resurrect, the run stops with INPUT_CHANGED and charges nothing. Start a new run for a new input.
  • If a resurrected run's Dataset already holds rows from an earlier version of this Actor, those rows are kept and new rows are added after them.
  • Each source request may take up to 60 seconds (the World Bank API can be slow on uncached queries). Runs stop source work after a fixed 210-second source time budget, 100 requests or two request timeouts. If the 210-second budget runs out after rows were saved, the run ends SUCCEEDED with a ⚠️ message and RUN_SUMMARY partial with statusReason SOURCE_TIME_BUDGET; with no rows saved it is FAILED. These limits cover the whole run, including restarts and resurrects. Use smaller jobs if a large export does not finish.
  • Source metadata can change between requests. Use per-indicator update dates in wide data.

Attribution and data terms

Source: The World Bank: World Development Indicators, with original providers named in indicator metadata. Data is retrieved and reshaped into long or wide rows; values are not converted or rounded. The default is CC BY 4.0 with additional World Bank terms, unless a dataset or provider states otherwise. Check the dataset terms and source notes before reusing data. The Actor does not certify rights for every indicator. See the official API documentation for source details.

Troubleshooting

ResultWhat to do
Input error (invalid_input)Run finished with no results and an input error message — fix the named field and run again. Provide non-empty arrays; check year order, types and limits.
not_foundCheck country codes and period. Try keeping null values.
The run ran out of timeRows saved before the stop stay in the Dataset. With rows saved the run ends SUCCEEDED with a ⚠️ message and RUN_SUMMARY shows partial with statusReason SOURCE_DEADLINE. Set a longer Timeout in Run options (default 300 s) or lower maxObservations. If you set a Timeout below 300 s and no row was saved, the run also ends SUCCEEDED with a short-Timeout message (inputErrors has INPUT_TIMEOUT_TOO_SHORT). With a Timeout of 300 s or more and no row saved, the run is FAILED.
partialRead statusReason and invalidCodes. For CHARGE_LIMIT or OBSERVATION_LIMIT, raise the cost limit or maxObservations, or split the job.
Failed run with partialA source error stopped the export after some rows were saved. Use the saved rows with care and run the job again later.
INPUT_CHANGEDThe run was resurrected with a different input (the run is marked failed). Start a new run instead.
RATE_LIMITED / source errorTry again later with fewer countries or indicators.
SOURCE_SCHEMA_CHANGEDSend the run ID to support. Do not treat the result as an empty dataset.
Wide CSV looks nestedDownload JSON, or choose long format.

FAQ

Do I need a World Bank key? No.

Does null mean zero? No. Null means the source has no value for that observation.

Can I use ISO3 and ISO2 together? Yes. Aliases for the same country are merged.

Are regional figures a list of countries? No. They are the provider's aggregate observations.

Is wide cheaper? No. It has the same number of paid observations, grouped into fewer rows.

Is the database update date the year of the value? No. year is the observation year; lastUpdated is the database update date.

Browse the CliqtoMedia Actor collection for other data tools.

Support

Use the Actor's Issues tab on Apify to report a problem. Include your run ID, input without secrets, expected country/indicator/year and summary error code.