{
  "openapi": "3.0.1",
  "info": {
    "title": "World Bank Indicators API: GDP, Population & WDI by Country",
    "description": "World Bank data API: GDP, population, inflation and 1,400+ World Development Indicators by country and year, or only new and revised values since your last run. Never charged for failed or unchanged rows. Not affiliated with or endorsed by the World Bank.",
    "version": "0.1",
    "x-build-id": "OMTlQB6OW074j8UCB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mouadapi~world-bank-indicators/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mouadapi-world-bank-indicators",
        "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/mouadapi~world-bank-indicators/runs": {
      "post": {
        "operationId": "runs-sync-mouadapi-world-bank-indicators",
        "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/mouadapi~world-bank-indicators/run-sync": {
      "post": {
        "operationId": "run-sync-mouadapi-world-bank-indicators",
        "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": "Indicators (WDI codes)",
            "type": "array",
            "description": "World Development Indicators series codes, one per line, e.g. NY.GDP.MKTP.CD (GDP, current US$), SP.POP.TOTL (population), FP.CPI.TOTL.ZG (inflation). Find codes on data.worldbank.org (the code is in each indicator page's address).",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two- or three-letter country codes (FR or FRA), one per line. Empty: every country and economy (regional and income aggregates such as \"World\" only with includeAggregates).",
            "items": {
              "type": "string"
            }
          },
          "mostRecentValues": {
            "title": "Most recent values per country",
            "minimum": 1,
            "maximum": 70,
            "type": "integer",
            "description": "How many of each country's most recent published values to return (1 = the latest published value; years without a value are skipped). Ignored when yearFrom or yearTo is set. Default 1.",
            "default": 1
          },
          "yearFrom": {
            "title": "From year",
            "minimum": 1960,
            "maximum": 2100,
            "type": "integer",
            "description": "First year (e.g. 2000). Optional."
          },
          "yearTo": {
            "title": "To year",
            "minimum": 1960,
            "maximum": 2100,
            "type": "integer",
            "description": "Last year (e.g. 2024). Optional."
          },
          "includeAggregates": {
            "title": "Include regional and income aggregates",
            "type": "boolean",
            "description": "With every country (countries empty): also return aggregates such as World, Euro area or High income. Listed aggregate codes (e.g. WLD) are always returned. Default false.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "watch",
              "export"
            ],
            "type": "string",
            "description": "watch: only values that are new since your last run (a newly published year) or revised (unchanged values are free and left out). export: every value, every run. Empty: watch when a watch list name is given, otherwise export."
          },
          "stateName": {
            "title": "Watch list name",
            "type": "string",
            "description": "Name of your watch list (letters, digits, dashes). The run remembers every value under this name and compares next time. Watch mode without a name uses the list \"default\"."
          },
          "includeUnchanged": {
            "title": "Include unchanged values (free)",
            "type": "boolean",
            "description": "Watch mode: also return values that did not change, as free rows (changeType unchanged). Default false.",
            "default": false
          },
          "maxItems": {
            "title": "Max charged values",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most charged rows (data points) per run. In watch mode, values over the limit are returned in the next run. Default 1,000.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}