{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper | Channels, Live Streams, VODs & Chat",
    "description": "Scrape Twitch channels by username, keyword or game, or the top live streams right now: followers, live viewers, stream title and tags, bio, business emails, socials and panel links. Add VODs, top clips and full chat replays. No login.",
    "version": "0.0",
    "x-build-id": "8neaUNhjkHSnSCfA3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piotrv1001~twitch-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piotrv1001-twitch-channel-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/piotrv1001~twitch-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piotrv1001-twitch-channel-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/piotrv1001~twitch-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piotrv1001-twitch-channel-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": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Twitch channels, one per line: a username (shroud) or a channel URL (https://www.twitch.tv/shroud).",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search channels",
            "type": "array",
            "description": "Find channels by keyword, one per line (valorant, cooking, asmr). Up to 100 channels per keyword, in Twitch's search order.",
            "items": {
              "type": "string"
            }
          },
          "games": {
            "title": "Games / categories (live channels)",
            "type": "array",
            "description": "Game or category names (Fortnite, Just Chatting) or category URLs. Returns the channels live in that category right now, most-watched first. Without Max items you get Twitch's first page (about 100); with Max items the Actor pages on (up to 2,000 per category and language with 0). Set languages below for one list per language.",
            "items": {
              "type": "string"
            }
          },
          "topLiveStreams": {
            "title": "Top live streams (all of Twitch)",
            "type": "boolean",
            "description": "Add the most-watched live channels on all of Twitch right now, with stream title, game, viewers and tags. Without Max items you get the top 30; with Max items the Actor pages on (up to 2,000 per language with 0). Set languages below for one list per language. No channel, keyword or game needed.",
            "default": false
          },
          "languages": {
            "title": "Stream languages",
            "type": "array",
            "description": "Optional stream languages for the games and top live streams above: two-letter codes (en, es, de, ja, ko, pt, zh, zh_hk) or names (Spanish). Each language returns its own most-watched live channels.",
            "items": {
              "type": "string"
            }
          },
          "videosPerChannel": {
            "title": "Videos (VODs) per channel",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Past broadcasts, highlights and uploads to save for each channel, newest first. 0 = none. Pages through every video Twitch lists for the channel (shroud: 1,616).",
            "default": 0
          },
          "clipsPerChannel": {
            "title": "Clips per channel",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Top clips to save for each channel, most-viewed first, from the period below. 0 = none. Twitch lists about 1,000 clips per period.",
            "default": 0
          },
          "clipPeriod": {
            "title": "Clips period",
            "enum": [
              "ALL_TIME",
              "LAST_MONTH",
              "LAST_WEEK",
              "LAST_DAY"
            ],
            "type": "string",
            "description": "Which clips count as top clips: all time (default), or only clips made in the last month, week or day."
          },
          "chatVideoUrls": {
            "title": "Chat replay: video URLs",
            "type": "array",
            "description": "Past broadcasts whose chat you want, one per line (https://www.twitch.tv/videos/2890960011 or just the ID). Every message with its time in the video, user, badges and emotes.",
            "items": {
              "type": "string"
            }
          },
          "maxChatMessagesPerVideo": {
            "title": "Max chat messages per video",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each chat replay after this many messages. 0 = the whole chat.",
            "default": 1000
          },
          "minFollowers": {
            "title": "Min followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only save channels with at least this many followers (others are skipped and not charged). Leave empty for no minimum."
          },
          "maxFollowers": {
            "title": "Max followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only save channels with at most this many followers, e.g. to find smaller streamers in a game. Leave empty for no maximum."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of channels, videos and clips to save in total (chat messages are limited by their own setting). 0 = no limit. Leave empty for no total limit: live lists then stop at Twitch's first page (100 per game, 30 top streams)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed for Twitch; leave as is.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}