{
  "openapi": "3.0.1",
  "info": {
    "title": "World Bank Indicators API: Countries, GDP, Population, More",
    "description": "Search World Bank indicators, get country time series (GDP, population, life expectancy...) and rank countries by latest value. CC BY 4.0 indicators only, with source, licence and update date in every record. Unofficial.",
    "version": "0.1",
    "x-build-id": "ZMx3C5R5a3WvdSCnx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shadow-tools~world-bank-indicators-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shadow-tools-world-bank-indicators-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/shadow-tools~world-bank-indicators-api/runs": {
      "post": {
        "operationId": "runs-sync-shadow-tools-world-bank-indicators-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/shadow-tools~world-bank-indicators-api/run-sync": {
      "post": {
        "operationId": "run-sync-shadow-tools-world-bank-indicators-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "getIndicator",
              "searchIndicators",
              "compareCountries"
            ],
            "type": "string",
            "description": "Pick one. \"getIndicator\" = use when you know the indicator id (e.g. NY.GDP.PCAP.CD) and want its values for some countries and years, one flat row per country and year. \"searchIndicators\" = use when you only know a topic or keyword (e.g. \"unemployment\") and need the indicator id, name, unit, source and licence. \"compareCountries\" = use to rank countries on one indicator using each country's latest available value. Allowed values: getIndicator, searchIndicators, compareCountries. Default: getIndicator.",
            "default": "getIndicator"
          },
          "query": {
            "title": "Search keywords (searchIndicators)",
            "type": "string",
            "description": "Words to look for in indicator ids and names, all words must match, accents and case ignored, e.g. \"gdp per capita\" or \"life expectancy\". Required in searchIndicators mode (or use topic), ignored in the other modes."
          },
          "topic": {
            "title": "Topic (searchIndicators)",
            "type": "string",
            "description": "Optional World Bank topic name or number to restrict the search, e.g. \"Health\", \"Economy & Growth\" or \"3\". Partial names work (\"econ\"). Empty = all topics. Ignored in the other modes."
          },
          "sourceId": {
            "title": "Source database (searchIndicators)",
            "type": "string",
            "description": "World Bank database id to search in, e.g. \"2\" (World Development Indicators, the main one) or \"all\" for every database (slower, about 29,000 indicators). Many other databases are listed in the sourceId field of results. Default: \"2\".",
            "default": "2"
          },
          "indicators": {
            "title": "Indicator ids",
            "maxItems": 10,
            "type": "array",
            "description": "World Bank indicator ids as a list, e.g. [\"NY.GDP.PCAP.CD\"] (GDP per capita, current US$) or [\"SP.POP.TOTL\", \"SP.DYN.LE00.IN\"] (population, life expectancy). At most 10; compareCountries takes exactly one. Find ids with searchIndicators. Empty = [\"NY.GDP.PCAP.CD\"]. Only indicators declared CC BY 4.0 by the World Bank are returned.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "maxItems": 300,
            "type": "array",
            "description": "Countries as a list of ISO3 codes (\"FRA\"), ISO2 codes (\"DE\") or exact English names (\"United States\"), e.g. [\"FRA\", \"DEU\", \"USA\"]. Groups: \"all\" (every country, no aggregates), \"aggregates\" (World, regions, income groups), \"region:ECS\" (Europe & Central Asia), \"income:HIC\" (high income). Aggregate codes like \"WLD\" or \"EUU\" are accepted and flagged isAggregate. Empty = [\"FRA\", \"DEU\", \"USA\"].",
            "items": {
              "type": "string"
            }
          },
          "startYear": {
            "title": "Start year",
            "minimum": 1960,
            "maximum": 2100,
            "type": "integer",
            "description": "First year of the period, an integer between 1960 and 2100, e.g. 2015. Use together with endYear, or alone to get everything since that year. Leave empty (and latestValues empty) to get the last 5 available values per country."
          },
          "endYear": {
            "title": "End year",
            "minimum": 1960,
            "maximum": 2100,
            "type": "integer",
            "description": "Last year of the period, an integer between 1960 and 2100, e.g. 2023. In compareCountries mode it caps which year can be used as the latest value. Empty = up to the latest year published."
          },
          "latestValues": {
            "title": "Latest N values per country",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Return the most recent N non-empty values of each country, an integer between 1 and 100, e.g. 5. Cannot be combined with startYear or endYear. Empty = 5 when no years are given. Ignored in compareCountries (always the latest one)."
          },
          "includeMissing": {
            "title": "Include empty values",
            "type": "boolean",
            "description": "true to also return rows where the World Bank has no value (value is null, never filled in; empty rows are billed like any record), e.g. true. Default: false (empty rows are skipped and counted in the run SUMMARY).",
            "default": false
          },
          "onlyReusable": {
            "title": "Hide non-reusable indicators (search)",
            "type": "boolean",
            "description": "searchIndicators only: true to list only indicators declared CC BY 4.0, which are the only ones getIndicator can return, e.g. true. false also lists indicators under other licences, flagged reusable false. Default: true.",
            "default": true
          },
          "order": {
            "title": "Ranking order (compare)",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "compareCountries only: \"desc\" = highest value ranks 1 (default), \"asc\" = lowest value ranks 1, e.g. \"desc\". Allowed values: desc, asc.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of records returned (rows, ranked countries or indicators), an integer between 1 and 50000, e.g. 20. All countries over 60 years of one indicator is about 16,000 rows. Default: 20.",
            "default": 20
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}