# YouTube Live Stream Tracker: Live, Upcoming & Viewer History (`crawlyth-forge/youtube-live-streams-tracker`) Actor

Track YouTube live streams across the Live destination, News, Gaming and Sports hubs, keyword searches and channel Live tabs.

- **URL**: https://apify.com/crawlyth-forge/youtube-live-streams-tracker.md
- **Developed by:** [crawlyth forge](https://apify.com/crawlyth-forge) (community)
- **Categories:** Videos, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Live Stream Tracker: Live, Upcoming & Viewer History

Track YouTube live streams from six angles: what is live right now across YouTube's Live
destination and its News, Gaming and Sports hubs; what is scheduled next; what recently ended;
what matches a keyword with YouTube's Live filter; every live, upcoming and past stream of the
channels you follow; and a minute-by-minute viewer history for specific stream URLs.

Every run returns one row per stream with the exact concurrent-viewer count, a viewer peak and
average when polling is on, scheduled and actual start times, duration, tags, likes, chat
availability, channel identity, verification and subscriber count. No YouTube account, cookie,
API key or proxy setup is required.

### Modes

| `mode` | What it reads | Best for |
|---|---|---|
| `liveNow` | YouTube's Live destination, News/Gaming/Sports live hubs and the paginated Live-filtered search index | "Who is live now", live dashboards, go-live monitoring |
| `upcoming` | The Live destination's Upcoming shelf | Scheduled-stream calendars and reminders |
| `recent` | The Live destination's Recent Live Streams shelf | What just ended, with duration and audience |
| `search` | Each query through YouTube's Live filter, with continuation | Niche live monitoring by keyword |
| `channels` | Each channel's Live tab, with continuation | Creator and brand rosters, past-stream archives |
| `streams` | Specific watch URLs or video IDs, optionally polled | Viewer-count time series, sponsor and event verification |

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `mode` | select | `liveNow` | One of `liveNow`, `upcoming`, `recent`, `search`, `channels`, `streams` |
| `searchQueries` | string list | - | Keywords for `mode=search`; each uses the Live filter |
| `channels` | string list | - | Channel URLs, `@handles`, `/channel/UC...`, `/c/name` or IDs for `mode=channels` |
| `streamUrls` | string list | - | Watch/live/embed/shorts URLs or 11-character IDs for `mode=streams` |
| `maxItems` | integer | 30 | Maximum stream rows (1-1000) |
| `maxPerChannel` | integer | 20 | Maximum rows kept per channel in `mode=channels` (1-200) |
| `country` | select | `US` | YouTube market code used for results and localisation |
| `language` | select | `en` | YouTube interface language; localises labels and date text |
| `category` | select | `all` | Keep one YouTube category when the source exposes it |
| `minViewers` | integer | 0 | Drop live streams below this concurrent-viewer count |
| `channelStreams` | select | `all` | For `mode=channels`: `all`, `live`, `upcoming` or `past` |
| `includeDetails` | boolean | true | Read the per-stream player and watch-next data for viewers, tags, likes and chat |
| `pollIntervalMinutes` | integer | 0 | For `mode=streams`: sample viewers every N minutes (0 = one snapshot) |
| `pollDurationMinutes` | integer | 0 | For `mode=streams`: polling window; 0 uses 10 minutes when polling is on |

The prefilled form (`liveNow`, two rows, details off) is the smallest run with output. Turn on `includeDetails` when you need per-stream viewers, tags, likes and chat.

### Output

One row per stream (`recordType: "stream"`) plus status rows (`recordType: "status"`) that
explain an empty source, invalid target or failed request.

Stream identity and timing:

- `position` - order in the dataset
- `videoId`, `url` - stable YouTube identity and watch URL
- `title`, `description` - stream title and description (description capped at 2,000 characters)
- `status` - `live`, `upcoming` or `ended`
- `isLive`, `isUpcoming`, `isEnded`, `isPremiere` - normalised flags where the source makes them clear
- `scheduledStartTime`, `scheduledStartPrecision`, `scheduledStartText` - scheduled start and its precision
- `actualStartTime`, `actualStartPrecision`, `actualStartText` - broadcast start and its precision
- `durationSeconds`, `durationText` - duration for ended streams
- `elapsedSeconds` - how long a live stream has been running
- `publishedTimeText`, `relativeDateText`, `dateText` - the site's own timing text

Audience:

- `concurrentViewers`, `concurrentViewersText`, `concurrentViewersIsRounded` - live audience
- `viewerPeak`, `viewerAverage`, `viewerSampleCount`, `viewerSamples` - polling history
- `viewCount`, `viewCountText`, `viewCountIsRounded` - lifetime views where published
- `likeCount`, `likeCountText`, `likeCountIsRounded` - likes; rounded values are marked
- `waitingCount` - people waiting on an upcoming stream
- `isLiveChatEnabled` - whether live chat is enabled on a live stream

Channel and classification:

- `channelId`, `channelName`, `channelHandle`, `channelUrl`, `channelAvatarUrl`
- `isVerified`, `subscriberCount`, `subscriberCountText`, `subscriberCountIsRounded`
- `category`, `categorySlug`, `categorySource` - category when YouTube exposes it
- `tags` - keywords published by the player
- `language` - audio language when the player publishes one
- `region`, `availableInRegion`, `isFamilySafe` - requested market and region flags when exposed
- `thumbnailUrl`, `thumbnails`, `badges`

Provenance:

- `source`, `sources`, `sourceUrl` - where the row came from
- `searchQuery`, `inputChannel`, `inputUrl` - the target that produced it
- `scrapedAt`, `fetchedAt`, `pollStartedAt`, `pollEndedAt`

Every field is omitted when the source does not publish it. No `null`, blank string or empty
array is written to the dataset.

### Examples

Discover live streams in the United States:

```json
{
  "mode": "liveNow",
  "maxItems": 50,
  "includeDetails": true,
  "country": "US",
  "language": "en"
}
```

Live streams in the News category with at least 1,000 viewers:

```json
{
  "mode": "liveNow",
  "category": "news",
  "minViewers": 1000,
  "maxItems": 100
}
```

Search with the Live filter:

```json
{
  "mode": "search",
  "searchQueries": ["breaking news live", "esports tournament live"],
  "maxItems": 40
}
```

Every live, upcoming and past stream of two channels:

```json
{
  "mode": "channels",
  "channels": ["@LofiGirl", "https://www.youtube.com/@NASA"],
  "maxPerChannel": 20,
  "channelStreams": "all"
}
```

Track one stream's viewers every two minutes for ten minutes:

```json
{
  "mode": "streams",
  "streamUrls": ["https://www.youtube.com/watch?v=t3fvgmDDmdc"],
  "pollIntervalMinutes": 2,
  "pollDurationMinutes": 10
}
```

### How it works

The actor reads YouTube's public web data through its public InnerTube endpoints. It never logs
in and never uses a user cookie.
Requests go direct first; if YouTube answers with a block or rate limit, the actor uses Apify's
included datacenter proxy as a bounded fallback. You do not configure a proxy.

Exact concurrent viewers come from YouTube's watch-next data. When the list view only shows a
shortened count such as `7.7K watching`, the rounded flag is set and the next request replaces it
with the exact number unless details are turned off.

### Limits and FAQ

**Why is `category` sometimes missing?** YouTube's player publishes a video's category,
exact likes, exact start/end timestamps and region availability only to some clients. From
Apify's datacenter network the web player answers a login gate for live and ended streams. The
actor keeps the fields it can prove: category from YouTube's Live shelves and hubs, tags and
duration from the public player, exact viewers and chat from watch-next, and rounded likes and
day- or hour-level broadcast dates when the exact values are gated. It does not guess. When an
exact player value is available, the rounded fallback is never used.

**Why does `upcoming` return fewer rows than my `maxItems`?** YouTube's Live destination shows a
fixed number of upcoming streams. For a complete schedule, use `mode=channels` with the channels
you follow.

**Why is there no language filter?** YouTube does not publish a stream's spoken language in any
cookieless endpoint. `language` in this actor selects the interface language (which changes
localised labels and date text), not the stream language. A `language` output field appears only
when the player publishes an audio language.

**Why are some viewer counts marked rounded?** Channel Live tabs sometimes show a shortened label
like `7.7K watching`. The actor flags it; with `includeDetails` on, the exact number replaces it.
Viewer peaks are the highest sampled value, not a value YouTube publishes. Likes use the same
flag: `likeCountIsRounded` is true when YouTube only showed a shortened label.

**Where does channel metadata come from?** From the channel's Live-tab response, so a channel
run does not fetch its multi-megabyte home page. A channel with a public Live tab is enough.

**Why is `actualStartTime` day- or hour-level sometimes?** Without the gated player metadata,
YouTube shows a broadcast date or relative age such as "Started streaming on Jun 23, 2026" or
"Started streaming 11 hours ago" rather than a timestamp. The actor records the best available
value, prefers the absolute date for ended streams, and sets `actualStartPrecision` so downstream
jobs know how exact it is.

**Do I need a proxy or API key?** No. The actor works without either. A proxy is only used
internally as a fallback if YouTube blocks a request.

**Does this download video or audio?** No. It tracks public stream metadata and audience counts.

# Actor input Schema

## `mode` (type: `string`):

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.

## `searchQueries` (type: `array`):

Keywords for mode=search. Each query uses YouTube's Live filter. Example: breaking news live, esports tournament live.

## `channels` (type: `array`):

Channels for mode=channels. Accepts https://www.youtube.com/@handle, /channel/UC..., /c/name or a bare @handle.

## `streamUrls` (type: `array`):

Streams for mode=streams. Accepts watch, youtu.be, /live/, /embed/ or /shorts/ URLs and bare 11-character video IDs.

## `maxItems` (type: `integer`):

Upper bound on stream rows in the dataset. Status rows explain empty or failed sources separately.

## `maxPerChannel` (type: `integer`):

For mode=channels, how many streams to keep per channel after the live/upcoming/past filter.

## `country` (type: `string`):

YouTube market code used for results, localisation and region availability. Default US.

## `language` (type: `string`):

YouTube UI language. It localises labels and date text; it is not a stream-language filter.

## `category` (type: `string`):

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.

## `minViewers` (type: `integer`):

Drop live streams below this concurrent-viewer count. Upcoming streams have no viewers yet, so a non-zero value removes them.

## `channelStreams` (type: `string`):

For mode=channels, keep all streams or only live, upcoming or past ones.

## `includeDetails` (type: `boolean`):

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.

## `pollIntervalMinutes` (type: `integer`):

For mode=streams, re-read live streams every N minutes and record a viewer sample each time. 0 reads each stream once.

## `pollDurationMinutes` (type: `integer`):

For mode=streams, how long to keep polling. 0 uses 10 minutes when polling is enabled. Polling stops early when a stream ends.

## Actor input object example

```json
{
  "mode": "liveNow",
  "maxItems": 2,
  "maxPerChannel": 5,
  "country": "US",
  "language": "en",
  "category": "all",
  "minViewers": 0,
  "channelStreams": "all",
  "includeDetails": false,
  "pollIntervalMinutes": 0,
  "pollDurationMinutes": 0
}
```

# Actor output Schema

## `streams` (type: `string`):

Dataset with one row per stream and status rows for empty or failed sources.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 2,
    "maxPerChannel": 5,
    "includeDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlyth-forge/youtube-live-streams-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 2,
    "maxPerChannel": 5,
    "includeDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlyth-forge/youtube-live-streams-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 2,
  "maxPerChannel": 5,
  "includeDetails": false
}' |
apify call crawlyth-forge/youtube-live-streams-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlyth-forge/youtube-live-streams-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/FgEPpxp5gb6oXRIwM/builds/kpIkd831Nm8wUUgb9/openapi.json
