{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Scraper",
    "description": "Pay per result Twitch scraper with no login. Get channel profiles, live streams by game or language, top games, clips and VODs. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "YBES8L5evPKbgNhOI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studious_mortise~twitch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studious_mortise-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/studious_mortise~twitch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-studious_mortise-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/studious_mortise~twitch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-studious_mortise-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "channels",
              "searchChannels",
              "liveStreams",
              "topGames",
              "clips",
              "videos"
            ],
            "type": "string",
            "description": "channels = profiles for the usernames in \"channels\". searchChannels = channel profiles matching \"searchQueries\". liveStreams = live streams sorted by viewers (optionally by game, language, tag). topGames = categories ranked by viewers. clips = top clips of channels and/or games. videos = VODs, highlights and uploads of channels.",
            "default": "channels"
          },
          "channels": {
            "title": "Channels",
            "uniqueItems": true,
            "type": "array",
            "description": "Twitch usernames or channel URLs, e.g. shroud, @pokimane, https://www.twitch.tv/xqc. Used by modes: channels, clips, videos. Up to 100 channels are fetched per request.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "uniqueItems": true,
            "type": "array",
            "description": "Keywords to search channels for, e.g. valorant, thai, speedrun. One query can return thousands of channels; use maxItems to cap. Mode: searchChannels.",
            "items": {
              "type": "string"
            }
          },
          "gameNames": {
            "title": "Games / categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Category names as shown on Twitch, e.g. Just Chatting, VALORANT, League of Legends (case-insensitive). Modes: liveStreams (streams in these games), clips (top clips in these games), topGames (stats for just these games). Leave empty for the global top.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "uniqueItems": true,
            "type": "array",
            "description": "Two-letter Twitch language codes, e.g. en, th, ja, ko, de, pt, es. Filters live streams (by broadcaster language) and game clips. Leave empty for all languages.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Stream tags",
            "uniqueItems": true,
            "type": "array",
            "description": "Freeform stream tags to filter live streams by, e.g. Thai, Vtuber, Speedrun. Mode: liveStreams.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records. Each record is one charged result.",
            "default": 100
          },
          "minViewers": {
            "title": "Minimum viewers",
            "minimum": 0,
            "type": "integer",
            "description": "Skip live streams with fewer current viewers than this. Mode: liveStreams.",
            "default": 0
          },
          "clipPeriod": {
            "title": "Clip period",
            "enum": [
              "LAST_DAY",
              "LAST_WEEK",
              "LAST_MONTH",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Time window for clips (mode clips, and the topClips embedded in channel profiles).",
            "default": "LAST_WEEK"
          },
          "clipSort": {
            "title": "Clip sort",
            "enum": [
              "VIEWS_DESC",
              "VIEWS_ASC",
              "CREATED_AT_DESC",
              "CREATED_AT_ASC",
              "TRENDING"
            ],
            "type": "string",
            "description": "Order of clips in mode clips.",
            "default": "VIEWS_DESC"
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "ALL",
              "ARCHIVE",
              "HIGHLIGHT",
              "UPLOAD"
            ],
            "type": "string",
            "description": "Which videos to list in mode videos.",
            "default": "ALL"
          },
          "videoSort": {
            "title": "Video sort",
            "enum": [
              "TIME",
              "VIEWS"
            ],
            "type": "string",
            "description": "Order of videos in mode videos.",
            "default": "TIME"
          },
          "channelVideos": {
            "title": "Recent videos per channel profile",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many recent videos to embed in each channel record (modes channels and searchChannels). 0 disables. Embedded videos are not charged separately.",
            "default": 5
          },
          "channelClips": {
            "title": "Top clips per channel profile",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many top clips (within clipPeriod) to embed in each channel record (modes channels and searchChannels). 0 disables. Embedded clips are not charged separately.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Twitch's public API normally works without a proxy; enable Apify Proxy only if you see request failures. Proxy traffic is billed by Apify at platform rates."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}