{
  "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": "egSInxKNVwjZbIWqj"
  },
  "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 (one per line)",
            "type": "array",
            "description": "Which statistics to download. Example: NY.GDP.MKTP.CD (GDP in US$) and SP.POP.TOTL (population). Other popular codes: NY.GDP.PCAP.CD (GDP per capita), FP.CPI.TOTL.ZG (inflation %), 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 (ISO code, one per line)",
            "type": "array",
            "description": "Countries to include, as 2-letter or 3-letter ISO codes. Example: US, BR, MX, CO. Type \"all\" for every country plus regional and income-group aggregates (about 296 series per indicator-year).",
            "default": [
              "all"
            ],
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "First year",
            "minimum": 1960,
            "type": "integer",
            "description": "First year of the time series. Example: 2000. Data starts in 1960.",
            "default": 2000
          },
          "yearTo": {
            "title": "Last year",
            "minimum": 1960,
            "type": "integer",
            "description": "Last year of the time series. Example: 2024. Recent years are often empty until the World Bank publishes them.",
            "default": 2026
          },
          "excludeAggregates": {
            "title": "Countries only, no aggregates",
            "type": "boolean",
            "description": "Drop the World Bank regional and income-group rows (World, Sub-Saharan Africa, High income and so on) and keep individual countries. Applies when Countries is \"all\" or a list.",
            "default": false
          },
          "regions": {
            "title": "Only these regions",
            "type": "array",
            "description": "Keep countries in the selected 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": "Only these income levels",
            "type": "array",
            "description": "Keep countries in the selected 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": "Only these lending categories",
            "type": "array",
            "description": "Keep 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": []
          },
          "skipEmptyValues": {
            "title": "Skip years with no data",
            "type": "boolean",
            "description": "On: drop country-year rows where the indicator has no value, so you only pay for real numbers. Off: keep them as empty rows.",
            "default": true
          },
          "enrichRows": {
            "title": "Add country and indicator details to every row (free)",
            "type": "boolean",
            "description": "Attach region, income level, lending type, capital, coordinates, ISO2 code, aggregate flag, source organization and topics to each data row, so you need no join with the country directory. No extra rows, no extra charge.",
            "default": true
          },
          "includeIndicatorInfo": {
            "title": "Also return one metadata row per indicator",
            "type": "boolean",
            "description": "Adds one row per indicator with its full name, description, source and topics. Each metadata row is billed and counts toward Max rows.",
            "default": true
          },
          "includeCountryDirectory": {
            "title": "Also return the country directory",
            "type": "boolean",
            "description": "Adds one row per country with region, income level and capital. Each directory row is billed and counts toward Max rows.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows (billed)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Total rows to return: data points plus any metadata rows. Example: 10 for a test, 100000 for a full panel. Free Apify users are capped at 10 rows per run; paid users can go up to 1,000,000.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}