{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Scraper: Articles, Summaries & Pageviews",
    "description": "Scrape Wikipedia in any of 300+ languages: full-text article search, clean summaries with description, extract, image and coordinates, plus monthly pageview counts per article. Export CSV, Excel, JSON or XML. No login or API key. Pay only for saved rows.",
    "version": "0.2",
    "x-build-id": "x5ClwQnWF9yAc2KYZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~wikipedia-articles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-wikipedia-articles-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~wikipedia-articles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-wikipedia-articles-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~wikipedia-articles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-wikipedia-articles-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": {
          "language": {
            "title": "Language",
            "pattern": "^[A-Za-z]{2,12}(-[A-Za-z0-9]{1,12}){0,2}$",
            "type": "string",
            "description": "Wikipedia language edition code, for example en, es, de, fr, pt, ja or simple. Any of the 300+ editions works; the code is the subdomain of wikipedia.org.",
            "default": "en"
          },
          "searchQuery": {
            "title": "Search query (optional)",
            "type": "string",
            "description": "Full-text article search keywords, for example artificial intelligence. Each matching article becomes one row. Leave empty to use only the article titles list.",
            "default": "artificial intelligence"
          },
          "searchQueries": {
            "title": "More search queries (optional)",
            "maxItems": 100,
            "type": "array",
            "description": "Extra search keywords, one per line (up to 100). Each query is searched in turn and its rows carry the query and the rank of the hit. An article found by two queries is returned once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max results per search query",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows taken from each search query, from 1 up to 10,000 (the deepest result Wikipedia search serves). The total is still capped by Max Items.",
            "default": 10000
          },
          "fetchSummariesForResults": {
            "title": "Full summaries for search results",
            "type": "boolean",
            "description": "When true, every search hit is enriched with the clean summary (description, extract, image, coordinates) and billed as an article summary. When false, lighter search rows (snippet, size, word count) are returned instead.",
            "default": true
          },
          "articleTitles": {
            "title": "Article titles (optional)",
            "type": "array",
            "description": "Exact article titles or full Wikipedia URLs (any language edition) to fetch, for example Alan Turing. Percent-encoded URLs and #section anchors are accepted. Combine with pageviews to get traffic history per article.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of rows to return (articles, search results and pageview rows together). Free users are limited to 10 rows; paid users can set up to 1,000,000.",
            "default": 10
          },
          "includeCategories": {
            "title": "Categories",
            "type": "boolean",
            "description": "Adds the visible Wikipedia categories of each article (categories and categoryCount). Hidden maintenance categories are left out.",
            "default": false
          },
          "includeFullText": {
            "title": "Full article text",
            "type": "boolean",
            "description": "Adds the complete plain-text article (fullText) with its length and word count. One extra request per article. Long text is cut at the character limit below.",
            "default": false
          },
          "maxFullTextCharacters": {
            "title": "Full text character limit",
            "minimum": 1000,
            "maximum": 500000,
            "type": "integer",
            "description": "Longest fullText kept per article, from 1,000 up to 500,000 characters. Longer articles are cut and marked with fullTextTruncated.",
            "default": 100000
          },
          "includeInfobox": {
            "title": "Infobox",
            "type": "boolean",
            "description": "Adds the article infobox as a label-to-value object (birth date, population, release date and so on). Articles without an infobox simply have no value.",
            "default": false
          },
          "includeSections": {
            "title": "Section outline",
            "type": "boolean",
            "description": "Adds the section headings of each article (sections with number, title and level, plus sectionCount).",
            "default": false
          },
          "includeLinks": {
            "title": "Internal links",
            "type": "boolean",
            "description": "Adds the titles of the Wikipedia articles each article links to (links and linkCount).",
            "default": false
          },
          "includeExternalLinks": {
            "title": "External links",
            "type": "boolean",
            "description": "Adds the external website URLs cited or linked in each article (externalLinks and externalLinkCount).",
            "default": false
          },
          "includeImages": {
            "title": "Article images",
            "type": "boolean",
            "description": "Adds the images of the article body with file name, full-size URL and caption (images and imageCount).",
            "default": false
          },
          "includeLanguageLinks": {
            "title": "Other-language editions",
            "type": "boolean",
            "description": "Adds the same article in other language editions (languageLinks with language code and title, plus languageCount).",
            "default": false
          },
          "maxListEntries": {
            "title": "Max entries per list",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Longest list kept per article for categories, sections, links, external links, images and language links, from 1 up to 2,000. The matching count column still shows the true total.",
            "default": 200
          },
          "includePageviews": {
            "title": "Pageviews",
            "type": "boolean",
            "description": "When true, adds pageview rows (one per month or per day) for each article in the titles list (Wikimedia pageview API).",
            "default": false
          },
          "pageviewGranularity": {
            "title": "Pageview granularity",
            "enum": [
              "monthly",
              "daily"
            ],
            "type": "string",
            "description": "Monthly gives one row per month. Daily gives one row per day, up to about 4,000 per article, so keep the date range short.",
            "default": "monthly"
          },
          "pageviewMonths": {
            "title": "Pageview months back (monthly)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "For monthly granularity without a start date: how many months of history to return per article, from 1 up to 120 (10 years).",
            "default": 12
          },
          "pageviewsStart": {
            "title": "Pageviews start date (optional)",
            "type": "string",
            "description": "First day of the range: YYYY-MM-DD, or relative such as 30d, 8w, 6m, 2y (before today). Data starts 2015-07-01. Empty means 30 days back for daily, or the months-back value for monthly.",
            "default": ""
          },
          "pageviewsEnd": {
            "title": "Pageviews end date (optional)",
            "type": "string",
            "description": "Last day of the range: YYYY-MM-DD, today, yesterday, or relative such as 7d. Empty means today. A future date is cut to today.",
            "default": ""
          },
          "pageviewAccess": {
            "title": "Pageview access method",
            "enum": [
              "all-access",
              "desktop",
              "mobile-web",
              "mobile-app"
            ],
            "type": "string",
            "description": "Which platform to count.",
            "default": "all-access"
          },
          "pageviewAgent": {
            "title": "Pageview agent type",
            "enum": [
              "all-agents",
              "user",
              "spider",
              "automated"
            ],
            "type": "string",
            "description": "Which kind of visitor to count. Real readers are the user agent; spiders and automated traffic are counted apart.",
            "default": "all-agents"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}