# YouTube Channel Monitor — New Upload Tracker (`dami_studio/youtube-channel-monitor`) Actor

Monitors YouTube channels (by @handle, URL, or UC ID) and returns each channel's newest uploads as structured JSON â€” title, video URL, duration, view count, thumbnail, and a Shorts flag. Remembers seen video IDs across runs, so each run returns onl

- **URL**: https://apify.com/dami\_studio/youtube-channel-monitor.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Social media, Automation, For creators
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 new video detecteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## YouTube Channel Monitor

Watch a list of YouTube channels and get their newest uploads back as structured data: title, URL, duration, view count, thumbnail, published date, and a Shorts flag. It keeps track of which videos it has already returned, so each run gives you only the new ones. That makes it a clean trigger for automations that should fire when a creator posts: a repurposing pipeline, a competitor tracker, a "new video" alert, or a growing content dataset.

### How it works

It resolves each channel (handle, URL, or ID) to its uploads playlist, reads the latest items via the YouTube Data API v3, and pushes one dataset record per video. With `onlyNewSinceLastRun` on, it stores the video IDs it has seen in a named key-value store and skips them next time, so repeat runs only surface uploads that weren't there before.

### Input

You bring your own YouTube Data API v3 key (Google Cloud, enable the YouTube Data API v3, create an API key). The actor uses the uploads-playlist path, which costs about one quota unit per page, so it stays comfortably inside the default free 10,000 units/day.

| Field | Required | Notes |
|---|---|---|
| `channels` | yes | Any mix of `@handles`, channel URLs, and `UC…` IDs, e.g. `@MrBeast`, `https://youtube.com/@veritasium`, `UCX6OQ3DkcsbYNE6H8uQQuVA`. |
| `youtubeApiKey` | no | Your Data API v3 key. Required in practice; can also be passed via the `YOUTUBE_API_KEY` env var. Stored as a secret. |
| `maxResultsPerChannel` | no | How many of the latest uploads to check per channel each run. Default 10, max 50. |
| `onlyNewSinceLastRun` | no | Dedupe across runs and return only newly-found videos. Default `true`. |
| `maxVideoAgeHours` | no | Skip videos older than this. `0` means no age limit. |
| `minDurationSeconds` / `maxDurationSeconds` | no | Duration bounds in seconds. `0` means no limit. |
| `shortsOnly` / `longFormOnly` | no | Restrict to Shorts (185s or less) or to long-form. Leave both off for everything. |

### Output

One dataset record per new video. The fields you'll usually want are `videoId`, `title`, `url`, `channelTitle`, `publishedAt`, `durationSeconds`, `isShort`, `viewCount`, and `thumbnail`. Each record also carries `channelId`, `description`, the `sourceInput` you passed for that channel, and a `detectedAt` timestamp for when this run picked it up.

### Example

