{
  "openapi": "3.0.1",
  "info": {
    "title": "World Bank Data Scraper",
    "description": "Scrape World Bank Open Data: GDP, population, inflation, unemployment, CO2 and 1,500+ development indicators for every country, region and year since 1960, by indicator code, keyword or data.worldbank.org link, with region and income level. No API key, no login.",
    "version": "1.0",
    "x-build-id": "OyKan3dWA1MEt2yto"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/anyxsolutions~world-bank-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-anyxsolutions-world-bank-data-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/anyxsolutions~world-bank-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-anyxsolutions-world-bank-data-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/anyxsolutions~world-bank-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-anyxsolutions-world-bank-data-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": {
          "startUrls": {
            "title": "World Bank data URLs",
            "type": "array",
            "description": "Public data.worldbank.org pages: an indicator page with its countries and years (https://data.worldbank.org/indicator/NY.GDP.MKTP.CD?locations=US-CN&start=2000&end=2020), or a country or region page (https://data.worldbank.org/country/united-states), which returns that country's headline indicators.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "indicators": {
            "title": "Indicator codes",
            "type": "array",
            "description": "World Bank indicator codes, one per line, for example NY.GDP.MKTP.CD. Popular codes: NY.GDP.MKTP.CD (GDP, current US$), NY.GDP.PCAP.CD (GDP per capita), NY.GDP.MKTP.KD.ZG (GDP growth, %), SP.POP.TOTL (population), FP.CPI.TOTL.ZG (inflation, %), SL.UEM.TOTL.ZS (unemployment, %), SP.DYN.LE00.IN (life expectancy), EN.GHG.CO2.PC.CE.AR5 (CO2 per capita), SI.POV.DDAY (extreme poverty, %), IT.NET.USER.ZS (internet users, %). The code of any indicator is in its data.worldbank.org address.",
            "items": {
              "type": "string"
            }
          },
          "indicatorSearch": {
            "title": "Indicator search",
            "type": "array",
            "description": "Find indicators by name, one search per line, for example unemployment total, gdp per capita or renewable energy. Every word must appear in the indicator name; a code prefix such as SL.UEM also works. Searches cover the World Development Indicators.",
            "items": {
              "type": "string"
            }
          },
          "maxIndicatorsPerSearch": {
            "title": "Indicators per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many matching indicators each search returns, best matches first: names that start with the search, then the most general.",
            "default": 5
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Countries, regions or groups, one per line, by ISO2 or ISO3 code or by name, for example US, CHN, Germany, WLD (world), EUU (European Union), EAS (East Asia & Pacific) or HIC (high income). Leave empty or enter all for every country.",
            "items": {
              "type": "string"
            }
          },
          "includeAggregates": {
            "title": "Include regions and income groups",
            "type": "boolean",
            "description": "When every country is asked for, also return the regional and income-group aggregates such as World, European Union, Sub-Saharan Africa and High income. Aggregates named in Countries are always returned.",
            "default": false
          },
          "yearFrom": {
            "title": "From year",
            "minimum": 1960,
            "maximum": 2100,
            "type": "integer",
            "description": "Only return values for this year or later, for example 2000. Leave empty to start at the first year on record (1960)."
          },
          "yearTo": {
            "title": "To year",
            "minimum": 1960,
            "maximum": 2100,
            "type": "integer",
            "description": "Only return values for this year or earlier, for example 2020. Leave empty to end at the latest year."
          },
          "mostRecentValues": {
            "title": "Most recent values",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Return only the latest N years per country, for example 1 for a snapshot of the latest value. Overrides From year and To year."
          },
          "skipEmptyValues": {
            "title": "Skip years without a value",
            "type": "boolean",
            "description": "Leave out rows for years the World Bank has no value for. With Most recent values, returns the latest N years that do have a value.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows per source",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rows (one country, indicator and year each) to return per indicator code, search match or URL. Leave empty for every row."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. World Bank data is public and needs no proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}