{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Article Watch & Scraper API",
    "description": "Wikipedia scraper and API: current article summaries, full text, sections and pageviews, or only the articles that changed since your last run. Never charged for failed or unchanged rows. Attribution on every row; articles about people are left out.",
    "version": "0.1",
    "x-build-id": "8IUTEI0SwM4fXEfsn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mouadapi~wikipedia-articles/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mouadapi-wikipedia-articles",
        "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~wikipedia-articles/runs": {
      "post": {
        "operationId": "runs-sync-mouadapi-wikipedia-articles",
        "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~wikipedia-articles/run-sync": {
      "post": {
        "operationId": "run-sync-mouadapi-wikipedia-articles",
        "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": {
          "articles": {
            "title": "Articles",
            "type": "array",
            "description": "Required (or give searchQuery instead). Article titles or Wikipedia URLs, one per line (English, French or German Wikipedia: https://fr.wikipedia.org/wiki/Paris). Titles use the language below.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search (export mode)",
            "type": "array",
            "description": "Search text, one query per line; each finds up to maxResults articles. A search without articles runs as an export. Articles about people are left out.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "watch",
              "export"
            ],
            "type": "string",
            "description": "watch: remember your articles and output only what changed since the last run with the same watch list name (stateName). export: output each article's current content every run. If you leave it empty: a search without articles is an export, a watch list name means watch, and nothing means export (the same call returns the articles every time)."
          },
          "stateName": {
            "title": "Watch list name (watch mode)",
            "type": "string",
            "description": "Name of your watch list. Giving a name turns on watch mode (unless mode says otherwise). The run remembers each article under this name in your own Apify storage and compares with it next time. Watch mode without a name uses the list \"default\"."
          },
          "includeUnchanged": {
            "title": "Also output unchanged articles (watch mode, free)",
            "type": "boolean",
            "description": "Watch mode: also output articles that did not change (changeType \"unchanged\", never charged). Off: only changed articles are output.",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr",
              "de"
            ],
            "type": "string",
            "description": "Wikipedia language for titles and searches: en, fr or de (the languages where articles about people can be recognised and left out). URLs keep their own language.",
            "default": "en"
          },
          "maxResults": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Export mode: most articles per search query (default 10)."
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Add the whole article as plain text (default off). Costs one extra request per article."
          },
          "includeSections": {
            "title": "Include section titles (export mode)",
            "type": "boolean",
            "description": "Export mode: add the list of section titles (watch mode always includes them). Costs one extra request per article.",
            "default": false
          },
          "includeCategories": {
            "title": "Include categories",
            "type": "boolean",
            "description": "Add the article's visible categories.",
            "default": false
          },
          "includePageviews": {
            "title": "Include pageviews (last 30 days)",
            "type": "boolean",
            "description": "Add daily user pageviews for the last 30 full days, summed and per day. Costs one extra request per article.",
            "default": false
          },
          "maxItems": {
            "title": "Max articles per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most articles checked in one run (listed articles plus search results; default 100, at most 1,000). Articles beyond it are listed in the log and not checked.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}