View input schema
{
"type": "object",
"properties": {
"source_id": {
"description": "Select this source dataset explicitly, including subnational sources. Use worldbank_list_countries with the same source_id for its canonical entity IDs. Omission preserves the standard dataset and automatic fallback.",
"type": "string",
"pattern": "^\\s*\\d*\\s*$"
},
"indicator_id": {
"type": "string",
"pattern": "^[A-Za-z0-9._-]+$",
"description": "One indicator code to query (e.g. NY.GDP.PCAP.CD, SP.POP.TOTL) — not \"all\" or a list of codes. Use worldbank_search_indicators to find valid IDs."
},
"countries": {
"anyOf": [
{
"type": "string",
"pattern": "[^\\s;,|]",
"description": "A single country code, a list separated by commas, semicolons, or pipes, or \"all\"."
},
{
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"description": "A country code."
},
"description": "An array of country codes; an element holding several codes separated by commas, semicolons, or pipes is split too."
}
],
"description": "Country codes. Accepts: ISO2 (US, CN), ISO3 (USA, CHN), regional aggregate codes (EAS, LCN, MEA, SAS, SSF, ECS, NAC), income group codes (HIC, UMC, LMC, LIC), world code (WLD), or \"all\" on its own for every entry (use pagination). Pass a single code, an array, or one string separated by commas, semicolons, or pipes (US,JP · US;JP · US|JP). At least one code is required — an empty value, or one made only of separators, is rejected rather than treated as \"all\"."
},
"date_range": {
"description": "Time window to filter observations to. Accepts a whole year (`2020`), a quarter (`2020Q1`), or a month (`2020M03`), or a range of two periods of the same type separated by a colon, earliest first (`2010:2023`, `2020Q1:2021Q4`, `2020M01:2020M06`); a range running latest first is rejected. On a series publishing more than one period form, the window's form picks which: `2024` returns the annual value, `2024Q1:2024Q4` the quarters, `2024M01:2024M12` the months, and a quarter or month window is null-filled where the series has none (a notice then names the other forms). On a series with one form, a window at another form keeps the periods it overlaps (`2019:2021` on a quarterly series returns its twelve quarters). A window covering no part of the series returns zero observations rather than the full series. Mutually exclusive with mrv, mrnev, and frequency.",
"type": "string",
"pattern": "^\\s*(?:\\d{4}(?::\\d{4})?|\\d{4}[Qq][1-4](?::\\d{4}[Qq][1-4])?|\\d{4}[Mm](?:0[1-9]|1[0-2])(?::\\d{4}[Mm](?:0[1-9]|1[0-2]))?)?\\s*$"
},
"mrv": {
"description": "Return the N most recent periods (1–100) holding a value for any requested country, clamped to the length of the series. Every requested country comes back at those periods, null where it has no value there rather than with its own older values; mrnev returns each country's own latest values instead. The periods are annual unless frequency names another form (a series with no annual periods keeps its own). Rows are mrv × countries, so page through them with per_page. Mutually exclusive with date_range and mrnev.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"mrnev": {
"description": "Return each requested country's own N most recent periods (1–100) holding a value — its latest non-null observations, however far back they sit. A country with fewer values in the series returns the ones it has, and a country with none returns no rows. The periods are annual unless frequency names another form (a series with no annual periods keeps its own). Mutually exclusive with date_range and mrv.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"frequency": {
"description": "The period form to return, for series such as Global Economic Monitor's that publish quarterly or monthly values beside annual ones: annual (the default), quarterly, or monthly. With mrv or mrnev it picks the form they select from — frequency \"monthly\" with mrv 3 returns the three latest months, where mrv 3 alone returns the three latest years. With neither, it returns the whole series at that form. A series that does not publish the form returns an empty result with a notice saying so, except that with neither mrv nor mrnev a source that null-fills the form (Global Economic Monitor) returns null rows, and a page of them carries a notice. Mutually exclusive with date_range, whose own form (2024, 2024Q1, 2024M01) picks the periods of a window.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"enum": [
"annual",
"quarterly",
"monthly"
],
"description": "annual (2025), quarterly (2025Q4), or monthly (2025M12) periods."
}
]
},
"dimension_value": {
"description": "For indicators answered from their own dataset (the response carries sourceScoped), the value of that dataset's extra dimension to query, by id or by label, matched case-insensitively: a WDI Database Archives release (\"202503\" or \"2025 Mar\"), an ICP or Food Prices for Nutrition classification (\"PPPGlob\", \"FPN 5.0\"), a GDLD sector (\"WHT\"), or an International Debt Statistics counterpart area (\"730\" or \"China\"). Ids are matched first, across every dataset that carries the indicator; a label must match in full, ignoring case and spacing, and a label several values share is rejected with their ids. Omit it for the default, which sourceScoped.dimension reports: the only value when the dataset has one, \"WLD\" (World) for counterpart areas, the newest WDI Database Archives release holding data for the requested countries and periods (the newest release when none does), or otherwise every value with each row labelled. A value the dataset lists neither as an id nor as a label is rejected with every valid id beside its label, and a value for an indicator the standard data endpoint serves is rejected too.",
"type": "string"
},
"page": {
"default": 1,
"description": "Pagination page number (1-based).",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default: server default). Positive integers above 1000 are served at that maximum with the requested and served sizes echoed and a notice. totalPages uses the served size.",
"type": "integer",
"minimum": 1
}
},
"required": [
"indicator_id",
"countries"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}