Excel Maestro

Excel Maestro · GPT アクション

World Bank Economic and Population Data API

This API allows users to retrieve economic and population data from the World Bank, including GDP, population statistics, unemployment rates, CO2 emissions, and energy use.

  • GET /country/{country_code}/indicator/{indicator_code}getCountryIndicator

    Retrieve specific economic or population data for a country.

元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "World Bank Economic and Population Data API",
    "description": "This API allows users to retrieve economic and population data from the World Bank, including GDP, population statistics, unemployment rates, CO2 emissions, and energy use.",
    "version": "v2.0"
  },
  "servers": [
    {
      "url": "https://api.worldbank.org/v2"
    }
  ],
  "paths": {
    "/country/{country_code}/indicator/{indicator_code}": {
      "get": {
        "description": "Retrieve specific economic or population data for a country.",
        "operationId": "getCountryIndicator",
        "parameters": [
          {
            "name": "country_code",
            "in": "path",
            "description": "The ISO country code or World Bank country code.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "indicator_code",
            "in": "path",
            "description": "The specific indicator code for the data required, such as GDP, population, etc.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "The date or date range for the data requested.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The format of the response (json, xml).",
            "required": false,
            "schema": {
              "type": "string",
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with the requested data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}