{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Data Scraper Pro",
    "description": "An automated crawler that extracts textual content and metadata from Wikipedia pages for building knowledge bases.",
    "version": "0.0",
    "x-build-id": "El3QCPERcfBnkKdBA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~my-actor-39/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-my-actor-39",
        "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/moving_beacon-owner1~my-actor-39/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-my-actor-39",
        "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/moving_beacon-owner1~my-actor-39/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-my-actor-39",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scrape Mode",
            "enum": [
              "page",
              "category",
              "translations"
            ],
            "type": "string",
            "description": "Choose what to scrape:<br><b>page</b> – one or more article pages<br><b>category</b> – all pages inside a category tree<br><b>translations</b> – compare one article across multiple languages",
            "default": "page"
          },
          "topics": {
            "title": "Article Titles",
            "type": "array",
            "description": "Exact Wikipedia article titles to scrape (used in <b>page</b> mode). E.g. <i>Python (programming language)</i>, <i>Alan Turing</i>.",
            "default": [
              "Python (programming language)"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryTitle": {
            "title": "Category Title",
            "type": "string",
            "description": "Full category name to crawl (used in <b>category</b> mode). Must include the <i>Category:</i> prefix. E.g. <i>Category:Physics</i>."
          },
          "comparisonTitle": {
            "title": "Article for Translation Comparison",
            "type": "string",
            "description": "English Wikipedia title to compare across languages (used in <b>translations</b> mode)."
          },
          "language": {
            "title": "Wikipedia Language",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "ja",
              "zh",
              "ar",
              "ru",
              "pl",
              "nl",
              "sv",
              "ko",
              "fa"
            ],
            "type": "string",
            "description": "Language code for the Wikipedia edition to scrape (ISO 639-1). Ignored in <b>translations</b> mode.",
            "default": "en"
          },
          "translationLanguages": {
            "title": "Languages for Translation Comparison",
            "type": "array",
            "description": "Language codes to fetch in <b>translations</b> mode. Leave empty to fetch all available translations.",
            "default": [
              "en",
              "de",
              "fr",
              "ja",
              "ar",
              "es",
              "zh",
              "ru"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryMaxDepth": {
            "title": "Category Depth",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "How many subcategory levels to follow in <b>category</b> mode. 0 = top-level articles only.",
            "default": 1
          },
          "maxPages": {
            "title": "Max Pages (Category Mode)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of article pages to scrape in <b>category</b> mode.",
            "default": 20
          },
          "includeSections": {
            "title": "Include Nested Section Tree",
            "type": "boolean",
            "description": "Store the full nested section structure (title + text + subsections). Note: flat section text is always included in <b>fullTextBySections</b> regardless of this setting.",
            "default": true
          },
          "includeLinks": {
            "title": "Include Outbound Links",
            "type": "boolean",
            "description": "Collect links to other Wikipedia articles found on each page (capped at 50).",
            "default": true
          },
          "includeCategories": {
            "title": "Include Page Categories",
            "type": "boolean",
            "description": "Collect the Wikipedia categories each article belongs to.",
            "default": true
          },
          "includeTranslations": {
            "title": "Include Language Links",
            "type": "boolean",
            "description": "Collect URLs of the same article in other languages (langlinks). Adds one extra API call per page.",
            "default": false
          },
          "requestDelay": {
            "title": "Request Delay (seconds)",
            "minimum": 0.1,
            "maximum": 10,
            "type": "number",
            "description": "Seconds to wait between Wikipedia API calls. Increase if you encounter rate-limiting.",
            "default": 0.5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings for Wikipedia API requests."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}