{
  "openapi": "3.0.1",
  "info": {
    "title": "World Bank Scraper: GDP, Inflation & 16,000 Indicators",
    "description": "Scrape World Bank Open Data: GDP, inflation, population, unemployment, CO2 and 16,000+ indicators for every country since 1960, one row per country-year, plus indicator definitions and a country directory. Export CSV, Excel, JSON, XML. No login or API key. Not billed for empty runs.",
    "version": "0.1",
    "x-build-id": "LGOfS9PAxcyIUtGmS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~world-bank-indicators-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-world-bank-indicators-scraper",
        "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/recordsdata~world-bank-indicators-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-world-bank-indicators-scraper",
        "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/recordsdata~world-bank-indicators-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-world-bank-indicators-scraper",
        "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": {
          "indicators": {
            "title": "Indicator codes",
            "type": "array",
            "description": "World Bank indicator codes to download as country-year time series, one code per line. Popular: NY.GDP.MKTP.CD (GDP US$), NY.GDP.PCAP.CD (GDP per capita), FP.CPI.TOTL.ZG (inflation %), SP.POP.TOTL (population), SL.UEM.TOTL.ZS (unemployment %), EN.ATM.CO2E.PC (CO2 per capita). Any of the 16,000+ codes from data.worldbank.org/indicator works.",
            "default": [
              "NY.GDP.MKTP.CD",
              "SP.POP.TOTL"
            ],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Countries to include, as ISO2 or ISO3 codes (for example US, BR, CO, MX). Use \"all\" for every country plus regional and income-group aggregates (about 296 series per indicator-year).",
            "default": [
              "all"
            ],
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1960,
            "type": "integer",
            "description": "First year of the time series.",
            "default": 2000
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1960,
            "type": "integer",
            "description": "Last year of the time series.",
            "default": 2026
          },
          "skipEmptyValues": {
            "title": "Skip empty values",
            "type": "boolean",
            "description": "Drop country-year rows where the indicator has no data.",
            "default": true
          },
          "enrichRows": {
            "title": "Add country and indicator details to every row",
            "type": "boolean",
            "description": "Attach region, income level, lending type, capital city, coordinates, ISO2 code, an aggregate flag, the indicator's source organization and topics to each observation row, so no join with the country directory is needed. Free, no extra charge.",
            "default": true
          },
          "excludeAggregates": {
            "title": "Exclude aggregates",
            "type": "boolean",
            "description": "Drop the World Bank's regional and income-group aggregates (World, Sub-Saharan Africa, High income and so on) and keep individual countries only. Applies when Countries is all or a list.",
            "default": false
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Only countries in these World Bank regions. Leave empty for all regions.",
            "items": {
              "type": "string",
              "enum": [
                "EAS",
                "ECS",
                "LCN",
                "MEA",
                "NAC",
                "SAS",
                "SSF"
              ],
              "enumTitles": [
                "East Asia & Pacific",
                "Europe & Central Asia",
                "Latin America & Caribbean",
                "Middle East, North Africa, Afghanistan & Pakistan",
                "North America",
                "South Asia",
                "Sub-Saharan Africa"
              ]
            },
            "default": []
          },
          "incomeLevels": {
            "title": "Income levels",
            "type": "array",
            "description": "Only countries in these World Bank income groups. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "HIC",
                "UMC",
                "LMC",
                "LIC"
              ],
              "enumTitles": [
                "High income",
                "Upper middle income",
                "Lower middle income",
                "Low income"
              ]
            },
            "default": []
          },
          "lendingTypes": {
            "title": "Lending types",
            "type": "array",
            "description": "Only countries with these World Bank lending categories: IBRD, Blend, IDA or Not classified. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "IBD",
                "IDB",
                "IDX",
                "LNX"
              ],
              "enumTitles": [
                "IBRD",
                "Blend",
                "IDA",
                "Not classified"
              ]
            },
            "default": []
          },
          "includeIndicatorInfo": {
            "title": "Indicator metadata",
            "type": "boolean",
            "description": "One row per indicator with its full name, description, source and topics.",
            "default": true
          },
          "includeCountryDirectory": {
            "title": "Country directory",
            "type": "boolean",
            "description": "One row per country with region, income level and capital.",
            "default": false
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of billable rows to return (data points plus metadata rows). Default 10. Free users are limited to 10 rows. Raise it (up to 1,000,000) for full panels.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}