{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Channels Scraper: Videos, Clips & Live",
    "description": "Twitch channels with followers, live stream, team and next stream, from names, searches or categories. $0.60 per 1,000 results. Plus videos, clips and top categories.",
    "version": "0.1",
    "x-build-id": "pqKbuOB24mMc630lz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~twitch-channels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-twitch-channels-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/luzivanlt~twitch-channels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-twitch-channels-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/luzivanlt~twitch-channels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-twitch-channels-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 to read: a channel name (e.g. shroud), or a link to any of its pages (https://www.twitch.tv/shroud, …/shroud/videos). One row per channel with its followers, live stream, last broadcast, team, next scheduled stream and panels; turn on videos or clips below for those too. A link to anything else stops the run before anything is read, naming the link.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search channels",
            "type": "array",
            "description": "Words to search Twitch's channels for, as in Twitch's own search box (e.g. \"valorant\"). Each search saves its channels in Twitch's order, up to Max channels per search, each a full channel row with its rank and the search's total match count.",
            "items": {
              "type": "string"
            }
          },
          "maxChannelsPerSearch": {
            "title": "Max channels per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each search after this many channels, from 1 to 1,000 (Twitch lists about 1,000 at most). Default 50. Each channel is one result ($1 per 1,000 results), and its videos and clips are results too, so this caps what one search costs.",
            "default": 50
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Twitch categories (games and others such as Just Chatting) whose live channels you want: the name as Twitch shows it (e.g. \"League of Legends\") or a category link (https://www.twitch.tv/directory/category/league-of-legends). Each category saves its most watched live channels, up to Max channels per category, with their stream, viewers and rank, and how many channels are live in it.",
            "items": {
              "type": "string"
            }
          },
          "maxChannelsPerCategory": {
            "title": "Max channels per category",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many of a category's live channels to save, from 1 to 5,000, the most watched first, then language by language. Default 50. Each channel is one result ($1 per 1,000 results), plus its videos and clips when those are on.",
            "default": 50
          },
          "topStreams": {
            "title": "Top live streams",
            "type": "boolean",
            "description": "Also save the 30 most watched live channels across all of Twitch right now, each a full channel row with its stream, viewers and rank. That is 30 results ($0.03), plus their videos and clips when those are on.",
            "default": false
          },
          "topCategories": {
            "title": "Top categories",
            "type": "boolean",
            "description": "Also save Twitch's most watched categories right now (games and others such as Just Chatting), one row each: viewers, live channels, followers, tags, box art, release date and rank. Up to Max top categories.",
            "default": false
          },
          "maxCategories": {
            "title": "Max top categories",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of Twitch's most watched categories to save with Top categories, from 1 to 100 (Twitch lists the top 100). Default 100. Each category is one result ($1 per 1,000 results), so 100 cost $0.10.",
            "default": 100
          },
          "includeVideos": {
            "title": "Include videos",
            "type": "boolean",
            "description": "Also save each channel's videos, one row per video: title, type, length, views, category, dates and thumbnails. Applies to every channel the run saves, from channels, searches, categories or top streams. Each video is one result; one more request per channel.",
            "default": false
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many videos to save per channel with Include videos, from 1 to 2,000, newest or most viewed first as picked below. Default 20. Each video is one result ($1 per 1,000 results), so 20 videos for 50 channels cost $1.",
            "default": 20
          },
          "videoSort": {
            "title": "Videos: newest or most viewed",
            "enum": [
              "newest",
              "most_viewed"
            ],
            "type": "string",
            "description": "Which of a channel's videos come first with Include videos: the newest (newest) or the most viewed (most_viewed), e.g. a channel's 20 most viewed past broadcasts. Past its first 100, a channel's other videos follow, oldest and least viewed too. Default newest.",
            "default": "newest"
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "all",
              "past_broadcasts",
              "highlights",
              "uploads",
              "past_premieres"
            ],
            "type": "string",
            "description": "Save every kind of video (all), or only one kind: past broadcasts, highlights, uploads or past premieres, e.g. highlights for the clips a streamer chose to keep. Default all. Each video row says its type.",
            "default": "all"
          },
          "includeClips": {
            "title": "Include clips",
            "type": "boolean",
            "description": "Also save each channel's most viewed clips in the clip period, one row per clip: title, views, length, who clipped it, the video it comes from and its link. Applies to every channel the run saves. Each clip is one result; one more request per channel.",
            "default": false
          },
          "maxClipsPerChannel": {
            "title": "Max clips per channel",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "How many clips to save per channel with Include clips, from 1 to 400, most viewed first within the clip period, then the most viewed of each shorter period. Up to 100 a period, so how many a channel can give depends on the period: 400 with all time, 300 with last month, 200 with last week, 100 with last day. Default 20. Each clip is one result ($1 per 1,000 results), so 20 clips for 50 channels cost $1.",
            "default": 20
          },
          "clipPeriod": {
            "title": "Clip period",
            "enum": [
              "last_day",
              "last_week",
              "last_month",
              "all_time"
            ],
            "type": "string",
            "description": "The window the most viewed clips are picked from with Include clips: the last day, week or month, or all time, e.g. last_week for the clips everyone shared in the past seven days. Default last_week.",
            "default": "last_week"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}