```json
{
  "channels": ["@MrBeast", "@veritasium"],
  "maxResultsPerChannel": 10,
  "onlyNewSinceLastRun": true,
  "longFormOnly": true,
  "youtubeApiKey": "YOUR_YOUTUBE_DATA_API_V3_KEY"
}
````

### Pricing

$0.01 per new video detected, pay per result, no subscription. You still cover your own Google API quota, which is free for normal use.

### Notes

Cross-run dedupe relies on a named key-value store. If a run doesn't have permission to open one, the actor logs a warning and returns all recent videos instead of just the new ones, so pair `onlyNewSinceLastRun: true` with an Apify Schedule (for example hourly) for a steady stream of new uploads. The Shorts flag is based on a 185-second cutoff and is a heuristic, not a guarantee.

# Actor input Schema

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

YouTube channels to monitor — any mix of channel URLs, @handles, or UC… IDs (e.g. @MrBeast, https://youtube.com/@veritasium, UCX6OQ3DkcsbYNE6H8uQQuVA).

## `maxResultsPerChannel` (type: `integer`):

How many of the channel's latest uploads to check each run.

## `onlyNewSinceLastRun` (type: `boolean`):

Remember seen video IDs across runs and return only newly-found videos (turns this into an upload trigger).

## `maxVideoAgeHours` (type: `integer`):

Skip videos older than this many hours. 0 = no age limit.

## `minDurationSeconds` (type: `integer`):

Skip videos shorter than this. 0 = no limit.

## `maxDurationSeconds` (type: `integer`):

Skip videos longer than this. 0 = no limit.

## `shortsOnly` (type: `boolean`):

Return only Shorts (≤185s).

## `longFormOnly` (type: `boolean`):

Return only long-form videos (>185s).

## `youtubeApiKey` (type: `string`):

Optional. Without a key the actor uses YouTube public RSS feeds (no key needed, but no duration/Shorts data and only the last ~15 uploads per channel). Provide a key for full metadata, duration, and deeper history.

## Actor input object example

```json
{
  "channels": [
    "@MrBeast",
    "@veritasium"
  ],
  "maxResultsPerChannel": 10,
  "onlyNewSinceLastRun": true,
  "maxVideoAgeHours": 0,
  "minDurationSeconds": 0,
  "maxDurationSeconds": 0,
  "shortsOnly": false,
  "longFormOnly": false
}
```

# Actor output Schema

## `results` (type: `string`):

Result rows / metadata are stored in the default dataset (one row per item).

## `files` (type: `string`):

Generated media/files (video, audio, images, captions) are stored in the default key-value store.

# 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 = {
    "channels": [
        "@MrBeast",
        "@veritasium"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/youtube-channel-monitor").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 = { "channels": [
        "@MrBeast",
        "@veritasium",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/youtube-channel-monitor").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "channels": [
    "@MrBeast",
    "@veritasium"
  ]
}' |
apify call dami_studio/youtube-channel-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dami_studio/youtube-channel-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Channel Monitor — New Upload Tracker",
        "description": "Monitors YouTube channels (by @handle, URL, or UC ID) and returns each channel's newest uploads as structured JSON â€” title, video URL, duration, view count, thumbnail, and a Shorts flag. Remembers seen video IDs across runs, so each run returns onl",
        "version": "0.1",
        "x-build-id": "73bKo5iygAVXNCEFH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dami_studio~youtube-channel-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dami_studio-youtube-channel-monitor",
                "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/dami_studio~youtube-channel-monitor/runs": {
            "post": {
                "operationId": "runs-sync-dami_studio-youtube-channel-monitor",
                "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/dami_studio~youtube-channel-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-dami_studio-youtube-channel-monitor",
                "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": [
                    "channels"
                ],
                "properties": {
                    "channels": {
                        "title": "Channels",
                        "type": "array",
                        "description": "YouTube channels to monitor — any mix of channel URLs, @handles, or UC… IDs (e.g. @MrBeast, https://youtube.com/@veritasium, UCX6OQ3DkcsbYNE6H8uQQuVA).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerChannel": {
                        "title": "Max recent videos per channel",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many of the channel's latest uploads to check each run.",
                        "default": 10
                    },
                    "onlyNewSinceLastRun": {
                        "title": "Only new since last run",
                        "type": "boolean",
                        "description": "Remember seen video IDs across runs and return only newly-found videos (turns this into an upload trigger).",
                        "default": true
                    },
                    "maxVideoAgeHours": {
                        "title": "Max video age (hours)",
                        "type": "integer",
                        "description": "Skip videos older than this many hours. 0 = no age limit.",
                        "default": 0
                    },
                    "minDurationSeconds": {
                        "title": "Min duration (s)",
                        "type": "integer",
                        "description": "Skip videos shorter than this. 0 = no limit.",
                        "default": 0
                    },
                    "maxDurationSeconds": {
                        "title": "Max duration (s)",
                        "type": "integer",
                        "description": "Skip videos longer than this. 0 = no limit.",
                        "default": 0
                    },
                    "shortsOnly": {
                        "title": "Shorts only",
                        "type": "boolean",
                        "description": "Return only Shorts (≤185s).",
                        "default": false
                    },
                    "longFormOnly": {
                        "title": "Long-form only",
                        "type": "boolean",
                        "description": "Return only long-form videos (>185s).",
                        "default": false
                    },
                    "youtubeApiKey": {
                        "title": "YouTube Data API key (optional)",
                        "type": "string",
                        "description": "Optional. Without a key the actor uses YouTube public RSS feeds (no key needed, but no duration/Shorts data and only the last ~15 uploads per channel). Provide a key for full metadata, duration, and deeper history."
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
