# YouTube New-Video Monitor (`delta_tools/youtube-new-video-monitor`) Actor

Watch YouTube channels for new video uploads with built-in cross-run dedup. Scheduled re-runs push nothing and cost ~nothing when no channel uploaded. Pay per new video detected, plus a $0.001 run start.

- **URL**: https://apify.com/delta_tools/youtube-new-video-monitor.md
- **Developed by:** [Delta Tools](https://apify.com/delta_tools) (community)
- **Categories:** Social media, Automation, For creators
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 new videos

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

Learn more: https://docs.apify.com/actors/running/actors-in-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 New-Video Monitor

Watch YouTube channels for new uploads, with built-in cross-run memory, so a
scheduled run pushes nothing and costs ~nothing when no channel uploaded
anything new.

### Why this instead of a scraper

One-shot YouTube scrapers re-bill you per video on **every** run and leave the
"what's new since last time?" diff to you. This monitor keeps its own memory:
quiet runs bill only the $0.001 Actor start, and you pay per genuinely new
video detected.

It reads YouTube's public channel RSS feeds — no API key, no scraping, no
bot-gating, exact publish times.

### How it works

1. Give it YouTube channel IDs (or `/channel/` URLs), up to 50 per run.
2. On the first run it reports the current videos as new — turn
   `reportInitialAsNew` off to start silently with just a baseline.
3. Every later run re-checks and reports only new uploads since the baseline.
4. State lives in a named key-value store, namespaced by `stateKey`, so
   multiple schedules never mix memories. A machine-readable run receipt is
   saved per run (`state-v1-<stateKey>-last-receipt`).

### Inputs

| Field | What it does |
|---|---|
| `channels` | Channels to watch: channel ID (`UC...`), `/channel/` URL, or RSS feed URL. Empty = quick demo. |
| `reportInitialAsNew` | Report current videos as new on the first run. Default on. |
| `maxVideosPerChannel` | Latest videos compared per channel (feeds carry the 15 newest). |
| `stateKey` | Separate memory per schedule. The prefilled `default` key rotates daily so the free trial always shows recent videos; use your own key (e.g. `weekly-check`) for persistent monitoring. |

### Output

One row per new video: `channelId`, `channelName`, `videoId`, `title`, `url`,
`publishedAt`, `author`, `description` (truncated to 500 chars), `thumbnailUrl`,
`detectedAt`.

### Pricing

Pay per event: $0.001 per run start + $0.0025 per new video. A quiet scheduled
run costs $0.001.

### Honest limitations

- Needs the channel **ID** (`UC...`), not the `@handle`: find it in YouTube
  Studio under Settings, then Channel. `@handle` URLs can't be resolved
  without an API key or scraping, so they're skipped, with instructions in
  the run log.
- Feeds carry each channel's 15 newest videos; a channel uploading more than
  15 between two runs could skip the oldest of the burst, so schedule sensibly.
- Shorts and live streams appear as regular entries; filtering is up to you.

# Actor input Schema

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

YouTube channels to watch. Each entry takes a channel ID (UC...), a /channel/ URL, or a channel RSS feed URL. Leave empty to run a quick demo with sample channels. Find a channel ID in YouTube Studio under Settings, then Channel.

## `httpTimeoutSeconds` (type: `integer`):

HTTP timeout per channel feed, in seconds.

## `maxVideosPerChannel` (type: `integer`):

How many of each channel's latest videos to compare per run (YouTube feeds carry the 15 newest).

## `reportInitialAsNew` (type: `boolean`):

Report the current videos as new on the very first run (baseline). Turn off to start silently and only get future uploads.

## `stateKey` (type: `string`):

Use a different stateKey per schedule so their memories don't mix.

## Actor input object example

```json
{
  "channels": [
    {
      "name": "Google for Developers",
      "url": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
    },
    {
      "name": "Fireship",
      "url": "UCsBjURrPoezykLs9EqgamOA"
    }
  ],
  "httpTimeoutSeconds": 30,
  "maxVideosPerChannel": 15,
  "reportInitialAsNew": true,
  "stateKey": "default"
}
```

# Actor output Schema

## `author` (type: `string`):

No description

## `channelId` (type: `string`):

No description

## `channelName` (type: `string`):

No description

## `description` (type: `string`):

No description

## `detectedAt` (type: `string`):

No description

## `publishedAt` (type: `string`):

No description

## `thumbnailUrl` (type: `string`):

No description

## `title` (type: `string`):

No description

## `url` (type: `string`):

No description

## `videoId` (type: `string`):

No description

# 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": [
        {
            "name": "Google for Developers",
            "url": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
        },
        {
            "name": "Fireship",
            "url": "UCsBjURrPoezykLs9EqgamOA"
        }
    ],
    "httpTimeoutSeconds": 30,
    "maxVideosPerChannel": 15,
    "reportInitialAsNew": true,
    "stateKey": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("delta_tools/youtube-new-video-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": [
        {
            "name": "Google for Developers",
            "url": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
        },
        {
            "name": "Fireship",
            "url": "UCsBjURrPoezykLs9EqgamOA",
        },
    ],
    "httpTimeoutSeconds": 30,
    "maxVideosPerChannel": 15,
    "reportInitialAsNew": True,
    "stateKey": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("delta_tools/youtube-new-video-monitor").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 '{
  "channels": [
    {
      "name": "Google for Developers",
      "url": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
    },
    {
      "name": "Fireship",
      "url": "UCsBjURrPoezykLs9EqgamOA"
    }
  ],
  "httpTimeoutSeconds": 30,
  "maxVideosPerChannel": 15,
  "reportInitialAsNew": true,
  "stateKey": "default"
}' |
apify call delta_tools/youtube-new-video-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,delta_tools/youtube-new-video-monitor"
        }
    }
}
```

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/TgQDKhmkFet1YbsKV/builds/hWyC8e2jE0aMIJY6B/openapi.json
