- Previous: Documentation Version 1
- Up: Documentation Version 1
- Next: Data Calls
Country Calls
The API provides four country based calls that provide lists of countries, regions, country income levels, and the type of World Bank lending for which each country is eligible.
- wb.countries.get
- wb.incomeLevels.get
- wb.lending.types.get
- wb.regions.get
For more information on how the World Bank classifies countries and determines income level and lending eligilibity, see Country Classification.
wb.countries.get
Gets information about a country (or a group of countries).
Arguments
api_key (Required)
Your API key.
id (Optional)
The three-letter ISO code of the country
name (Optional)
The name of the country
iso2Code (Optional)
The two-letter ISO code of the country
region (Optional)
The country's region
incomeLevel (Optional)
The country's income level code
lendingType (Optional)
The country's lending type code
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of countries to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <countries page="1" pages="1" per_page="10" total="1">
- <country id="IND">
- <name>India</name>
- <iso2Code>IN</iso2Code>
- <region id="SAR">South Asia</region>
- <incomeLevel id="LIC">Low income</incomeLevel>
- <lendingType id="IDB">IDA blend</lendingType>
- </country>
- </countries>
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.
Gets information about an income level.
Arguments
api_key (Required)
Your API key.
id (Optional)
The id of the income level.
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of income levels to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <rsp stat="ok">
- <incomelevels page="1" pages="1" per_page="10" total="1">
- <incomelevel id="LIC">Low income</incomelevel>
- </incomelevels>
- </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.
Gets information about a lending type.
Arguments
api_key (Required)
Your API key.
id (Optional)
The id of the lending type.
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of lending types to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <rsp stat="ok">
- <lendingtypes page="1" pages="1" per_page="10" total="1">
- <lendingtype id="AGG">Aggregates</lendingtype>
- </lendingtypes>
- </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.
Gets information about a region.
Arguments
api_key (Required)
Your API key.
id (Optional)
The id of the region.
page (Optional)
The page of results to return. If this argument is omitted, it defaults to 1.
per_page (Optional)
The number of regions to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 100.
Example Response
- <rsp stat="ok">
- <regions page="1" pages="1" per_page="10" total="1">
- <region id="AFR">Sub-Saharan Africa</region>
- </regions>
- </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: Documentation Version 1
- Up: Documentation Version 1
- Next: Data Calls


Comments
Please sign in to post a comment.