{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper - Channels, Streams, Clips & Streamer Leads",
    "description": "Scrape Twitch channels, live streams, games/categories, clips & VODs. Get follower counts, live status, viewers, titles, tags, plus streamer leads (business email, socials & lead score). Search or paste URLs; only-new monitor mode.",
    "version": "0.1",
    "x-build-id": "EO97w07hug2zztkp3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~twitch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~twitch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~twitch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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",
              "games",
              "clips",
              "videos",
              "search",
              "streamerLeads"
            ],
            "type": "string",
            "description": "What to scrape. <b>channels</b> = streamer profiles (followers, live status, current stream); <b>liveStreams</b> = live directory (top overall or by game); <b>games</b> = categories with viewer counts; <b>clips</b> = top clips by channel or game; <b>videos</b> = past broadcasts / highlights (VODs) by channel; <b>search</b> = search Twitch by keyword; <b>streamerLeads</b> = channels with lead enrichment forced on.",
            "default": "channels"
          },
          "channelUsernames": {
            "title": "Channel usernames",
            "type": "array",
            "description": "Twitch channel logins (the name in twitch.tv/<name>) for channels, clips, videos & streamerLeads modes. Example: [\"pokimane\", \"shroud\", \"jynxzi\"].",
            "items": {
              "type": "string"
            }
          },
          "gameNames": {
            "title": "Games / categories",
            "type": "array",
            "description": "Game or category names for liveStreams, games & clips modes. Example: [\"VALORANT\", \"Just Chatting\", \"Grand Theft Auto V\"]. Leave empty in liveStreams/games mode to get the top overall directory.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search for (search mode). Returns matching channels, games and/or videos depending on Search type."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "channels",
              "games",
              "videos",
              "all"
            ],
            "type": "string",
            "description": "Which result types to return in search mode.",
            "default": "channels"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Twitch URLs to auto-route: channel pages (twitch.tv/<name>), category pages (twitch.tv/directory/category/<game>), clip or video URLs. Mixed with the mode above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap of results per channel / game / search. Live directory pages are capped at 30 per game (and 30 overall) by Twitch; games/clips/videos allow up to 100. The channels mode has no cap (one query per channel).",
            "default": 50
          },
          "language": {
            "title": "Stream language filter",
            "type": "string",
            "description": "Optional 2-letter language code to keep only matching live streams in liveStreams mode (e.g. \"en\", \"es\", \"de\", \"fr\"). Leave empty for all languages."
          },
          "clipPeriod": {
            "title": "Clip period",
            "enum": [
              "LAST_DAY",
              "LAST_WEEK",
              "LAST_MONTH",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Time window for top clips (clips mode).",
            "default": "LAST_WEEK"
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "ARCHIVE",
              "HIGHLIGHT",
              "UPLOAD",
              "ALL"
            ],
            "type": "string",
            "description": "Which VOD type to return (videos mode). Archive = past broadcasts.",
            "default": "ARCHIVE"
          },
          "videoSort": {
            "title": "Video sort",
            "enum": [
              "TIME",
              "VIEWS"
            ],
            "type": "string",
            "description": "Sort order for videos mode.",
            "default": "TIME"
          },
          "includeStreamerLeads": {
            "title": "Include streamer leads",
            "type": "boolean",
            "description": "For channels mode: enrich each channel record with a business email (parsed from the bio), social links (Instagram, YouTube, TikTok, X, Discord, …), a website and a 0–100 lead score — and also output one dedup'd lead record (type \"streamerLead\") per channel. Ideal for influencer-marketing outreach.",
            "default": false
          },
          "enrichLeadWebsites": {
            "title": "Crawl streamer websites for contacts",
            "type": "boolean",
            "description": "When Include streamer leads is on and a channel links a personal/business website, crawl its home + /contact + /about pages for extra emails and phone numbers. Adds a few requests per channel that has a website.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only new / changed)",
            "type": "boolean",
            "description": "Remember items across runs in a named key-value store and output only NEW or CHANGED items. Channels re-emit when they go live/offline or switch games; streams, clips, videos & games are emitted only the first time they're seen. Works alongside Apify Schedules (the schedule triggers the run; monitor mode filters the output).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name for the monitor's memory store, so separate watch-lists don't collide. Reuse the same key on each scheduled run.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. RESIDENTIAL is the default because Twitch only returns streamer social links (Instagram/YouTube/TikTok/…) to residential IPs. For modes that don't need social links (liveStreams, games, clips, videos, search) you can switch to datacenter ({ \"useApifyProxy\": true }) to save a little.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}