{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper — Channels, Streams, Videos, Clips & Chat",
    "description": "Scrape public Twitch data without login: channel profiles with followers and live status, live streams by category and language, top streams and categories, channel videos, clips, stream schedules, search and VOD chat replay. Flat rows, date filters, GDPR-minded.",
    "version": "0.1",
    "x-build-id": "gokhQcoCqNG3Kcyz8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~twitch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-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/teodor_banea~twitch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-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/teodor_banea~twitch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "channels",
              "categoryStreams",
              "topCategories",
              "topStreams",
              "channelVideos",
              "clips",
              "search",
              "schedule",
              "vodChat"
            ],
            "type": "string",
            "description": "Choose what to collect. Channel profiles, videos, clips and schedules use Channels; category streams and category clips use Categories; search uses Search terms; chat replay uses Video IDs.",
            "default": "channels"
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Enter Twitch channel names or channel URLs (e.g. \"streamer_name\" or \"https://www.twitch.tv/streamer_name\"). Used by Channel profiles, Channel videos, Clips and Stream schedules. Up to 1,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Enter category (game) names exactly as Twitch shows them (e.g. \"Just Chatting\"), slugs from the category URL (e.g. \"just-chatting\") or category URLs. Used by Live streams in categories and Clips.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Enter what to search for (Search mode). Twitch shows up to about 1,000 results per term.",
            "items": {
              "type": "string"
            }
          },
          "searchTarget": {
            "title": "Search for",
            "enum": [
              "channels",
              "categories",
              "videos"
            ],
            "type": "string",
            "description": "Choose what the search returns (Search mode).",
            "default": "channels"
          },
          "videoIds": {
            "title": "Video IDs",
            "type": "array",
            "description": "Enter video IDs or video URLs (e.g. \"https://www.twitch.tv/videos/1234567890\") whose chat replay to read (VOD chat replay mode).",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Stream languages",
            "type": "array",
            "description": "Keep only streams in these languages (Live streams in categories, Top live streams). Each language is read as its own list, so choosing several also returns more streams — Twitch lists the top 30 live streams per language. Leave empty for all languages.",
            "items": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "es",
                "fr",
                "pt",
                "ru",
                "ja",
                "ko",
                "it",
                "zh",
                "zh-hk",
                "pl",
                "tr",
                "ar",
                "th",
                "nl",
                "sv",
                "no",
                "da",
                "fi",
                "cs",
                "hu",
                "el",
                "ro",
                "uk",
                "vi",
                "id",
                "ms",
                "tl",
                "hi",
                "bg",
                "sk",
                "ca",
                "he",
                "asl",
                "other"
              ],
              "enumTitles": [
                "English",
                "German",
                "Spanish",
                "French",
                "Portuguese",
                "Russian",
                "Japanese",
                "Korean",
                "Italian",
                "Chinese",
                "Chinese (Hong Kong)",
                "Polish",
                "Turkish",
                "Arabic",
                "Thai",
                "Dutch",
                "Swedish",
                "Norwegian",
                "Danish",
                "Finnish",
                "Czech",
                "Hungarian",
                "Greek",
                "Romanian",
                "Ukrainian",
                "Vietnamese",
                "Indonesian",
                "Malay",
                "Tagalog",
                "Hindi",
                "Bulgarian",
                "Slovak",
                "Catalan",
                "Hebrew",
                "American Sign Language",
                "Other"
              ]
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "viewers",
              "viewersAsc",
              "recent",
              "time",
              "views"
            ],
            "type": "string",
            "description": "Choose the order to read first. Streams: most viewers (default), fewest viewers (category streams only) or most recently started. Videos: newest (default) or most viewed. Other orders are added automatically when more rows are wanted than the first list holds."
          },
          "videoTypes": {
            "title": "Video types",
            "type": "array",
            "description": "Choose which videos to read (Channel videos mode). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "ARCHIVE",
                "HIGHLIGHT",
                "UPLOAD"
              ],
              "enumTitles": [
                "Past broadcasts",
                "Highlights",
                "Uploads"
              ]
            },
            "default": [
              "ARCHIVE",
              "HIGHLIGHT",
              "UPLOAD"
            ]
          },
          "clipPeriod": {
            "title": "Clip period",
            "enum": [
              "LAST_DAY",
              "LAST_WEEK",
              "LAST_MONTH",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Choose how far back clips may have been created (Clips mode). Twitch lists clips by views or trending, not by date.",
            "default": "LAST_DAY"
          },
          "startedAfter": {
            "title": "Started / created after",
            "type": "string",
            "description": "Keep only streams started, videos created and clips created on or after this date (UTC), or within a recent period such as \"7 days\". Useful for scheduled runs."
          },
          "maxChatMessagesPerVideo": {
            "title": "Maximum chat messages per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Limit the chat messages read from each video (VOD chat replay). 0 = up to 100,000 per video. A busy broadcast has 4-9 messages per second (a busy 10-hour broadcast ≈ 130,000), so use the Chat from / Chat to window to read only the part you need.",
            "default": 2000
          },
          "chatFromSeconds": {
            "title": "Chat from (seconds into the video)",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Start reading the chat replay at this point of the video (VOD chat replay)."
          },
          "chatToSeconds": {
            "title": "Chat to (seconds into the video)",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop reading the chat replay at this point of the video (VOD chat replay). Leave empty for the end of the video."
          },
          "includeContactInfo": {
            "title": "Include social links and business e-mail",
            "type": "boolean",
            "description": "Add the channel's social media links and the business e-mail written in its description or panels (Channel profiles and channel search). Turn on only if you have a legitimate reason to process contact details.",
            "default": false
          },
          "includePanels": {
            "title": "Include channel panels",
            "type": "boolean",
            "description": "Add the panels under the channel's About section (title, text, link, image). Panel text can be long.",
            "default": false
          },
          "includeChatUsernames": {
            "title": "Include chat usernames",
            "type": "boolean",
            "description": "Output the real usernames of chat authors (VOD chat replay). By default each author gets a stable pseudonym for the run (\"user-1a2b3c4d\"), which keeps per-author counts possible without personal data.",
            "default": false
          },
          "maxResultsPerTarget": {
            "title": "Maximum results per target",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Limit the rows taken from each channel, category or search term. 0 = as many as Twitch shows (a few hundred per category or channel).",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Limit the total rows of the run. 0 = unlimited (capped at 10,000 to prevent a surprise bill).",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}