{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Pageviews Trends & Seasonality",
    "description": "A Google Trends alternative with absolute numbers. For each topic or keyword get real Wikipedia views since 2015, peak and low months, a seasonality index, YoY growth, trend direction, spikes and a ranking. Any of ~300 languages, no proxy or API key needed.",
    "version": "0.1",
    "x-build-id": "DPmcQLgT50DbgViXh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happysproutstore~wikipedia-pageviews-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happysproutstore-wikipedia-pageviews-trends",
        "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/happysproutstore~wikipedia-pageviews-trends/runs": {
      "post": {
        "operationId": "runs-sync-happysproutstore-wikipedia-pageviews-trends",
        "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/happysproutstore~wikipedia-pageviews-trends/run-sync": {
      "post": {
        "operationId": "run-sync-happysproutstore-wikipedia-pageviews-trends",
        "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": [
          "topics"
        ],
        "properties": {
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "One topic per line: an exact Wikipedia article title (e.g. 'Sunscreen') or a free-text keyword (e.g. 'halloween costume ideas'). Free text is matched to the best article with Wikipedia's own search, and the matched title is reported. Prefix a topic with a language code to pin it to one edition, e.g. 'tr:Lodos' or 'de.wikipedia:Glühwein'.",
            "default": [
              "Sunscreen",
              "Halloween costume",
              "Bitcoin"
            ],
            "items": {
              "type": "string"
            }
          },
          "projects": {
            "title": "Wikipedia editions",
            "type": "array",
            "description": "Language editions to query, such as en.wikipedia, de.wikipedia or tr.wikipedia (a bare code like 'tr' also works). Every topic is analyzed in every edition listed.",
            "default": [
              "en.wikipedia"
            ],
            "items": {
              "type": "string"
            }
          },
          "allLanguages": {
            "title": "Sum views across top language editions",
            "type": "boolean",
            "description": "Follow the article's interlanguage links and add up the views of the same article in the largest Wikipedia editions. Gives a global interest number and a per-language breakdown.",
            "default": false
          },
          "topLanguages": {
            "title": "Number of language editions to sum",
            "minimum": 2,
            "maximum": 40,
            "type": "integer",
            "description": "Used only when summing across languages: how many editions (including the one above) to add up, picked from the biggest Wikipedias that have the article.",
            "default": 10
          },
          "granularity": {
            "title": "Granularity",
            "enum": [
              "monthly",
              "daily"
            ],
            "type": "string",
            "description": "Monthly covers finished months only. Daily goes up to yesterday; the current month is shown in the timeline but left out of the statistics.",
            "default": "monthly"
          },
          "startDate": {
            "title": "Start date",
            "pattern": "^$|^\\d{4}-\\d{2}(-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM or YYYY-MM-DD. Leave empty for the last 5 years. Data starts at 2015-07."
          },
          "endDate": {
            "title": "End date",
            "pattern": "^$|^\\d{4}-\\d{2}(-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM or YYYY-MM-DD. Leave empty for the last finished month (monthly) or yesterday (daily)."
          },
          "agent": {
            "title": "Traffic type",
            "enum": [
              "user",
              "all-agents",
              "automated",
              "spider"
            ],
            "type": "string",
            "description": "Which traffic to count. 'Humans only' excludes crawlers and detected bots.",
            "default": "user"
          },
          "access": {
            "title": "Device",
            "enum": [
              "all-access",
              "desktop",
              "mobile-web",
              "mobile-app"
            ],
            "type": "string",
            "description": "Which devices to count.",
            "default": "all-access"
          },
          "resolveKeywords": {
            "title": "Match free-text keywords to articles",
            "type": "boolean",
            "description": "When a topic is not an exact article title (or is a disambiguation page), use Wikipedia search to pick the best article. Turn off to accept exact titles only.",
            "default": true
          },
          "includeRedirects": {
            "title": "Add views of redirects (renamed articles)",
            "enum": [
              "auto",
              "all",
              "none"
            ],
            "type": "string",
            "description": "Wikipedia counts views per title, so a renamed article loses its history under the new title. 'Auto' finds the old titles in the article's move history and adds their views (one extra request). 'Always' adds redirect views for every topic, which needs many more requests.",
            "default": "auto"
          },
          "includeTimeline": {
            "title": "Include raw timeline",
            "type": "boolean",
            "description": "Add the raw monthly or daily view counts to each row.",
            "default": false
          },
          "compare": {
            "title": "Rank topics against each other",
            "type": "boolean",
            "description": "Write a ranking of all topics by average monthly views and by YoY growth to the OUTPUT record of the key-value store.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}