{
  "openapi": "3.1.0",
  "info": {
    "title": "Country Indicators API",
    "version": "1.0.0",
    "description": "24 World Bank development indicators for 217 countries since 1960: GDP, life expectancy, internet use and more.\n\nThe world in numbers: 230,449 annual values for 24 headline development indicators across all 217 countries, from World Bank Open Data (CC-BY 4.0) back to 1960 and current through the latest releases. GDP and GDP per capita, growth, population, life expectancy, fertility and infant mortality, internet and mobile penetration, unemployment and inflation, literacy, electricity access, health/education/military spending, Gini inequality, net migration, FDI, forest cover and CO2 per capita. Rankings answer headline questions with current data — 2025 GDP: US $30.8T, China $19.5T, Germany, Japan, UK; life expectancy led by Monaco at 86.5; Slovakia the most equal society by Gini. Country profiles return the latest value of every indicator in one call (Japan: 123.4M people, 84.0 years, $35,951 GDP per capita); full time series come ready for charting; countries resolve by ISO2, ISO3 or plain name. Aggregates like \"World\" and \"EU\" are deliberately excluded so rankings contain only real countries. Built for dashboards, fintech and market-entry analysis, journalism, education and research. World Bank data (CC-BY), self-hosted — no third-party calls at request time.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/country-indicators.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/country-indicators"
  },
  "servers": [
    {
      "url": "https://api-country-indicators.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Country Indicators API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/country/{code}": {
      "get": {
        "operationId": "countryProfile",
        "summary": "Country Profile",
        "description": "Country Profile endpoint of the Country Indicators API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/country-indicators/country-profile"
        },
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "JP"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "country": {
                    "iso3": "JPN",
                    "iso2": "JP",
                    "name": "Japan",
                    "region": "East Asia & Pacific",
                    "income_level": "High income",
                    "capital": "Tokyo",
                    "longitude": 139.77,
                    "latitude": 35.67
                  },
                  "indicators": [
                    {
                      "indicator": "co2_per_capita",
                      "name": "CO2 emissions per capita",
                      "unit": "t CO2e",
                      "year": 2024,
                      "value": 7.8424
                    },
                    {
                      "indicator": "education_expenditure_pct_gdp",
                      "name": "Education expenditure",
                      "unit": "% of GDP",
                      "year": 2021,
                      "value": 3.3366
                    },
                    {
                      "indicator": "electricity_access_pct",
                      "name": "Access to electricity",
                      "unit": "% of population",
                      "year": 2024,
                      "value": 100
                    },
                    {
                      "indicator": "fdi_pct_gdp",
                      "name": "Foreign direct investment inflows",
                      "unit": "% of GDP",
                      "year": 2025,
                      "value": 1.0328
                    },
                    {
                      "indicator": "fertility_rate",
                      "name": "Fertility rate",
                      "unit": "births per woman",
                      "year": 2024,
                      "value": 1.15
                    },
                    {
                      "indicator": "forest_area_pct",
                      "name": "Forest area",
                      "unit": "% of land area",
                      "year": 2023,
                      "value": 68.3958
                    },
                    {
                      "indicator": "gdp",
                      "name": "GDP",
                      "unit": "current US$",
                      "year": 2025,
                      "value": 4435162999976.94
                    },
                    {
                      "indicator": "gdp_growth",
                      "name": "GDP growth",
                      "unit": "% annual",
                      "year": 2025,
                      "value": 1.1931
                    },
                    {
                      "indicator": "gdp_per_capita",
                      "name": "GDP per capita",
                      "unit": "current US$",
                      "year": 2025,
                      "value": 35951.045
                    },
                    {
                      "indicator": "gini",
                      "name": "Gini index",
                      "unit": "0-100",
                      "year": 2020,
                      "value": 32.3
                    },
                    {
                      "indicator": "gni_per_capita",
                      "name": "GNI per capita",
                      "unit": "current US$",
                      "year": 2025,
                      "value": 38340
                    },
                    {
                      "indicator": "health_expenditure_pct_gdp",
                      "name": "Health expenditure",
                      "unit": "% of GDP",
                      "year": 2023,
                      "value": 10.7398
                    },
                    {
                      "indicator": "infant_mortality",
                      "name": "Infant mortality",
                      "unit": "per 1,000 live births",
                      "year": 2024,
                      "value": 1.8
                    },
                    {
                      "indicator": "inflation_pct",
                      "name": "Inflation (consumer prices)",
                      "unit": "% annual",
                      "year": 2025,
                      "value": 3.1725
                    },
                    {
                      "indicator": "internet_users_pct",
                      "name": "Internet users",
                      "unit": "% of population",
                      "year": 2024,
                      "value": 85.5415
                    },
                    {
                      "indicator": "life_expectancy",
                      "name": "Life expectancy at birth",
                      "unit": "years",
                      "year": 2024,
                      "value": 84.0363
                    },
                    {
                      "indicator": "military_expenditure_pct_gdp",
                      "name": "Military expenditure",
                      "unit": "% of GDP",
                      "year": 2024,
                      "value": 1.3714
                    },
                    {
                      "indicator": "mobile_subscriptions",
                      "name": "Mobile subscriptions",
                      "unit": "per 100 people",
                      "year": 2023,
                      "value": 178.4324
                    },
                    {
                      "indicator": "net_migration",
                      "name": "Net migration",
                      "unit": "people",
                      "year": 2025,
                      "value": 140579
                    },
                    {
                      "indicator": "population",
                      "name": "Population",
                      "unit": "people",
                      "year": 2025,
                      "value": 123366734
                    },
                    {
                      "indicator": "population_growth",
                      "name": "Population growth",
                      "unit": "% annual",
                      "year": 2025,
                      "value": -0.4921
                    },
                    {
                      "indicator": "unemployment_pct",
                      "name": "Unemployment",
                      "unit": "% of labor force",
                      "year": 2025,
                      "value": 2.451
                    },
                    {
                      "indicator": "urban_population_pct",
                      "name": "Urban population",
                      "unit": "% of total",
                      "year": 2025,
                      "value": 92.3001
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/rankings": {
      "get": {
        "operationId": "countryRankings",
        "summary": "Country Rankings",
        "description": "Country Rankings endpoint of the Country Indicators API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/country-indicators/country-rankings"
        },
        "parameters": [
          {
            "name": "indicator",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "gdp"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "25"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "desc"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2025"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "indicator": {
                    "slug": "gdp",
                    "name": "GDP",
                    "unit": "current US$"
                  },
                  "year": 2025,
                  "order": "desc",
                  "count": 25,
                  "results": [
                    {
                      "rank": 1,
                      "iso3": "USA",
                      "name": "United States",
                      "region": "North America",
                      "value": 30769700000000
                    },
                    {
                      "rank": 2,
                      "iso3": "CHN",
                      "name": "China",
                      "region": "East Asia & Pacific",
                      "value": 19498039388042.6
                    },
                    {
                      "rank": 3,
                      "iso3": "DEU",
                      "name": "Germany",
                      "region": "Europe & Central Asia",
                      "value": 5050922925047.05
                    },
                    {
                      "rank": 4,
                      "iso3": "JPN",
                      "name": "Japan",
                      "region": "East Asia & Pacific",
                      "value": 4435162999976.94
                    },
                    {
                      "rank": 5,
                      "iso3": "GBR",
                      "name": "United Kingdom",
                      "region": "Europe & Central Asia",
                      "value": 4002587541846.01
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Country Indicators API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/country-indicators/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "attribution": "Data: World Bank Open Data (CC-BY 4.0)",
                  "count": 1,
                  "sources": [
                    {
                      "slug": "world-bank",
                      "name": "World Bank Open Data (World Development Indicators)",
                      "publisher": "The World Bank",
                      "licence": "CC-BY 4.0 - attribution required",
                      "source_url": "https://data.worldbank.org/",
                      "file_url": "https://api.worldbank.org/v2",
                      "cadence": "periodic re-harvest (WB updates quarterly)",
                      "record_count": 230449,
                      "retrieved_at": "2026-09-06"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/indicators": {
      "get": {
        "operationId": "indicatorCatalog",
        "summary": "Indicator Catalog",
        "description": "Indicator Catalog endpoint of the Country Indicators API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/country-indicators/indicator-catalog"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 24,
                  "indicators": [
                    {
                      "code": "EN.GHG.CO2.PC.CE.AR5",
                      "slug": "co2_per_capita",
                      "name": "CO2 emissions per capita",
                      "unit": "t CO2e"
                    },
                    {
                      "code": "SE.XPD.TOTL.GD.ZS",
                      "slug": "education_expenditure_pct_gdp",
                      "name": "Education expenditure",
                      "unit": "% of GDP"
                    },
                    {
                      "code": "EG.ELC.ACCS.ZS",
                      "slug": "electricity_access_pct",
                      "name": "Access to electricity",
                      "unit": "% of population"
                    },
                    {
                      "code": "BX.KLT.DINV.WD.GD.ZS",
                      "slug": "fdi_pct_gdp",
                      "name": "Foreign direct investment inflows",
                      "unit": "% of GDP"
                    },
                    {
                      "code": "SP.DYN.TFRT.IN",
                      "slug": "fertility_rate",
                      "name": "Fertility rate",
                      "unit": "births per woman"
                    },
                    {
                      "code": "AG.LND.FRST.ZS",
                      "slug": "forest_area_pct",
                      "name": "Forest area",
                      "unit": "% of land area"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/data": {
      "get": {
        "operationId": "indicatorSeries",
        "summary": "Indicator Series",
        "description": "Indicator Series endpoint of the Country Indicators API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/country-indicators/indicator-series"
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "USA"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2020"
          },
          {
            "name": "indicator",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "gdp"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2024"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "indicator": {
                    "slug": "gdp",
                    "name": "GDP",
                    "unit": "current US$"
                  },
                  "country": {
                    "iso3": "USA",
                    "name": "United States"
                  },
                  "count": 5,
                  "values": [
                    {
                      "year": 2020,
                      "value": 21375281000000
                    },
                    {
                      "year": 2021,
                      "value": 23725645000000
                    },
                    {
                      "year": 2022,
                      "value": 26054614000000
                    },
                    {
                      "year": 2023,
                      "value": 27811517000000
                    },
                    {
                      "year": 2024,
                      "value": 29298013000000
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/countries": {
      "get": {
        "operationId": "listCountries",
        "summary": "List Countries",
        "description": "List Countries endpoint of the Country Indicators API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/country-indicators/list-countries"
        },
        "parameters": [
          {
            "name": "income",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "japan"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 1,
                  "countries": [
                    {
                      "iso3": "JPN",
                      "iso2": "JP",
                      "name": "Japan",
                      "region": "East Asia & Pacific",
                      "income_level": "High income",
                      "capital": "Tokyo",
                      "longitude": 139.77,
                      "latitude": 35.67
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}