REST based and Argument based Queries

The Indicators API supports two basic ways to build queries: a url based structure and an argument based structure. For example, the following two requests will return the same data, a list of countries with income level classified as low income:

Argument based >

URL based >

Request Format

Requests support the following parameters:

date – date-range by year, month or quarter that scopes the result-set. A range is indicated using the colon separator
additionally supports, year to date values (YTD: ). Useful for querying high frequency data

format – output format. API supports three formats: XML, JSON and JSONP
Note: For JsonP format, 'prefix' parameter needs to be specified.

page – utility parameter for paging through a large result-set. Indicates the page number requested from the recordset.

per_page – number of results per page, for pagination of the result-set. Default setting is 50

MRV - fetches most recent values based on the number specified.

Gapfill- (Y/N) Works with MRV. Fills values, if not available, by back tracking to the next available period (max number of periods back tracked will be limited by MRV number)

Frequency - for fetching quarterly (Q), monthly(M) or yearly (Y) values. Currently works along with MRV. Useful for querying high frequency data.


Any call to the API can be prefixed with a language code to retrieve localized results. When no language is specified english is assumed. The following languages are available:

Code Language
en English
es Español
fr Français
ar العربية
zh 中文

To retrieve the full list of indicators in Spanish you would use the following query:



Use a colon “:” to indicates a range (for numeric values only). For example, "5:10" – calls numeric value range from 5 to 10.

Logical AND
semicolon “;” represents logical AND. E.g.: “us;ge” – calls either United States AND Georgia.


One common use of the API would be get indicator data about countries.

To get information about a specific indicator - for example, the 2006 data on the GDP of Brazil: >

Response 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.

Sample API Response

A valid request returns this:

<rsp stat="ok"> 

An invalid request returns this - see Error codes for a full listing of possible errors.

<rsp stat="fail">     
        <err code="[error-code]" msg="[error-message]">   

Current limitations

  • You cannot currently sort any requests. Generally results are returned in a reasonable order (ie alpha), but that order cannot be controlled.


User Voice