{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Pageviews: Trends, Top Articles & Languages",
    "description": "Real page-view numbers for any Wikipedia articles: daily history since 2015 with redirects included, momentum, year-over-year, seasonality and a 3-month forecast, every language edition of a topic, the most-read and surging articles, and a visual report.",
    "version": "0.1",
    "x-build-id": "THMzHr4Ymi2u6CNhb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/registryfeeds~wikipedia-pageviews/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-registryfeeds-wikipedia-pageviews",
        "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/registryfeeds~wikipedia-pageviews/runs": {
      "post": {
        "operationId": "runs-sync-registryfeeds-wikipedia-pageviews",
        "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/registryfeeds~wikipedia-pageviews/run-sync": {
      "post": {
        "operationId": "run-sync-registryfeeds-wikipedia-pageviews",
        "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": "What to get",
            "enum": [
              "compare",
              "languages",
              "top"
            ],
            "type": "string",
            "description": "Compare articles over time, see how a topic is read across language editions, or list the most-read articles of recent days.",
            "default": "compare"
          },
          "articles": {
            "title": "Articles",
            "type": "array",
            "description": "Article titles (\"Taylor Swift\"), wikipedia.org links in any language, or \"de:Berlin\" for a specific language edition. Spelling and capitals are fixed automatically and redirects followed.",
            "default": [
              "Taylor Swift",
              "Beyoncé",
              "Bad Bunny"
            ],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Wikipedia language",
            "type": "string",
            "description": "Language edition for plain titles and for the top list: en, de, fr, es, ja, and so on.",
            "default": "en"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "last-30-days",
              "last-90-days",
              "last-12-months",
              "last-3-years",
              "last-5-years",
              "all",
              "custom"
            ],
            "type": "string",
            "description": "Daily views back to July 2015. Year-over-year needs 12 months; the forecast needs about 2.5 years.",
            "default": "last-3-years"
          },
          "startDate": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "First day for Custom dates. Daily data starts on 2015-07-01."
          },
          "endDate": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "Last day for Custom dates. Leave empty for the latest complete day."
          },
          "includeRedirects": {
            "title": "Count views through redirects",
            "type": "boolean",
            "description": "People also reach an article through alternative titles (\"Taylor swift\", \"T. Swift\"). Wikipedia counts those separately; this adds them in for the true total.",
            "default": true
          },
          "maxRedirectsPerArticle": {
            "title": "Max redirects per article",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Each redirect is one more request; the main alternative titles carry almost all redirect views.",
            "default": 25
          },
          "agent": {
            "title": "Count views by",
            "enum": [
              "user",
              "all-agents"
            ],
            "type": "string",
            "description": "People only excludes bots and crawlers, which is what most analyses want.",
            "default": "user"
          },
          "includeForecast": {
            "title": "Forecast the next 3 months",
            "type": "boolean",
            "description": "Per article, chosen by testing three methods on the article's own history. Needs about 2.5 years of data.",
            "default": true
          },
          "languagesLimit": {
            "title": "Languages to compare (languages mode)",
            "minimum": 2,
            "maximum": 80,
            "type": "integer",
            "description": "Measured in order of each Wikipedia's size.",
            "default": 25
          },
          "topDays": {
            "title": "Days for the top list (top mode)",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "How many recent days to combine into the top list (1 to 31).",
            "default": 7
          },
          "topEndDate": {
            "title": "Top list end date (top mode)",
            "type": "string",
            "description": "Leave empty for the latest complete day."
          },
          "topLimit": {
            "title": "Top list length (top mode)",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "How many articles to return in top mode.",
            "default": 100
          },
          "maxArticles": {
            "title": "Max articles",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit on articles per run.",
            "default": 100
          },
          "outputTimelineRows": {
            "title": "Also output one row per article per day",
            "type": "boolean",
            "description": "Long format for charting tools. Each article row already includes its full timeline.",
            "default": false
          },
          "generateReport": {
            "title": "Visual report",
            "type": "boolean",
            "description": "Saves an HTML report with charts in the key-value store as REPORT.",
            "default": true
          },
          "selfTest": {
            "title": "Self-test (maintenance)",
            "type": "boolean",
            "description": "Used by the daily health check.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}