{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper — Streams, Games, Channels & Clips API",
    "description": "Unofficial Twitch data API via Twitch's own GraphQL — no key, no login, no browser. Scrape top games, live streams, streamer/channel info, past videos (VODs) and top clips, plus channel & game search. Export Twitch datasets to JSON, CSV or Excel for creator discovery, gaming analytics & lead-gen.",
    "version": "1.0",
    "x-build-id": "EhYD4ZUOBvd6NNy8p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~twitch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-twitch-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/logiover~twitch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-twitch-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/logiover~twitch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-twitch-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "topStreams",
              "topGames",
              "streamsByGame",
              "user",
              "videos",
              "clips",
              "search"
            ],
            "type": "string",
            "description": "Which Twitch endpoint to run.\n\n• **topStreams** — sweep the top games and pull live streams for each; aggregates the whole live directory (highest volume)\n• **topGames** — top games / categories ranked by current viewers\n• **streamsByGame** — live streams for one or more specific games\n• **user** — channel / streamer profile for one or more logins (batch)\n• **videos** — a channel's past broadcasts / VODs\n• **clips** — a channel's top clips\n• **search** — free-text search across channels or games",
            "default": "topStreams"
          },
          "gameSort": {
            "title": "Game sort (topStreams / topGames)",
            "enum": [
              "VIEWER_COUNT",
              "RELEVANCE",
              "NUM_FOLLOWERS"
            ],
            "type": "string",
            "description": "Ordering for the games directory.",
            "default": "VIEWER_COUNT"
          },
          "gameFanout": {
            "title": "Games to sweep (topStreams)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many top games **topStreams** should sweep for live streams. More games = more streams. 1-100.",
            "default": 30
          },
          "game": {
            "title": "Game / category",
            "type": "string",
            "description": "Category name for **streamsByGame**, e.g. `Just Chatting`, `Minecraft`, `League of Legends`, `VALORANT`. Use the exact Twitch category name."
          },
          "games": {
            "title": "Games / categories (batch)",
            "type": "array",
            "description": "Array of category names for batch **streamsByGame**.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "login": {
            "title": "Channel login",
            "type": "string",
            "description": "Twitch channel login / username for **user**, **videos**, **clips**, e.g. `shroud`. A full URL like `https://twitch.tv/shroud` or an `@handle` also works."
          },
          "logins": {
            "title": "Channel logins (batch, user)",
            "type": "array",
            "description": "Array of Twitch channel logins for batch **user** lookups, e.g. `[\"shroud\", \"pokimane\", \"xqc\"]`.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "videoSort": {
            "title": "Video sort (videos)",
            "enum": [
              "TIME",
              "VIEWS"
            ],
            "type": "string",
            "description": "Ordering for a channel's videos.",
            "default": "TIME"
          },
          "clipPeriod": {
            "title": "Clip period (clips)",
            "enum": [
              "LAST_DAY",
              "LAST_WEEK",
              "LAST_MONTH",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Time window for a channel's clips.",
            "default": "ALL_TIME"
          },
          "clipSort": {
            "title": "Clip sort (clips)",
            "enum": [
              "VIEWS_DESC",
              "VIEWS_ASC",
              "CREATED_AT_DESC",
              "CREATED_AT_ASC"
            ],
            "type": "string",
            "description": "Ordering for a channel's clips.",
            "default": "VIEWS_DESC"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text term for **search** mode (a streamer name, keyword or game title)."
          },
          "searchIndex": {
            "title": "Search target",
            "enum": [
              "CHANNEL",
              "GAME"
            ],
            "type": "string",
            "description": "Search **channels** (streamers) or **games** (categories).",
            "default": "CHANNEL"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on rows returned. For topStreams/streamsByGame this drives the multi-game sweep; for topGames/videos/clips a single page caps at 100 (Twitch's per-request limit).",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}