{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Scraper [$0.7💰 / 1k]",
    "description": "Extract structured data from Wikipedia articles only $0.7/1k: infobox fields, section headings, tables, and raw wikitext. Uses Wikipedia REST API for structured data. Supports all language editions. Ideal for researchers, educators, AI trainers, and knowledge graph builders",
    "version": "1.0",
    "x-build-id": "bkTLTzrtdayXdEq67"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~wikipedia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-wikipedia-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/ahmed_jasarevic~wikipedia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-wikipedia-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/ahmed_jasarevic~wikipedia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-wikipedia-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "minItems": 1,
            "type": "array",
            "description": "URLs to start scraping from (Wikipedia article URLs).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "extractInfobox": {
            "title": "Extract Infobox",
            "type": "boolean",
            "description": "Whether to extract infobox key-value pairs from the top-right infobox.",
            "default": true
          },
          "extractSectionHeadings": {
            "title": "Extract Section Headings",
            "type": "boolean",
            "description": "Whether to extract section headings (h2, h3) and their hierarchy.",
            "default": true
          },
          "extractMainText": {
            "title": "Extract Article Text",
            "type": "boolean",
            "description": "Whether to extract the full article text plus per-section text of each page.",
            "default": true
          },
          "maxSectionTextLength": {
            "title": "Max Text Length per Section",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of characters stored per section's text (0 = unlimited).",
            "default": 50000
          },
          "extractTables": {
            "title": "Extract Tables",
            "type": "boolean",
            "description": "Whether to extract wikitext tables from the article content.",
            "default": true
          },
          "extractWikitext": {
            "title": "Extract Wikitext",
            "type": "boolean",
            "description": "Whether to extract the raw wikitext of the article.",
            "default": false
          },
          "maxInfoboxFields": {
            "title": "Max Infobox Fields",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of infobox fields to extract (0 = all).",
            "default": 50
          },
          "maxSectionDepth": {
            "title": "Max Section Depth",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Maximum section heading depth to extract (1 = h2 only, 2 = h2+h3, etc.).",
            "default": 3
          },
          "maxTables": {
            "title": "Max Tables",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of tables to extract (0 = all).",
            "default": 20
          },
          "useApiForInfobox": {
            "title": "Use Wikipedia API for Infobox",
            "type": "boolean",
            "description": "Use Wikipedia REST API to parse infobox from wikitext (more accurate). Disable to use HTML parsing only.",
            "default": true
          },
          "useApiForSections": {
            "title": "Use Wikipedia API for Sections",
            "type": "boolean",
            "description": "Use Wikipedia REST API to get section hierarchy from TOC (more accurate). Disable to use HTML parsing only.",
            "default": true
          },
          "language": {
            "title": "Wikipedia Language",
            "pattern": "^[a-z]{2,3}(-[a-z]{2,3})?$",
            "type": "string",
            "description": "Wikipedia language edition code (e.g., 'en', 'de', 'fr', 'es', 'ja', 'zh').",
            "default": "en"
          },
          "maxRequestsPerCrawl": {
            "title": "Max Requests per Crawl",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of pages to scrape (0 = unlimited).",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum concurrent requests (higher = faster but more likely to hit rate limits).",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}