Calling WDI and IDS data through World Bank API

267 views
Skip to first unread message

Raj

unread,
Oct 29, 2013, 2:21:12 PM10/29/13
to world-b...@googlegroups.com
Hello - I am trying to pull the latest WDI and IDS data in XML or JSON format from World Bank through API calls.  There is a nice API Query Builder available but can select only one country and one indicator at a time.  I would like to get WDI data for ALL COUNTRIES and ALL INDICATORS for all time periods.  Can someone help me how to create a single API call to pull all this data in XML or JSON format?

Thanks in advance
Raj

Sarven Capadisli

unread,
Oct 29, 2013, 2:32:38 PM10/29/13
to world-b...@googlegroups.com
What you are looking for is the full data dump of WDI. I'm not aware of
a way to get that over the API, however, you could make a call for each
indicator which will get you all countries for all periods e.g.:

http://api.worldbank.org/{lang}/countries/all/indicators/{indicator}?format=xml&per_page=20000

lang: language code for strings e.g., 'en' for English

indicator: indicator code e.g., SP.DYN.IMRT.IN

IIRC, per_page=20000 is sufficient to get all data for all indicators,
but you might want to play around with that number.

-Sarven


Raj

unread,
Nov 5, 2013, 11:37:28 AM11/5/13
to world-b...@googlegroups.com
Hello - Is it possible to get all indicators for all time periods for one country at a time?  It can reduce the number of API calls.

Thanks in advance
Raj

leila...@gmail.com

unread,
Nov 5, 2013, 5:18:39 PM11/5/13
to world-b...@googlegroups.com
In API, we don't have provision to query all indicators, however you can query API for multiple countries, multiple indicators for all years.

If API calls made with multiple indicators, 'source' is mandatory query parameter.
Source Id for WDI is 2, for complete list of sources try http://api.worldbank.org/sources 
Also, maximum of 60 indicators allowed in one API call.

Following API call will return data for country 'ind', indicators 'sp.pop.totl', 'sp.pop.grow' and 'se.prm.ages' for all years.

Call with multiple countries, multiple indicators for all years.

You can get data for all the countries, regions, income groups and aggregates for a given indicator for all the years.

You can download All countries, all indicators for all years in excel or CSV format from following link.
Click on WDI (Excel)-ZIP or WDI (CSV)-ZIP.

Best,

Development Data Group
The World Bank

yomi yusuf

unread,
Aug 19, 2018, 4:53:29 PM8/19/18
to World Bank API
I have been trying to use the API.
I want to get the list of all countries, their GDP and regions.

http://api.worldbank.org/v2/countries/all/indicators/NY.GDP.MKTP.CD includes a list of different classes of regions which isn't what i want.

I have not been able to do that for 2 days now. How should I go about it.

Tim Herzog

unread,
Aug 20, 2018, 9:19:12 AM8/20/18
to World Bank API
That is the correct API call to fetch an indicator for all countries and aggregate regions. What class of regions are you looking for? 
Reply all
Reply to author
Forward
0 new messages