Aggregate API Queries

Aggregates—by region, income level or lending group—are also available in the API. You can retrieve data for aggregates by using the appropriate code where you would otherwise specify a country.

The following two examples retrieve GDP data for Brazil (BRA) and the Latin America and Caribbean region as a whole (LCN):

Aggregate Definitions in the API

To get the definition list of all Region codes:


<?xml version="1.0" encoding="utf-8"?>
<wb:regions page="1" pages="1" per_page="50" total="48" xmlns:wb="">
  <wb:region id="">


    "page": "1",
    "pages": "1",
    "per_page": "50",
    "total": "48"
      "id": "",
      "code": "AFR",
      "iso2code": "A9",
      "name": "Africa"

To get the definition list of all Income Level codes:

To get the definition list of all Lending Type codes:

Or you can retrieve a select list of regions, income levels or lending types, separating multiple codes with semicolons (;):;IDB

Querying a country shows you which aggregate groups it belongs to:

Conversely, you can apply a filter to see all countries in a specified aggregate:

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