{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper: Channels, Live Streams, Top Games, VODs, Clips",
    "description": "Scrape Twitch channel profiles (followers, bio, social links, emails, partner status, live status), top live streams by category and language, top games with viewer counts, and recent VODs and clips. No login. Optional Helix API for long lists.",
    "version": "1.0",
    "x-build-id": "rOQbeAkyiG5sobyaR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhtech~twitch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhtech-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/zhtech~twitch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zhtech-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/zhtech~twitch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zhtech-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": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Twitch channel names or URLs, for example shroud, @pokimane or https://www.twitch.tv/xqc. Each channel gives one profile record (followers, bio, social links, partner or affiliate status, live status with current title, game and viewers). Leave empty if you only want live streams or top categories.",
            "items": {
              "type": "string"
            }
          },
          "includeProfiles": {
            "title": "Save channel profiles",
            "type": "boolean",
            "description": "Turn off to only collect VODs and clips of the channels above, without profile records.",
            "default": true
          },
          "includeEmails": {
            "title": "Extract emails from bio and panels",
            "type": "boolean",
            "description": "Collect email addresses that the streamer publicly wrote in the channel bio or About panels (usually business contact emails). Only what is visible on the channel page.",
            "default": true
          },
          "maxVodsPerChannel": {
            "title": "Max VODs per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Recent videos (past broadcasts, highlights, uploads) per channel. 0 skips VODs. Without Helix credentials Twitch's logged-out site gives up to 30 per video type (90 with type \"All\").",
            "default": 0
          },
          "vodType": {
            "title": "VOD type",
            "enum": [
              "archive",
              "highlight",
              "upload",
              "all"
            ],
            "type": "string",
            "description": "Which videos to collect.",
            "default": "archive"
          },
          "vodSort": {
            "title": "VOD order",
            "enum": [
              "time",
              "views"
            ],
            "type": "string",
            "description": "Newest first or most viewed first.",
            "default": "time"
          },
          "maxClipsPerChannel": {
            "title": "Max clips per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Top clips per channel for the period below, most viewed first. 0 skips clips. Up to 30 without Helix credentials.",
            "default": 0
          },
          "clipPeriod": {
            "title": "Clip period",
            "enum": [
              "LAST_DAY",
              "LAST_WEEK",
              "LAST_MONTH",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Time window for clips.",
            "default": "LAST_WEEK"
          },
          "includeClipVideoUrls": {
            "title": "Add clip MP4 links",
            "type": "boolean",
            "description": "Adds direct MP4 links (1080p, 720p, 480p, 360p when available) to each clip, the same links the Twitch player uses. They expire after about a day (see videoUrlsExpireAt). Costs one extra request per clip.",
            "default": false
          },
          "maxLiveStreams": {
            "title": "Max live streams",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Top live streams by current viewers, for all of Twitch or for each category below. 0 skips live streams. Up to 30 per category and language without Helix credentials; above 30 the ranking is widened with one query per language (best effort).",
            "default": 10
          },
          "liveStreamGames": {
            "title": "Categories (games)",
            "type": "array",
            "description": "Category names exactly as on Twitch (Just Chatting, VALORANT, League of Legends) or category URLs (https://www.twitch.tv/directory/category/fortnite). Empty means the top live streams across all of Twitch.",
            "items": {
              "type": "string"
            }
          },
          "liveStreamLanguages": {
            "title": "Stream languages",
            "type": "array",
            "description": "Only keep streams in these languages, as 2 letter codes (en, es, de, fr, pt, ja, ko, ru). Each language is queried separately, so this also raises the 30 row limit.",
            "items": {
              "type": "string"
            }
          },
          "minViewers": {
            "title": "Min viewers",
            "minimum": 0,
            "type": "integer",
            "description": "Skip streams with fewer current viewers. 0 means no minimum.",
            "default": 0
          },
          "minFollowers": {
            "title": "Min followers",
            "minimum": 0,
            "type": "integer",
            "description": "Skip streams whose channel has fewer followers. 0 means no minimum.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Max followers",
            "minimum": 0,
            "type": "integer",
            "description": "Skip streams whose channel has more followers (useful for finding small and mid size streamers). 0 means no maximum.",
            "default": 0
          },
          "maxTopGames": {
            "title": "Max top categories",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Top games and categories ranked by current viewers, with live channel counts and followers. 0 skips this. Up to 30 without Helix credentials.",
            "default": 0
          },
          "twitchClientId": {
            "title": "Twitch Client ID (optional)",
            "type": "string",
            "description": "Optional. Your own free Twitch developer app (dev.twitch.tv/console/apps). With a Client ID and Secret the actor uses the official Helix API for lists longer than 30 rows (live streams, top categories, VODs, clips). No Twitch login is needed, only app credentials."
          },
          "twitchClientSecret": {
            "title": "Twitch Client Secret (optional)",
            "type": "string",
            "description": "Secret of the same Twitch developer app. Stored encrypted by Apify."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed: Twitch's public endpoints are light and fast. Enable Apify Proxy (datacenter is enough) only if you run very large or very frequent jobs and see rate limit errors.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed or rate limited request is retried with backoff.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}