API: Country Queries

About Country Queries

The following information is available for the countries and economies listed in the World Bank API:

Note: The World Bank follows the ISO 3 letter and 2 letter codes to represent most of the countries, with the following exceptions

3 letter Code differences: Andorra, Congo, Dem. Rep., Isle of Man, Romania, Timor-Leste, West Bank and Gaza

2 letter Code differences: Congo, Dem. Rep., Serbia, Timor-Leste, Yemen, Rep., West Bank and Gaza

Countries not yet represented using ISO codes: Channel Islands, Kosovo

Request Format

http://api.worldbank.org/countries/br where "br" is the two-letter ISO code for Brazil.

Response Format

(Returns ISO 3 and ISO 2 codes wherever present, if not returns WB 3 and WB 2 codes)

XML

<wb:countries page="1" pages="1" per_page="50" total="1" xmlns:wb="http://www.worldbank.org">
- <wb:country id="BRA">
  <wb:iso2Code>BR</wb:iso2Code>
  <wb:name>Brazil</wb:name>
  <wb:region id="LCN">Latin America & Caribbean (all income levels)</wb:region>
  <wb:adminregion id="LCN">Latin America & Caribbean (all income levels)</wb:adminregion>
  <wb:incomeLevel id="UMC">Upper middle income</wb:incomeLevel>
  <wb:lendingType id="IBD">IBRD</wb:lendingType>
  <wb:capitalCity>Brasilia</wb:capitalCity>
  <wb:longitude>-47.9292</wb:longitude>
  <wb:latitude>-15.7801</wb:latitude>
  </wb:country>
  </wb:countries>

JSON

[{"page":1,"pages":1,"per_page":"50","total":1},[{"id":"BRA","iso2Code":"BR","name":"Brazil","region":{"id":"LCN","value":"Latin America & Caribbean (all income levels)"},"adminregion":{"id":"LCN","value":"Latin America & Caribbean (all income levels)"},"incomeLevel":{"id":"UMC","value":"Upper middle income"},"lendingType":{"id":"IBD","value":"IBRD"},"capitalCity":"Brasilia","longitude":"-47.9292","latitude":"-15.7801"}]]

Examples

To list all countries

http://api.worldbank.org/countries

Return entity data for particular country with ISO 3166-1 alpha-2 code “BR” (ISO 3166-1 alpha-3 code "BRA" can be used in place of alpha-2 code)

http://api.worldbank.org/countries/BR

Thank you for visiting the World Bank's Data Help Desk. Please review the terms of use for this website. Your continued use of this website constitutes your acceptance of these terms and conditions.

Developer Info

Feedback and Knowledge Base