{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitch Game Streams & Clips Scraper",
    "description": "Your Twitch research toolkit for game categories. Get first-page snapshots of live streams and popular clips with titles, languages, viewer or view counts, stream and clip links, and timestamps. Export JSON or CSV; compare your earlier observations. No login required.",
    "version": "1.0",
    "x-build-id": "7gd0x4JXAdvJMYerj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pellucid_bird~twitch-game-streams-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pellucid_bird-twitch-game-streams-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/pellucid_bird~twitch-game-streams-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pellucid_bird-twitch-game-streams-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/pellucid_bird~twitch-game-streams-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pellucid_bird-twitch-game-streams-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": {
          "games": {
            "title": "Game categories",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "Exact Twitch category names. Defaults to Grand Theft Auto V. Up to five categories, with repeated names collected once. A category can exist with no streams or clips.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "streams",
              "clips",
              "both"
            ],
            "type": "string",
            "description": "Collect live streams, popular clips, or both. In both mode, streams are collected first and share the same per-game result allowance. Defaults to streams."
          },
          "languages": {
            "title": "Languages",
            "maxItems": 10,
            "type": "array",
            "description": "Optional lowercase language codes, for example en, uk or ja. Applied locally to both streams and clips. An empty list includes every language.",
            "items": {
              "type": "string",
              "pattern": "^[a-z]{2,3}$"
            }
          },
          "minViewers": {
            "title": "Minimum live viewers",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Filter live streams by current concurrent viewers. Does not filter clip view counts. Default: 0."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total saved rows across all categories and modes. Default: 100."
          },
          "maxItemsPerGame": {
            "title": "Maximum results per game",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Combined stream and clip result allowance for each category. Default: 100."
          },
          "pageSize": {
            "title": "Source page size",
            "minimum": 2,
            "maximum": 100,
            "type": "integer",
            "description": "Rows requested from the single first page of each selected source, before local filters. Range 2–100. No pagination is performed. Default: 100."
          },
          "clipPeriodDays": {
            "title": "Clip period in days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Include clips created during the preceding number of days, ending at run start. Popular clips from the public day/week/month bucket are filtered to this exact window. Not a complete archive. Default: 7."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum seconds for DNS, connection and one response combined. Default: 10."
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 1,
            "type": "integer",
            "description": "Optional single retry for network errors, HTTP 429 or server errors. Access denials and incompatible responses are not retried. Default: 0."
          },
          "requestDelayMs": {
            "title": "Delay between pages",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Milliseconds between the stream and clip requests in both mode; source retry delays can add a bounded wait. Default: 100."
          },
          "maxEstimatedCostUsd": {
            "title": "Run spending allowance",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Estimated run allowance including startup and saved-result events after tariff approval. Default $0.10. Zero performs no source collection. This early stop control is not a final invoice guarantee."
          },
          "baseline": {
            "title": "Earlier observations (optional)",
            "maxItems": 1000,
            "type": "array",
            "description": "Your own earlier observations: key, gameId, scrapedAt and metricValue. Use viewerCount for streams or viewCount for clips. Signed deltas use only matching earlier records. No shared history is stored.",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "pattern": "^(stream:[0-9]{1,30}|clip:[A-Za-z0-9_-]{1,200})$",
                  "title": "Record key",
                  "description": "Stable type-prefixed record identity from your earlier dataset row."
                },
                "gameId": {
                  "type": "string",
                  "pattern": "^[0-9]{1,20}$",
                  "title": "Game ID",
                  "description": "Twitch category ID from the same earlier observation."
                },
                "scrapedAt": {
                  "type": "string",
                  "title": "Earlier observation time",
                  "description": "UTC ISO timestamp from your earlier snapshot; must precede the current observation.",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
                },
                "metricValue": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "title": "Earlier metric value",
                  "description": "Use the earlier viewerCount for a stream or viewCount for a clip."
                }
              },
              "required": [
                "key",
                "gameId",
                "scrapedAt",
                "metricValue"
              ],
              "additionalProperties": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}