# YouTube Channel & Search Scraper - Fast & Cheap (`aolmo/youtube-videos`) Actor

Lists the videos of any YouTube channel or search query as clean rows: title, views, duration, publish date, channel, thumbnail and link, plus channel subscribers. Sort searches by date or views. No browser, no API key, no quota. $0.001 per video; new videos flagged on scheduled runs.

- **URL**: https://apify.com/aolmo/youtube-videos.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Categories:** Videos, Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 video scrapeds

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/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

Get the videos of any YouTube channel, or the results of any YouTube search, as clean structured rows. Paste channel URLs, handles or search queries and the Actor returns one row per video with title, views, duration, publish date, channel, thumbnail and link, plus the channel's subscriber and video counts. Schedule it and every run flags the videos that are new since the previous one.

No browser, no proxies on your side, no YouTube API key and no daily quota: the Actor reads the same internal endpoints the YouTube website uses, so it is fast and cheap. You pay $0.001 per video returned.

### What you get

One Dataset row per video:

- `title`, `url`, `id`, `thumbnailUrl`, `isLive`.
- `views` and `viewsText`, `durationSeconds` and `durationText`.
- `publishedText` (YouTube's relative date such as `2 days ago`) and `publishedAt`, an approximate ISO date computed from it.
- `channelId`, `channelName`, `channelUrl`, and for channel rows `channelSubscribers`.
- `description`: the snippet YouTube shows in search results (search rows only).
- `source`, `kind`, `query`: where the row comes from (a channel or a search).
- `isNew`: `true` when the video was not in the previous run of that channel or query.

A channel that does not exist or a query that fails produces a single row with an `error` field and is not charged.

### How to use it

1. Open the **Input** tab.
2. In **Channels** paste one channel per line: `https://www.youtube.com/@GoogleDevelopers`, `@GoogleDevelopers` or `https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw`. You get the channel's videos, newest first.
3. In **Search queries** paste one query per line, for example `web scraping tutorial`. Pick **Sort search results by**: relevance, upload date (videos uploaded in the last month, newest first) or view count.
4. Set **Max videos per channel or query** to cap the size and the cost (default 100).
5. Click **Start**. Read the rows in **Output** or export them as JSON, CSV or Excel.
6. To monitor a channel or a topic, schedule the Actor (hourly or daily). Every run compares with the previous one and new videos come with `isNew: true`. For topics, sort by upload date. Connect a webhook or an email integration to be notified.

### Input

```json
{
  "channels": ["https://www.youtube.com/@GoogleDevelopers"],
  "queries": ["web scraping tutorial"],
  "sortBy": "relevance",
  "maxVideos": 100
}
```

| Field       | Description |
|-------------|-------------|
| `channels`  | Channel URLs, `@handles` or channel ids. Up to 50 sources per run (channels plus queries). |
| `queries`   | Search texts. |
| `sortBy`    | Search order: `relevance` (default), `date` (videos uploaded in the last month, newest first) or `views`. Channels are always newest first. |
| `maxVideos` | Per channel or query, 1 to 2,000. Default 100. |

### Output example

```json
{
  "source": "https://www.youtube.com/@GoogleDevelopers",
  "kind": "channel",
  "query": null,
  "id": "Rnz9mOyxk0k",
  "url": "https://www.youtube.com/watch?v=Rnz9mOyxk0k",
  "title": "How to transform audio into physical prints using Gemini and Google AI Studio",
  "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "channelName": "Google for Developers",
  "channelUrl": "https://www.youtube.com/@GoogleDevelopers",
  "channelSubscribers": 2680000,
  "durationText": "1:05",
  "durationSeconds": 65,
  "views": 14000,
  "viewsText": "14K views",
  "publishedText": "2 days ago",
  "publishedAt": "2026-10-02T09:30:00.000Z",
  "thumbnailUrl": "https://i.ytimg.com/vi/Rnz9mOyxk0k/hq720.jpg",
  "description": null,
  "isLive": false,
  "isNew": false,
  "timestamp": "2026-10-04T09:30:00.000Z"
}
```

### Pricing

Pay per event, no subscription:

- **Video scraped**: $0.001 per video row. A channel with 500 videos costs $0.50; a search of 100 results costs $0.10.
- **New video**: $0.002 per video flagged as new in a scheduled run. Runs with nothing new only pay for the rows.

Channels or queries that cannot be read are free. Compare with typical YouTube scrapers at $0.002 to $0.005 per video.

### Use it as an API

Run it from your code with the Apify API or client libraries:

```bash
curl -X POST "https://api.apify.com/v2/acts/aolmo~youtube-videos/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["@GoogleDevelopers"], "maxVideos": 50}'
```

The response is the list of video rows. You can also call it from AI agents through the Apify MCP server. For transcripts of the videos you find, use the companion Actor `aolmo/youtube-transcript`.

### FAQ

**Are the view counts exact?** In search rows yes (`484,842 views`). In channel rows YouTube only shows rounded figures (`14K views`), and `views` is the rounded number.

**How precise is `publishedAt`?** It is computed from YouTube's relative text, so `2 days ago` becomes a timestamp two days before the run. Use it for ordering and filtering, not as the exact upload time.

**Does it include Shorts and live streams?** Channel rows come from the Videos tab, so Shorts are not included. Live streams appear with `isLive: true` and no duration.

**Can I get comments or transcripts?** Transcripts: yes, with `aolmo/youtube-transcript`. Comments are planned as a separate Actor.

**Where is the data stored between runs?** In a Key-Value Store of your account named `micro-saas-state-youtube-videos`, one key per channel or query. Delete it to start fresh.

# Actor input Schema

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

One per line: channel URL (https://www.youtube.com/@GoogleDevelopers or https://www.youtube.com/channel/UC...), @handle or channel id. Returns the channel's videos, newest first.

## `queries` (type: `array`):

One per line. Each query returns the videos YouTube finds for it, ordered by the sort option below.

## `sortBy` (type: `string`):

Only for search queries. Upload date returns the videos uploaded in the last month, newest first: use it to monitor new videos about a topic.

## `maxVideos` (type: `integer`):

Also caps what you pay per channel or query. Pages of about 30 videos (channel) or 20 (search) are read until this limit.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "channels": [
    "https://www.youtube.com/@GoogleDevelopers"
  ],
  "queries": [
    "web scraping tutorial"
  ],
  "sortBy": "relevance",
  "maxVideos": 100,
  "product": "youtube-videos"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

# 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": [
        "https://www.youtube.com/@GoogleDevelopers"
    ],
    "queries": [
        "web scraping tutorial"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/youtube-videos").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": ["https://www.youtube.com/@GoogleDevelopers"],
    "queries": ["web scraping tutorial"],
}

# Run the Actor and wait for it to finish
run = client.actor("aolmo/youtube-videos").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": [
    "https://www.youtube.com/@GoogleDevelopers"
  ],
  "queries": [
    "web scraping tutorial"
  ]
}' |
apify call aolmo/youtube-videos --silent --output-dataset

```

## MCP server setup

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

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/tlsXR3Lydc6KL3W8V/builds/R6dradILSZEIUe8dN/openapi.json
