{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper - Channels, Live Streams, Clips & VODs",
    "description": "Scrape Twitch channel profiles (followers, partner status, socials, live viewers), live streams by category and language, clips by channel or category, VODs and categories with viewer counts. Public GraphQL, no login. US$ 2.50 per 1,000 items; channels not found are free.",
    "version": "0.1",
    "x-build-id": "qasJXbvSai5Phuzky"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~twitch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-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/scrapewise~twitch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-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/scrapewise~twitch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-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": "Mode",
            "enum": [
              "channels",
              "liveStreams",
              "clips",
              "videos",
              "categories",
              "search",
              "channel",
              "topStreams",
              "gameStreams",
              "topGames",
              "searchChannels",
              "channel_videos",
              "top_games",
              "live_streams"
            ],
            "type": "string",
            "description": "What to scrape. Mode names used by other Twitch scrapers also work when called by API: channel, channel_info, topStreams, top_streams, live_streams, gameStreams, game_streams, searchChannels, search_channels, channel_videos, topGames, top_games, topClips.",
            "default": "channels"
          },
          "channelNames": {
            "title": "Channels",
            "type": "array",
            "description": "For 'channels', 'videos' and 'clips'. Channel login (ibai), @ibai, twitch.tv/ibai or a full URL. Also accepted by API as channelUsernames, channels, logins, targets, streamers, channelUrls or startUrls. If empty, these modes use ibai and kaicenat.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "For 'search': each keyword returns up to 100 matching channels with the full profile (followers, socials, live status). Also accepted by API as searchQuery, searchTerms, keywords or query.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (games)",
            "type": "array",
            "description": "Category slug as in the Twitch URL (just-chatting, grand-theft-auto-v, league-of-legends) or a twitch.tv/directory/category/... URL. Filters 'liveStreams' and 'clips'; in 'categories' mode returns these categories with viewers. Leave empty for the whole directory.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Stream languages",
            "type": "array",
            "description": "For 'liveStreams': two-letter language codes (en, es, pt, de, fr, ja, ko, ru, tr). Empty means all languages. Each language is a separate query, so three languages give up to three times the streams.",
            "items": {
              "type": "string"
            }
          },
          "minViewers": {
            "title": "Minimum viewers",
            "minimum": 0,
            "type": "integer",
            "description": "For 'liveStreams': drop streams with fewer current viewers. Streams below the threshold are not delivered and not charged.",
            "default": 0
          },
          "tags": {
            "title": "Stream tags",
            "type": "array",
            "description": "For 'liveStreams': keep only streams that carry at least one of these Twitch tags (Speedrun, DropsEnabled, English). Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort live streams",
            "enum": [
              "viewers",
              "recent"
            ],
            "type": "string",
            "description": "For 'liveStreams'. 'recent' asks Twitch for the newest streams, which are usually small channels with few viewers.",
            "default": "viewers"
          },
          "clipSort": {
            "title": "Sort clips",
            "enum": [
              "views",
              "trending"
            ],
            "type": "string",
            "description": "For 'clips'. Twitch's public API does not sort clips by creation date, so 'newest' falls back to trending.",
            "default": "views"
          },
          "clipPeriod": {
            "title": "Clip period",
            "enum": [
              "day",
              "week",
              "month",
              "all"
            ],
            "type": "string",
            "description": "For 'clips': the time window Twitch applies to the clip list.",
            "default": "week"
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "archive",
              "highlight",
              "upload",
              "all"
            ],
            "type": "string",
            "description": "For 'videos': which kind of video the channel published. Past broadcasts expire after 7 to 60 days depending on the channel's Twitch plan.",
            "default": "archive"
          },
          "includeSocials": {
            "title": "Include social links",
            "type": "boolean",
            "description": "For 'channels' and 'search': fetch the channel's social links (YouTube, X, Instagram, TikTok, Discord). Twitch only serves this one field to residential IPs, so each batch of 30 channels that comes back without it is retried once on a residential IP. Turn it off to stay on datacenter proxy only.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "For 'videos' and 'clips': per channel or category, capped at 100 by Twitch. For 'liveStreams', 'categories' and 'search': total per run (search is capped at 100 per keyword). Ignored by 'channels', which returns one row per channel.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is the default and works for Twitch. Blocked requests are retried on a new IP; residential is only used as a fallback after three blocked attempts.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}