{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Live Stream, Channel & VOD Metadata Extractor",
    "description": "Get Twitch top live streams, channel profiles, category directories, VOD metadata and clip details, or resolve any twitch.tv URL into structured data.",
    "version": "1.0",
    "x-build-id": "LulWkQbhoV6gIZUhD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~twitch-live-stream-channel-and-vod-metadata/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-twitch-live-stream-channel-and-vod-metadata",
        "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/vexaloom-labs~twitch-live-stream-channel-and-vod-metadata/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-twitch-live-stream-channel-and-vod-metadata",
        "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/vexaloom-labs~twitch-live-stream-channel-and-vod-metadata/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-twitch-live-stream-channel-and-vod-metadata",
        "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": "Mode",
            "enum": [
              "topStreams",
              "topGames",
              "search",
              "byChannel",
              "byCategory",
              "byCategoryVideos",
              "topClips",
              "byVideo",
              "byClip",
              "byUrl"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "topStreams"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query for `mode=search` — matches channels, categories, and videos.",
            "default": "lirik"
          },
          "searchType": {
            "title": "Search result type (mode=search)",
            "enum": [
              "all",
              "channel",
              "game",
              "video"
            ],
            "type": "string",
            "description": "Restrict search results to one index. `all` returns channels, categories, and videos.",
            "default": "all"
          },
          "channelName": {
            "title": "Channel login (mode=byChannel)",
            "type": "string",
            "description": "Twitch channel login or channel URL, e.g. `lirik` or `https://www.twitch.tv/lirik`."
          },
          "channelNames": {
            "title": "Channel logins or URLs (mode=byChannel)",
            "type": "array",
            "description": "Batch channel logins or channel URLs. Duplicates and the single `channelName` are merged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categorySlug": {
            "title": "Category slug, name, or URL (mode=byCategory, byCategoryVideos, topClips)",
            "type": "string",
            "description": "Category slug (`just-chatting`), exact name (`Just Chatting`), or directory URL."
          },
          "videoId": {
            "title": "Video ID (mode=byVideo)",
            "type": "string",
            "description": "Twitch VOD ID or VOD URL, e.g. `2766365638`."
          },
          "videoIds": {
            "title": "Video IDs or URLs (mode=byVideo)",
            "type": "array",
            "description": "Batch VOD IDs or VOD URLs. Duplicates and the single `videoId` are merged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "clipSlug": {
            "title": "Clip slug (mode=byClip)",
            "type": "string",
            "description": "Twitch clip slug or clip URL, e.g. `AcceptablePleasantAuberginePanicVis-EVdxDQ1vsQAQZpBS`."
          },
          "clipSlugs": {
            "title": "Clip slugs or URLs (mode=byClip)",
            "type": "array",
            "description": "Batch clip slugs or clip URLs. Duplicates and the single `clipSlug` are merged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "twitchUrls": {
            "title": "Twitch URLs (mode=byUrl)",
            "type": "array",
            "description": "Channel, VOD, clip, or category URLs. Category and channel `/videos` and `/clips` tabs are supported.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Broadcast language",
            "enum": [
              "",
              "EN",
              "ES",
              "DE",
              "FR",
              "PT",
              "RU",
              "JA",
              "KO",
              "ZH",
              "IT",
              "TR",
              "PL",
              "AR",
              "TH",
              "ID",
              "VI",
              "NL",
              "SV",
              "FI",
              "DA",
              "NO",
              "CS",
              "HU",
              "EL",
              "RO",
              "BG",
              "UK",
              "HE",
              "MS",
              "TL",
              "ASL",
              "OTHER"
            ],
            "type": "string",
            "description": "Filter live streams, VODs, and clips to one broadcast language. Leave on `(any)` for no filter.",
            "default": "EN"
          },
          "streamSort": {
            "title": "Live stream order",
            "enum": [
              "VIEWER_COUNT",
              "VIEWER_COUNT_ASC",
              "RECENT",
              "RELEVANCE"
            ],
            "type": "string",
            "description": "Sort live streams by viewers (high to low or low to high), recently started, or recommended.",
            "default": "VIEWER_COUNT"
          },
          "streamTags": {
            "title": "Stream tags",
            "type": "array",
            "description": "Only live streams carrying all of these freeform tags, e.g. `English`, `DropsEnabled`, `NoBackseating`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "streamType": {
            "title": "VOD type",
            "enum": [
              "",
              "ARCHIVE",
              "HIGHLIGHT",
              "UPLOAD",
              "PAST_PREMIERE",
              "PREMIERE_UPLOAD"
            ],
            "type": "string",
            "description": "Restrict channel or category VODs to one broadcast type. Leave blank for all types.",
            "default": ""
          },
          "videoSort": {
            "title": "VOD order",
            "enum": [
              "TIME",
              "VIEWS"
            ],
            "type": "string",
            "description": "Sort channel or category VODs by publish time or view count.",
            "default": "TIME"
          },
          "clipPeriod": {
            "title": "Clip time window",
            "enum": [
              "LAST_DAY",
              "LAST_WEEK",
              "LAST_MONTH",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Time window over which clips were created.",
            "default": "LAST_WEEK"
          },
          "clipSort": {
            "title": "Clip order",
            "enum": [
              "VIEWS_DESC",
              "TRENDING"
            ],
            "type": "string",
            "description": "Sort clips by views or trending score.",
            "default": "VIEWS_DESC"
          },
          "includeChannelClips": {
            "title": "Include clips (mode=byChannel)",
            "type": "boolean",
            "description": "Also fetch and emit top clips for each channel.",
            "default": true
          },
          "includeChannelVideos": {
            "title": "Include VODs (mode=byChannel)",
            "type": "boolean",
            "description": "Also fetch and emit recent VODs for each channel.",
            "default": true
          },
          "minViewersCount": {
            "title": "Minimum concurrent viewers",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop live streams (and categories) below this viewer count."
          },
          "minViewCount": {
            "title": "Minimum total views",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop VODs and clips below this total view count."
          },
          "minFollowersCount": {
            "title": "Minimum followers",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop channels and live streams below this follower count. VODs and clips are unaffected."
          },
          "maxFollowersCount": {
            "title": "Maximum followers",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop channels and live streams above this follower count. Useful for finding smaller creators."
          },
          "onlyLive": {
            "title": "Only live channels",
            "type": "boolean",
            "description": "Drop channel profile records for channels that are not live right now. Their VODs and clips are still returned.",
            "default": false
          },
          "containsKeyword": {
            "title": "Title contains keyword",
            "type": "string",
            "description": "Case-insensitive substring filter on stream, VOD, and clip titles."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records. Twitch source caps still apply (e.g. about 1,000 clips per category).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}