- Previous: Country Calls
- Up: Documentation Version 1
- Next: Cross Topic Calls
Data Calls
The World Bank API provides three data calls.
- wb.data.get
- wb.data.sources.get
- wb.indicators.get
These data calls tap into the following sources of World Bank Data:
- The Little Data Book - based on the World Development Indicators, the World Bank's primary database for cross-country comparable development data, the Little Data Book includes 54 basic indicators going back 60 years.
See: Little Data Book site | Glossary of Indicators - World Governance Indicators - includes aggregate and individual governance indicators for 212 countries and territories over the period 1996–2007, for six dimensions of governance
See: Governance Indicators site | Glossary of Indicators - Doing Business - includes objective measures of business regulations and their enforcement across 178 countries and selected cities at the subnational and regional level.
See: Doing Business site | Data Notes & Methodology
wb.data.get
Gets information about data.
Arguments
api_key (Required)
Your API key.
country (Optional)
The three letter ISO code of the country.
indicator (Optional)
The id of the indicator to search for.
date (Optional)
The date to search for (See the Date Format page for more information).
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of data points to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <rsp stat="ok">
- <data page="1" pages="1" per_page="10" total="1">
- <datapoint>
- <country id="IND">India</country>
- <indicator id="NY.GDP.MKTP.CD">GDP (current US$)</indicator>
- <date>1990</date>
- <value>317466607616</value>
- </datapoint>
- </data>
- </rsp>
Error Codes
90: Invalid date “xxx” provided
The date provided cannot be interpreted
91: Invalid date range “xxx” provided
The date range provided cannot be interpreted
100: Invalid API Key
The API key passed was not valid or has expired.
105: Service currently unavailable
The requested service is temporarily unavailable.
110: API version “xxx” not found
The requested API version was not found.
111: Format “xxx” not found
The requested response format was not found.
112: Method “xxx” not found
The requested method was not found.
115: Missing required parameter
Parameters which are required have not been sent.
120: Parameter “xxx” has an invalid value
The provided parameter is not valid.
wb.datasources.get
Gets information about a data source.
Arguments
api_key (Required)
Your API key.
id (Optional)
The id of the source.
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of sources to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <rsp stat="ok">
- <sources page="1" pages="1" per_page="10" total="1">
- <source id="1">
- <name>Doing Business</name>
- <description>Doing Business is a guide for evaluating regulations that directly impact economic growth, downloading underlying laws, making cross-country comparisons, and identifying good practice reforms.</description>
- <url>http://www.doingbusiness.org</url>
- </source>
- </sources>
- </rsp>
Error Codes
100: Invalid API Key
The API key passed was not valid or has expired.
105: Service currently unavailable
The requested service is temporarily unavailable.
110: API version “xxx” not found
The requested API version was not found.
111: Format “xxx” not found
The requested response format was not found.
112: Method “xxx” not found
The requested method was not found.
115: Missing required parameter
Parameters which are required have not been sent.
120: Parameter “xxx” has an invalid value
The provided parameter is not valid.
wb.indicators.get
Gets information about an indicator.
Arguments
api_key (Required)
Your API key.
id (Optional)
The id of the region.
source (Optional)
The id of the indicator source.
topic (Optional)
The id of the topic.
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of indicators to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <rsp stat="ok">
- <indicators page="1" pages="1" per_page="10" total="1">
- <indicator id="AG.LND.AGRI.ZS">
- <name>Agricultural land (% of land area)</name>
- <source id="2">World Development Indicators</source>
- <sourcenote>Agricultural land refers to ...</sourcenote>
- <topics>
- <topic id="644290">Agriculture</topic>
- <topic id="644284">Communities and Human Settlements</topic>
- </topics>
- </indicator>
- </indicators>
- </rsp>
Error Codes
100: Invalid API Key
The API key passed was not valid or has expired.
105: Service currently unavailable
The requested service is temporarily unavailable.
110: API version “xxx” not found
The requested API version was not found.
111: Format “xxx” not found
The requested response format was not found.
112: Method “xxx” not found
The requested method was not found.
115: Missing required parameter
Parameters which are required have not been sent.
120: Parameter “xxx” has an invalid value
The provided parameter is not valid.
- Previous: Country Calls
- Up: Documentation Version 1
- Next: Cross Topic Calls


Comments
Please sign in to post a comment.