Skip to main content
POST
/
api
/
worldbank
/
indicators
/worldbank/indicators
curl --request POST \
  --url https://api.anysite.io/api/worldbank/indicators \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "indicator": "<string>",
  "count": 2,
  "timeout": 300,
  "country": "all",
  "date": "2020",
  "source": 2,
  "mrv": 2
}
'
[
  {
    "@type": "@worldbank_indicator_value",
    "indicator": {
      "@type": "@worldbank_ref",
      "id": "<string>",
      "iso2_code": "<string>",
      "value": "<string>"
    },
    "country": {
      "@type": "@worldbank_ref",
      "id": "<string>",
      "iso2_code": "<string>",
      "value": "<string>"
    },
    "countryiso3code": "<string>",
    "date": "<string>",
    "value": 123,
    "decimal": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
indicator
string
required

Indicator code

Minimum string length: 1
Examples:

"NY.GDP.MKTP.CD"

"SP.POP.TOTL"

"FP.CPI.TOTL.ZG"

count
integer
required

Max number of observations to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
country
string
default:all

Country as an ISO2 or ISO3 code, a semicolon-separated list, or 'all' for every country

Examples:

"USA"

"US;CN;BR"

"all"

date
string | null

Time period: a single year ('2020') or an inclusive year range ('2018:2020'). For monthly frequency use 'YYYYMmm' ('2020M01' or '2020M01:2020M06'); for quarterly use 'YYYYQq' ('2020Q1' or '2020Q1:2020Q4')

Example:

"2020"

frequency
enum<string> | null

Observation frequency; use monthly or quarterly together with a matching date format

Available options:
M,
Q,
Y
source
integer | null

Restrict to observations from this data source id

Required range: x >= 1
Example:

2

mrv
integer | null

Return only the most recent N observations per country

Required range: x >= 1

Response

Successful Response

@type
string
default:@worldbank_indicator_value
indicator
WorldbankRef · object
country
WorldbankRef · object
countryiso3code
string | null
date
string | null
value
number | null
decimal
integer | null