{
  "openapi": "3.0.1",
  "info": {
    "title": "Stream Stats API (compatible with Twitch & Kick)",
    "description": "Channel info and live status for thousands of channels, top clips by views with VOD links, VODs and top games, read through the official Twitch API and Kick API on your own free app keys. Compatible with Twitch and Kick. No scraping, no proxies, no emails.",
    "version": "1.0",
    "x-build-id": "886pUA6HNTagpKzrL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rivetfinch~stream-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rivetfinch-stream-stats",
        "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/rivetfinch~stream-stats/runs": {
      "post": {
        "operationId": "runs-sync-rivetfinch-stream-stats",
        "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/rivetfinch~stream-stats/run-sync": {
      "post": {
        "operationId": "run-sync-rivetfinch-stream-stats",
        "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": "What to get",
            "enum": [
              "channels",
              "clips",
              "videos",
              "topGames"
            ],
            "type": "string",
            "description": "channels: channel info and live status (Twitch and Kick). clips: top clips per channel or game, sorted by views. videos: recent VODs, highlights and uploads. topGames: the most watched categories and their top live streams.",
            "default": "channels"
          },
          "twitchClientId": {
            "title": "Twitch Client ID",
            "type": "string",
            "description": "From your own app at dev.twitch.tv/console/apps (free; any OAuth Redirect URL such as http://localhost works). Stored encrypted; never logged or saved in the output."
          },
          "twitchClientSecret": {
            "title": "Twitch Client Secret",
            "type": "string",
            "description": "The Client Secret of the same Twitch app (Client Type: Confidential). Used only to get an app token, which the Actor revokes at the end of the run."
          },
          "kickClientId": {
            "title": "Kick Client ID (optional)",
            "type": "string",
            "description": "Only for Kick channels: the Client ID of your Kick app (Kick account > Settings > Developer)."
          },
          "kickClientSecret": {
            "title": "Kick Client Secret (optional)",
            "type": "string",
            "description": "The Client Secret of the same Kick app."
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Twitch logins (shroud), twitch.tv links, kick.com links or kick:name. Up to 10,000 per run. Kick channels work in channels mode only (Kick's official API has no clips or VODs).",
            "items": {
              "type": "string"
            }
          },
          "games": {
            "title": "Games or categories",
            "type": "array",
            "description": "Twitch category names exactly as Twitch spells them (Just Chatting, Fortnite) or numeric category ids. Used by clips, videos and topGames modes. Leave empty in topGames mode for the current top list.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "From",
            "type": "string",
            "description": "Start of the time window: a date (2026-11-01), a date-time (2026-11-01T18:00:00Z) or a relative time (7 days, 24 hours). Clips: defaults to 7 days ago. Videos: optional filter on the creation date."
          },
          "endDate": {
            "title": "To",
            "type": "string",
            "description": "End of the time window, in the same formats. Defaults to now."
          },
          "maxClipsPerSource": {
            "title": "Max clips per channel or game",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Empty = 100, or all with the monitor on. Up to 1,000: one query, the most viewed clips of the window in Twitch's order. Above 1,000, or 0 for all: the window is sliced automatically to get past Twitch's ~1,000-per-query cap. With the monitor, a cap makes busy channels or games come in parts over several runs."
          },
          "featuredClipsOnly": {
            "title": "Featured clips only",
            "type": "boolean",
            "description": "Only clips the channel has marked as featured.",
            "default": false
          },
          "monitor": {
            "title": "Only new clips since the last run",
            "type": "boolean",
            "description": "For scheduled runs: each channel or game returns only clips this monitor has not returned before. To keep to Twitch's 24-hour storage limit, the memory (hashed clip ids, in the Actor's own store) forgets ids after 23 hours, so runs more than about 23 hours apart may repeat a few clips from just before the previous run.",
            "default": false
          },
          "monitorStateName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Runs with the same name share one memory. Defaults to one memory per saved task, or, for runs started without a task, one per list of channels and games."
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel or game",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Videos per channel or game. Twitch returns at most 500 videos for one game.",
            "default": 50
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "all",
              "archive",
              "highlight",
              "upload"
            ],
            "type": "string",
            "description": "archive = past broadcasts (VODs), highlight, upload, or all.",
            "default": "all"
          },
          "videoSort": {
            "title": "Sort videos by",
            "enum": [
              "time",
              "trending",
              "views"
            ],
            "type": "string",
            "description": "time = newest first, trending, or views.",
            "default": "time"
          },
          "videoPeriod": {
            "title": "Video period",
            "enum": [
              "all",
              "day",
              "week",
              "month"
            ],
            "type": "string",
            "description": "Twitch's own period filter for videos: all, day, week or month.",
            "default": "all"
          },
          "maxGames": {
            "title": "Top games",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "topGames mode: how many of the most watched categories to list (up to 100).",
            "default": 20
          },
          "streamsPerGame": {
            "title": "Top streams per game",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "topGames mode: live streams per category, most viewers first. 0 lists the games only.",
            "default": 10
          },
          "includeFollowerTotals": {
            "title": "Try follower totals",
            "type": "boolean",
            "description": "Channels mode: one extra API request per channel (each charged as one request). Twitch documents a user token for follower totals; if your app token is refused, followerCount stays empty and SUMMARY says so.",
            "default": false
          },
          "maxRows": {
            "title": "Max rows",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Stop after this many channel, stream, clip and video rows (0 = no limit besides your maximum charge). Game and problem rows are not counted. Every row is free; you pay per API request.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}