About the Data Catalog API

The Data Catalog API provides programmatic access to the list of datasets in the World Bank’s Open Data Catalog with associated metadata. The users can query metadata for specific datasets and also retrieve datasets using various facets such as Economy Coverage, Topics, Periodicity and Access options.

Web developers can use this API to access the World Bank’s data catalog information in real time to support their own applications, so long as they abide by the World Bank’s Terms of Use.

The Basic Request

The API uses REST-based requests, in which the general form looks like this:

http://api.worldbank.org/v2/datacatalog

The Request supports the following parameters

format - output format. API supports two formats: XML and JSON

http://api.worldbank.org/v2/datacatalog?format=xml

http://api.worldbank.org/v2/datacatalog?format=json

metatypes - The data catalog now provides access to more comprehensive metadata. The metatypes parameter allows you to selectively filter the metadata returned in the response format.

http://api.worldbank.org/v2/datacatalog/metatypes/name http://api.worldbank.org/v2/datacatalog/metatypes/name;numberofeconomies

source - The datasets available through the API come from several World Bank sources. The sources parameter allows you to filter the response for selected datasets using the datacatalog id.

http://api.worldbank.org/v2/datacatalog/1 http://api.worldbank.org/v2/datacatalog/1/metatypes/name;cite

search - The search parameter allows you to filter datasets by searching for a specific match in metatype descriptions.

http://api.worldbank.org/v2/datacatalog/search/poverty

Reponse Format

By default, all requests will respond with valid XML. To receive the response in JSON format, you may provide format=json in any request.

For any valid request, the API will return one or more objects or rows, each representing a dataset from the data catalog. They are uniquely identified by the data catalog id attribute.

Sample API Response

XML

<wb:metadata xmlns:wb="http://www.worldbank.org" page="1" pages="13" per_page="10" total="130">
<wb:datacatalog id="1">
<wb:metatype id="name">World Development Indicators</wb:metatype>
<wb:metatype id="acronym">WDI</wb:metatype>
<wb:metatype id="type">Time series</wb:metatype>
  …


<wb:metatype id="accessoption">API, Bulk download, Query tool, Mobile app</wb:metatype>
</wb:datacatalog>
<wb:datacatalog id="2">
<wb:metatype id="periodicity">Annual</wb:metatype>



<wb:metatype id="apiaccessurl">http://data.worldbank.org/developers</wb:metatype>
</wb:datacatalog>
</wb:metadata>

JSON

{"page":1,"pages":13,"per_page":"10","total":130,"datacatalog":[{"id":"1","metatype":[{"id":"name","value":"World Development Indicators"},{"id":"acronym","value":"WDI"},{"id":"description","value":"The primary World Bank collection of development indicators, compiled from officially-recognized international sources. It presents the most current and accurate global development data available, and includes national, regional and global estimates."},{"id":"url","value":"http://databank.worldbank.org/ddp/home.do?Step=12&id=4&CNO=2"}
…………..
…………..
,{"id":"apiaccessurl","value":"http://data.worldbank.org/developers"}]}]}

Help/Feedback

User Voice