{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Live Stream Tracker: Live, Upcoming & Viewer History",
    "description": "Track YouTube live streams across the Live destination, News, Gaming and Sports hubs, keyword searches and channel Live tabs.",
    "version": "1.0",
    "x-build-id": "kpIkd831Nm8wUUgb9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlyth-forge~youtube-live-streams-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlyth-forge-youtube-live-streams-tracker",
        "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/crawlyth-forge~youtube-live-streams-tracker/runs": {
      "post": {
        "operationId": "runs-sync-crawlyth-forge-youtube-live-streams-tracker",
        "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/crawlyth-forge~youtube-live-streams-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-crawlyth-forge-youtube-live-streams-tracker",
        "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": "Mode",
            "enum": [
              "liveNow",
              "upcoming",
              "recent",
              "search",
              "channels",
              "streams"
            ],
            "type": "string",
            "description": "What to track: discover live streams, upcoming or recent streams from YouTube's Live destination, run a Live-filtered keyword search, read channel Live tabs, or monitor specific stream URLs.",
            "default": "liveNow"
          },
          "searchQueries": {
            "title": "Search queries",
            "minItems": 1,
            "type": "array",
            "description": "Keywords for mode=search. Each query uses YouTube's Live filter. Example: breaking news live, esports tournament live.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channel URLs, handles or IDs",
            "minItems": 1,
            "type": "array",
            "description": "Channels for mode=channels. Accepts https://www.youtube.com/@handle, /channel/UC..., /c/name or a bare @handle.",
            "items": {
              "type": "string"
            }
          },
          "streamUrls": {
            "title": "Stream URLs or video IDs",
            "minItems": 1,
            "type": "array",
            "description": "Streams for mode=streams. Accepts watch, youtu.be, /live/, /embed/ or /shorts/ URLs and bare 11-character video IDs.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum stream rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on stream rows in the dataset. Status rows explain empty or failed sources separately.",
            "default": 30
          },
          "maxPerChannel": {
            "title": "Maximum rows per channel",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "For mode=channels, how many streams to keep per channel after the live/upcoming/past filter.",
            "default": 20
          },
          "country": {
            "title": "Country (market)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "DE",
              "FR",
              "IT",
              "ES",
              "PT",
              "NL",
              "BE",
              "CH",
              "AT",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "CZ",
              "SK",
              "HU",
              "RO",
              "BG",
              "GR",
              "UA",
              "RU",
              "TR",
              "IL",
              "SA",
              "AE",
              "QA",
              "KW",
              "BH",
              "OM",
              "JO",
              "LB",
              "EG",
              "MA",
              "DZ",
              "TN",
              "NG",
              "KE",
              "GH",
              "ET",
              "ZA",
              "PK",
              "BD",
              "LK",
              "NP",
              "IN",
              "SG",
              "MY",
              "TH",
              "PH",
              "ID",
              "VN",
              "HK",
              "TW",
              "JP",
              "KR",
              "CN",
              "BR",
              "MX",
              "AR",
              "CO",
              "CL",
              "PE",
              "VE",
              "EC",
              "GT",
              "CR",
              "PA",
              "DO",
              "PR"
            ],
            "type": "string",
            "description": "YouTube market code used for results, localisation and region availability. Default US.",
            "default": "US"
          },
          "language": {
            "title": "Interface language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "pt",
              "it",
              "nl",
              "pl",
              "ru",
              "ja",
              "ko",
              "zh",
              "hi",
              "ar",
              "tr",
              "id",
              "th",
              "vi",
              "sv",
              "no",
              "da",
              "fi",
              "cs",
              "el",
              "he",
              "uk",
              "ro",
              "hu",
              "ms",
              "bn",
              "ur",
              "fa",
              "sw",
              "ta",
              "te"
            ],
            "type": "string",
            "description": "YouTube UI language. It localises labels and date text; it is not a stream-language filter.",
            "default": "en"
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "news",
              "gaming",
              "sports",
              "music",
              "entertainment",
              "education",
              "film",
              "autos",
              "travel",
              "science",
              "howto",
              "people",
              "comedy",
              "pets",
              "nonprofit",
              "other"
            ],
            "type": "string",
            "description": "Keep streams in one YouTube category. Categories are known from YouTube's Live shelves and hubs; streams whose category YouTube does not expose on your egress are excluded when a category is selected.",
            "default": "all"
          },
          "minViewers": {
            "title": "Minimum concurrent viewers",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Drop live streams below this concurrent-viewer count. Upcoming streams have no viewers yet, so a non-zero value removes them.",
            "default": 0
          },
          "channelStreams": {
            "title": "Channel stream status",
            "enum": [
              "all",
              "live",
              "upcoming",
              "past"
            ],
            "type": "string",
            "description": "For mode=channels, keep all streams or only live, upcoming or past ones.",
            "default": "all"
          },
          "includeDetails": {
            "title": "Include per-stream details",
            "type": "boolean",
            "description": "Read each stream's player and watch-next data for exact concurrent viewers, tags, likes, chat availability, subscriber count and broadcast dates. Turn off for a cheaper list-only run.",
            "default": true
          },
          "pollIntervalMinutes": {
            "title": "Polling interval (minutes)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "For mode=streams, re-read live streams every N minutes and record a viewer sample each time. 0 reads each stream once.",
            "default": 0
          },
          "pollDurationMinutes": {
            "title": "Polling duration (minutes)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "For mode=streams, how long to keep polling. 0 uses 10 minutes when polling is enabled. Polling stops early when a stream ends.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}