{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Pageviews & Trends: Google Trends Alternative",
    "description": "Wikipedia pageviews: absolute daily or monthly counts for any article list, with growth %, peak, 0–100 index and top-article rankings. Independent tool.",
    "version": "0.1",
    "x-build-id": "7xOSPWZeqjZDald4r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/capable_santolina~pageviews-trends-for-wikipedia/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-capable_santolina-pageviews-trends-for-wikipedia",
        "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/capable_santolina~pageviews-trends-for-wikipedia/runs": {
      "post": {
        "operationId": "runs-sync-capable_santolina-pageviews-trends-for-wikipedia",
        "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/capable_santolina~pageviews-trends-for-wikipedia/run-sync": {
      "post": {
        "operationId": "run-sync-capable_santolina-pageviews-trends-for-wikipedia",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "articles",
              "top"
            ],
            "type": "string",
            "description": "'articles' = one result per article with a full time series and trend metrics. 'top' = the most-viewed articles of a project for one day or month.",
            "default": "articles"
          },
          "articles": {
            "title": "Articles (titles or Wikipedia URLs)",
            "type": "array",
            "description": "Current article titles exactly as on Wikipedia (e.g. 'ChatGPT', 'Taylor Swift') or full URLs (https://en.wikipedia.org/wiki/ChatGPT). Redirect titles are NOT followed: open the article and use the title shown in the address bar. A URL's language edition overrides the Project field. Used in 'articles' mode.",
            "default": [
              "ChatGPT"
            ],
            "items": {
              "type": "string"
            }
          },
          "project": {
            "title": "Project (Wikipedia language edition)",
            "type": "string",
            "description": "Wikimedia project domain, e.g. en.wikipedia.org, de.wikipedia.org, es.wikipedia.org, commons.wikimedia.org, en.wiktionary.org.",
            "default": "en.wikipedia.org"
          },
          "granularity": {
            "title": "Granularity",
            "enum": [
              "daily",
              "monthly"
            ],
            "type": "string",
            "description": "Daily or monthly data points (articles mode). Data is available from 2015-07-01.",
            "default": "daily"
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to 30 days (daily) or 12 complete months (monthly) ending at the end date. Data starts 2015-07-01."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "YYYY-MM-DD (inclusive). Defaults to the latest day (or month) Wikimedia has published. Later dates are clamped to it, so unpublished days never appear as zeros. With monthly granularity, the series ends at the last complete published month. In 'top' mode this is the day (or month) to rank."
          },
          "access": {
            "title": "Access method",
            "enum": [
              "all-access",
              "desktop",
              "mobile-web",
              "mobile-app"
            ],
            "type": "string",
            "description": "Which traffic to count.",
            "default": "all-access"
          },
          "agent": {
            "title": "Agent type",
            "enum": [
              "user",
              "all-agents",
              "automated",
              "spider"
            ],
            "type": "string",
            "description": "'user' = traffic not classified as bots (self-identified spiders and heuristically detected automated traffic are excluded; some undetected bot traffic may remain). Only used in 'articles' mode; 'top' rankings always use 'user' traffic.",
            "default": "user"
          },
          "includeSeries": {
            "title": "Include full time series",
            "type": "boolean",
            "description": "Include the per-day/per-month data points array in each result. Turn off for summary-only output.",
            "default": true
          },
          "topLimit": {
            "title": "Top articles limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many top articles to return in 'top' mode (max 1000). Special pages such as Main_Page are excluded by default.",
            "default": 100
          },
          "excludeSpecialPages": {
            "title": "Exclude Main Page and Special: pages (top mode)",
            "type": "boolean",
            "description": "Skip the Main Page and common special/namespace pages (Special:, Wikipedia:, Portal:, File:…) in 'top' mode. Best coverage on English Wikipedia.",
            "default": true
          },
          "contactInfo": {
            "title": "Contact for Wikimedia User-Agent (optional)",
            "type": "string",
            "description": "Optional. Your email or URL, added to the User-Agent next to the Actor's own contact so Wikimedia can reach whoever is running heavy jobs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}