# YouTube Channel Scraper — No API Key (`glasswing/youtube-channel-scraper`) Actor

Give YouTube channel links, @handles or channel IDs and get every upload (videos, Shorts, live streams) with views, likes, comments, duration and exact publish date, plus channel stats. Exact date windows. $1 per 1,000 videos.

- **URL**: https://apify.com/glasswing/youtube-channel-scraper.md
- **Developed by:** [Raffy](https://apify.com/glasswing) (community)
- **Categories:** Videos, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 6 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 results

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

### What does YouTube Channel Scraper do?

YouTube Channel Scraper exports **every upload of one or many YouTube channels**: regular videos, Shorts and live streams, each with exact views, likes, comment count, duration, publish date, description and hashtags. Paste channel links, @handles or channel IDs and get one row per video as JSON, CSV or Excel. Add one **channel stats row** per channel (subscribers, total videos, total views, join date, country) when you need it.

It is a **YouTube Data API alternative for channels: every upload, no API key and no quota**. No Google Cloud project, no OAuth, no daily unit budget and no browser. The Actor reads the public data youtube.com shows to a logged-out visitor and costs **$1 per 1,000 videos**.

- **All uploads**: the Videos, Shorts and Live lists of each channel, Latest, Popular or Oldest first, up to 10,000 per list.
- **Exact date window**: `publishedAfter` and `publishedBefore` cut to the day, for example "every video a channel published in March 2025".
- **Channel stats**: subscribers, total videos, total views, join date, country (when the channel shows it) and description.

It reads channel and video metadata only. It does **not** collect comments, viewer data, creator e-mail addresses, @handles, avatars or the creator's social links.

### Use cases

- **Replace the YouTube Data API for channel exports.** Pull all uploads of a list of channels without quota units: a 20,000-video export is one run.
- **Channel monitoring.** Schedule a daily run with Latest order and `publishedAfter: "2 days"`: each channel's list stops at the first older video, so you pay only for new uploads.
- **Competitor and creator research.** Compare channels by uploads per month, views, likes and comment counts; find a channel's most popular videos with Popular order.
- **Exact reporting periods.** Get one month or one quarter of a channel's uploads with exact publish dates, for reports, audits and back-tests.
- **Shorts and live streams.** Export a channel's Shorts and its past, current and scheduled streams next to its regular videos.
- **Datasets for analytics and AI.** Titles, descriptions, hashtags, durations and engagement numbers for thousands of videos, ready for a spreadsheet, a BI tool or a model.
- **Automation.** Send results to Google Sheets, Airtable, Supabase, Slack or a CRM with Make, n8n or Zapier, or read them from the Apify API.

### Why use YouTube Channel Scraper?

- **Exact dates, not "3 weeks ago".** Every video row carries `publishedAt` as `YYYY-MM-DD`, and the date window is exact to the day.
- **Complete rows.** Each upload is opened to add exact views, likes, comment count, full description and hashtags, at no extra charge.
- **Cheap and fast.** $1 per 1,000 results, Apify platform usage included; plus $0.005 per run. No browser: the default run finishes in well under a minute.
- **Honest results.** Every row carries `status` (`ok`, `not_found`, `error`). An unknown @handle or a channel without a Shorts list is a free `not_found` row.
- **Built for agents and automation.** Call it with no input and it returns data; paste links, @handles or channel IDs; schedule it or call it from the API.

### Use with AI agents

Call it from Claude, ChatGPT, Cursor or any MCP client as `glasswing/youtube-channel-scraper`:

- MCP server with this Actor preloaded: `https://mcp.apify.com/?tools=glasswing/youtube-channel-scraper`
- Agent-readable page: `https://apify.com/glasswing/youtube-channel-scraper.md`
- Minimal input: `{ "startUrls": ["@NASA"], "maxItems": 20 }` returns the channel's 20 latest videos with exact dates and views.

### What data can YouTube Channel Scraper extract?

| Field | Type | Description |
|---|---|---|
| `type` | string | `video`, `short` or `channel` (the stats row) |
| `title` | string | Video title (the channel name on stats rows) |
| `videoId` | string | YouTube video ID |
| `url` | string | Link to the video or Short (the channel link on stats rows) |
| `channelName` | string | Channel name |
| `channelId` | string | Channel ID (`UC...`) |
| `channelUrl` | string | Channel link by ID |
| `channelVerified` | boolean | Channel shows a verified badge |
| `subscriberCount` | integer | Channel subscribers as YouTube shows them (rounded, e.g. 27.9M) |
| `viewCount` | integer | Views (exact with video details) |
| `likeCount` | integer | Likes (with video details) |
| `commentCount` | integer | Comments as YouTube shows them (with video details) |
| `duration` | string | Length as shown, e.g. `13:38` |
| `durationSeconds` | integer | Length in seconds |
| `publishedAt` | string | Publish date `YYYY-MM-DD` (with video details) |
| `publishedTimeText` | string | Relative time as shown, e.g. `3 days ago` |
| `description` | string | Full description (with video details); e-mail addresses and phone numbers in it read `[email]` / `[phone]` |
| `hashtags` | array | Hashtags above the title and in the description |
| `thumbnailUrl` | string | Thumbnail image |
| `isShort` | boolean | The video is a Short |
| `isLive` | boolean | Live right now |
| `wasLive` | boolean | A past live stream |
| `isUpcoming` | boolean | A scheduled stream or premiere that has not started |
| `isMembersOnly` | boolean | YouTube marks the video Members only |
| `commentsTurnedOff` | boolean | The creator turned comments off (with video details) |
| `isAgeRestricted` | boolean | The logged-out watch page is age-gated (with video details) |
| `videoCount` | integer | Stats row: total public videos |
| `channelViewCount` | integer | Stats row: total channel views |
| `joinedDate` | string | Stats row: date the channel was created |
| `country` | string | Stats row: country, when the channel shows one |
| `source` | string | Always `channel` |
| `position` | integer | 1-based position in the channel's list |
| `inputUrl` | string | The link, @handle or ID you gave |
| `detailsError` | string | Only when the extra video-details request failed; the row keeps its list data |
| `status` | string | `ok`, `not_found` or `error` (see below) |
| `error` | string | Reason when `status` is not `ok` |
| `scrapedAt` | string | ISO 8601 time of extraction |

Optional fields are left out when YouTube does not show them.

#### Result status (tri-state output)

| `status` | Meaning | Billed? |
|---|---|---|
| `ok` | The video or channel was found and extracted. | Yes |
| `not_found` | YouTube answered, but the @handle or channel does not exist, the channel has no such list, or nothing was published in the date window. | No |
| `error` | YouTube could not be read after retries. `error` says why. | No |

### How to scrape a YouTube channel

1. Open the Actor in Apify Console and click **Try for free**.
2. Paste channel links, @handles or channel IDs into **Channels**, one per line.
3. Pick **Uploads to read** (Videos, Shorts, Live streams), **Max videos per channel** and **Maximum results (total)**.
4. Optional: set **Published on or after** / **Published on or before** for an exact date window, change the **Order**, or turn on **Add one channel stats row per channel**.
5. Click **Start** and open the **Output** tab, or **Export** the dataset as JSON, CSV, Excel, XML or HTML.

To automate it, use the **API** tab (Node.js, Python, curl examples) or add a **Schedule**.

| You give | You get |
|---|---|
| `https://www.youtube.com/@TED`, `@TED` or `UCAuUUnT6oDeKwE6v1NGQxug` | TED's uploads from the lists you picked |
| `https://www.youtube.com/@NASA/shorts` | That channel's Shorts only |
| `https://www.youtube.com/@NASA/streams` | That channel's past, current and scheduled live streams only |
| `https://www.youtube.com/@NASA/about` | One channel stats row |

### Input examples

The default input (what **Try for free** runs):

```json
{
    "startUrls": ["https://www.youtube.com/@TED"],
    "tabs": ["videos"],
    "maxVideosPerChannel": 10,
    "maxItems": 20
}
```

**All uploads of several channels** (videos, Shorts and streams, plus stats):

```json
{
    "startUrls": ["@veritasium", "@NASA", "UCAuUUnT6oDeKwE6v1NGQxug"],
    "tabs": ["videos", "shorts", "streams"],
    "maxVideosPerChannel": 10000,
    "maxItems": 50000,
    "includeChannelStats": true
}
```

**One exact month** of a channel's videos:

```json
{
    "startUrls": ["https://www.youtube.com/@veritasium"],
    "publishedAfter": "2025-03-01",
    "publishedBefore": "2025-03-31",
    "maxItems": 100
}
```

**Daily monitoring** (new uploads of the last 2 days, Latest order):

```json
{
    "startUrls": ["@TED", "@NASA"],
    "tabs": ["videos", "shorts"],
    "publishedAfter": "2 days",
    "maxItems": 200
}
```

**Channel stats only** (one row per channel, no videos):

```json
{
    "startUrls": ["@NASA", "@TED", "@veritasium"],
    "tabs": [],
    "includeChannelStats": true,
    "maxItems": 3
}
```

#### Input fields

| Field | Type | Default | Description |
|---|---|---|---|
| `startUrls` | array of strings | `["https://www.youtube.com/@TED"]` | Channel links, @handles or channel IDs |
| `tabs` | array of strings | `["videos"]` | `videos`, `shorts`, `streams`; empty with `includeChannelStats` = stats only |
| `maxVideosPerChannel` | integer | `50` | Cap per channel and per list (up to 10,000) |
| `maxItems` | integer | `20` | Cap for the whole run |
| `sortBy` | string | `newest` | `newest`, `popular` or `oldest`; with a date window the list is read `newest` first |
| `publishedAfter` | string | - | Only uploads on or after this day: `2026-01-31` or `30 days` |
| `publishedBefore` | string | - | Only uploads on or before this day: `2025-12-31` or `1 year` |
| `includeVideoDetails` | boolean | `true` | Open each video for exact views, likes, comments, date, description, hashtags |
| `includeChannelStats` | boolean | `false` | Add one stats row per channel |
| `proxyConfiguration` | object | Apify Proxy on (datacenter) | Always the datacenter group (a residential group or country is ignored); your own proxy URLs are used as given |

### Output

Real rows from a run on 2026-10-26 with the date window 2026-09-01 to 2026-09-30, Videos and Shorts, and channel stats on (descriptions shortened):

**Video** (`type: video`):

```json
{
    "url": "https://www.youtube.com/watch?v=ONAuUyml0yI",
    "status": "ok",
    "scrapedAt": "2026-10-26T10:50:35.624Z",
    "type": "video",
    "position": 3,
    "duration": "5:08",
    "durationSeconds": 308,
    "isShort": false,
    "wasLive": false,
    "source": "channel",
    "inputUrl": "https://www.youtube.com/@veritasium",
    "title": "We're trying something new...",
    "videoId": "ONAuUyml0yI",
    "channelName": "Veritasium",
    "channelId": "UCHnyfMqiRRG1u-2MsSQLbXA",
    "channelUrl": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA",
    "channelVerified": true,
    "subscriberCount": 21400000,
    "viewCount": 1413004,
    "likeCount": 21610,
    "commentCount": 2500,
    "publishedAt": "2026-09-30",
    "publishedTimeText": "3 weeks ago",
    "isLive": false,
    "isUpcoming": false,
    "isMembersOnly": false,
    "commentsTurnedOff": false,
    "isAgeRestricted": false,
    "description": "Veritasium's mission has always been to get to the truth - to understand how and why things work the way they do. We love the variety of top...",
    "thumbnailUrl": "https://i.ytimg.com/vi/ONAuUyml0yI/hqdefault.jpg"
}
```

**Short** (`type: short`, from the Shorts list):

```json
{
    "url": "https://www.youtube.com/shorts/VKlulHwMxgU",
    "status": "ok",
    "scrapedAt": "2026-10-26T10:50:38.292Z",
    "type": "short",
    "position": 5,
    "isShort": true,
    "source": "channel",
    "inputUrl": "https://www.youtube.com/@veritasium",
    "title": "What happens to these balloons when you open the valve?",
    "videoId": "VKlulHwMxgU",
    "channelName": "Veritasium",
    "channelId": "UCHnyfMqiRRG1u-2MsSQLbXA",
    "channelUrl": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA",
    "channelVerified": true,
    "subscriberCount": 21400000,
    "viewCount": 1553044,
    "likeCount": 50765,
    "commentCount": 1000,
    "publishedAt": "2026-09-24",
    "publishedTimeText": "1 month ago",
    "isLive": false,
    "isUpcoming": false,
    "wasLive": false,
    "isMembersOnly": false,
    "commentsTurnedOff": false,
    "isAgeRestricted": false,
    "description": "Take a balloon and fill it with lots of air. Take another one and fill it with less air. Now connect the two via a valve. \n\nWhat do you thin...",
    "thumbnailUrl": "https://i.ytimg.com/vi/VKlulHwMxgU/hqdefault.jpg"
}
```

**Channel stats row** (`type: channel`, with **Add one channel stats row per channel**):

```json
{
    "url": "https://www.youtube.com/channel/UCLA_DiR1FfKNvjuUpBHmylQ",
    "status": "ok",
    "scrapedAt": "2026-10-26T10:50:32.542Z",
    "type": "channel",
    "source": "channel",
    "inputUrl": "https://www.youtube.com/@NASA",
    "position": 1,
    "title": "NASA",
    "channelName": "NASA",
    "channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
    "channelUrl": "https://www.youtube.com/channel/UCLA_DiR1FfKNvjuUpBHmylQ",
    "channelVerified": true,
    "description": "NASA's mission is to pioneer the future in space exploration, scientific discovery, and aeronautics research.\r\n\r\nTo do that, we have worked...",
    "subscriberCount": 15100000,
    "videoCount": 6194,
    "channelViewCount": 1132208768,
    "joinedDate": "2008-06-03"
}
```

For `not_found` and `error` rows, `url` is the request that answered, with the channel you gave inside it.

### How much does it cost to scrape YouTube channels?

This Actor uses **pay-per-event** pricing, with Apify platform usage and proxies included:

| Event | Price |
|---|---|
| Actor start | $0.005 per run (at the default 512 MB memory; $0.0045 on Scale, $0.004 on Business) |
| Result (`status: ok` row: a video, Short, live stream or channel stats row) | $0.001 per result ($1.00 per 1,000) |

| Job | Results | Cost |
|---|---|---|
| Default run (try it) | 10 | $0.015 |
| A channel's 1,000 latest videos | 1,000 | $1.005 |
| 50 channels, all uploads, 400 videos each | 20,000 | $20.005 |
| Stats rows for 100 channels | 100 | $0.105 |
| Daily check of 10 channels for new uploads, 30 days | about 600 | about $0.75 |

The result price depends on your Apify plan: $1.15 per 1,000 on the Free plan, $1.00 on Starter, $0.85 on Scale and $0.70 on Business.

Rows with `status` `not_found` or `error` are never billed, and video details, date windows and filters cost nothing extra. Uploads outside your date window are not written and not billed. You can cap spending with **Maximum results** and the run's **Max total charge** option; the Actor stops cleanly when the limit is reached.

### Use the YouTube Channel Scraper API

**JavaScript / Node.js** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('glasswing/youtube-channel-scraper').call({
    startUrls: ['@veritasium'],
    publishedAfter: '2025-01-01',
    publishedBefore: '2025-12-31',
    maxItems: 500,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const video of items.filter((row) => row.status === 'ok')) console.log(video.publishedAt, video.viewCount, video.title);
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("glasswing/youtube-channel-scraper").call(run_input={
    "startUrls": ["@NASA"],
    "tabs": ["videos", "shorts"],
    "maxVideosPerChannel": 500,
    "maxItems": 1000,
})
for video in client.dataset(run["defaultDatasetId"]).iterate_items():
    if video["status"] == "ok":
        print(video.get("publishedAt"), video.get("viewCount"), video["url"])
```

**One HTTP call** (runs the Actor and returns the rows, for runs under 5 minutes):

```bash
curl -X POST "https://api.apify.com/v2/acts/glasswing~youtube-channel-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["@TED"], "maxItems": 20}'
```

**AI agents and MCP.** Add the Actor to Claude, Cursor or any MCP client through `https://mcp.apify.com?tools=glasswing/youtube-channel-scraper`. Every row says whether it is real data (`ok`), missing (`not_found`) or a failure (`error`).

### Tips

- Keep `maxItems` small while testing, then raise it: **Maximum results** caps the whole run, **Max videos per channel** each list.
- Put all your channels into one run instead of many single runs; you pay the start fee once.
- For new uploads keep **Latest** order and set **Published on or after**: each list stops at the first older upload.
- For a channel's most viewed videos use **Popular** order. For the most viewed videos of a month set the date window with a high **Max videos per channel** and sort the rows by `viewCount`: with a window the list is always read Latest first.
- Switch **Include video details** off for faster list-only runs (rounded views, relative upload time). A date window always reads the details.

### Limitations

- Video tags (keywords), category and captions are not included: YouTube only serves them to its video player, which refuses requests from cloud servers. For captions use the YouTube Transcript Scraper below.
- `subscriberCount` and `commentCount` are YouTube's rounded figures (e.g. 27.9M, 2K).
- Shorts rows usually have no `duration`: YouTube's Shorts lists do not carry it.
- Channel lists show only relative times ("1 year ago") and Shorts lists none at all. With a date window the list is read in date order (Latest first, or Oldest first with `sortBy: oldest`) and the uploads the list cannot place for sure are found by bisection: the Actor opens a middle upload to read its exact day, which places every upload on one side of it, and repeats on the rest; only the window's edges cost extra reads (a handful per list page). Uploads outside the window are skipped without a row and you are not charged for the extra reads. Scheduled streams and premieres have no publish day yet and are left out of date windows.
- **Popular order with a date window** is read Latest first: YouTube's Popular lists carry no dates and a month's uploads sit anywhere in them, so reading them in Popular order cost one read per upload (measured 2026-10-26: 1,000 reads for 2 rows). The rows carry `viewCount`; sort them by it. `sortBy: popular` without a window works as usual.
- If no upload of a channel falls in the window and the list cannot show that up front, the channel returns no rows (and a run where nothing matched ends without results).
- Live streams that are on air have no `viewCount`. Private videos are not available; members-only and age-restricted videos come back with their public data, flagged by `isMembersOnly` and `isAgeRestricted`.
- When YouTube changes its pages, rows come back as `error` and the Actor is updated quickly (report it in the **Issues** tab).

### FAQ

#### Do I need a YouTube API key or a Google account?

No. There is no API key, no OAuth, no Google Cloud project and no login.

#### Can it get all videos of a channel?

Yes. Set **Max videos per channel** up to 10,000 per list and **Maximum results** to the total you want. Pick Videos, Shorts and Live streams to get every upload.

#### How exact is the date window?

Exact to the day, both ends included. `publishedAt` comes from each video's own page, not from the rounded "3 weeks ago" of the channel list.

#### Which channel stats do I get?

Subscribers, total videos, total views, join date, country (when the channel shows one) and the channel description. Not included: creator e-mail addresses, @handles, avatars, banners or social links.

#### Why is a row `not_found`?

The @handle or channel does not exist, the channel has no Shorts or Live list, or nothing on the channel was published in your date window. `not_found` rows are free.

#### Do I need proxies?

No setup needed. Apify's datacenter proxy is on by default and included in the price.

#### Is it legal to scrape YouTube?

Scraping publicly available data is generally legal, but you are responsible for how you use the output. Read the legal notice below and YouTube's terms of service, and do not collect personal data without a legitimate reason.

### Related Actors

If this Actor saved you time, a rating or a save helps others find it. Found a problem? Open an Issue, we reply within 24 h.

- [YouTube Scraper](https://apify.com/glasswing/youtube-scraper) - use it for keyword search, playlists and single video lookups next to your channel exports.
- [YouTube Transcript Scraper](https://apify.com/glasswing/youtube-transcript-scraper) - use it to pull the captions of the videos you export here; it accepts the `videoId` column.
- [YouTube Comments Scraper](https://apify.com/glasswing/youtube-comments-scraper) - use it to read what viewers say under a channel's videos, with likes and reply threads.
- [YouTube Shorts Scraper](https://apify.com/glasswing/youtube-shorts-scraper) - use it to find Shorts by hashtag or keyword across all channels.
- [Google Trends Scraper](https://apify.com/glasswing/google-trends-scraper) - use it to see whether the topics a channel covers are rising.
- [Keyword Suggestions API](https://apify.com/glasswing/keyword-suggestions-scraper) - use it to find the searches behind a channel's best videos.
- [Telegram Channel Scraper](https://apify.com/glasswing/telegram-channel-scraper) - use it to monitor public Telegram channels next to the YouTube channels you track.
- [Substack Scraper](https://apify.com/glasswing/substack-scraper) - use it to follow creators who publish both newsletters and videos.

### Legal and data-protection notice

This Actor extracts only data that YouTube publishes publicly to logged-out visitors. It does not extract private user data such as e-mail addresses, phone numbers, gender or precise location: e-mail addresses and phone numbers in titles and descriptions are replaced with `[email]` / `[phone]`, and channel @handles, avatars and creator links are not written. It does not collect comments or viewer data, does not log in and does not get around access controls. Your results could still contain personal data, for example a person's name in a channel or video title. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers. You are responsible for complying with YouTube's terms of service and applicable law when using the extracted data.

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by YouTube, Google or their owners. All trademarks belong to their respective owners.

# Changelog

This Actor's version history is a separate document: https://apify.com/glasswing/youtube-channel-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

One channel per line: a channel link (youtube.com/@handle, /channel/UC..., /c/name, /user/name), a bare @handle or a channel ID (UC...). A link that ends in /videos, /shorts or /streams reads only that tab; /about returns only the channel stats row. Video, playlist and search links are not channels and are reported as free error rows.

## `tabs` (type: `array`):

Which upload lists of each channel to read: regular videos, Shorts and/or live streams (past, current and scheduled). Each list gets its own 'Max videos per channel'. Leave only 'Videos' for the classic channel video list.

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

Cap for each channel and each upload list chosen above (up to 10,000). Set it high to get all uploads of a channel; 'Maximum results (total)' still caps the whole run.

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

Stop after this many rows have been saved in total, over all channels. Each saved row with status `ok` is one billable result; rows with status `not_found` or `error` are free. Keep it small for test runs; raise it (for example to 10000) to export whole channels.

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

Order of each upload list, the same chips YouTube shows on the channel page.

## `publishedAfter` (type: `string`):

Only uploads published on this day or later: a date (2026-01-31) or relative (30 days, 2 weeks, 6 months). The cut is exact to the day: rows the channel list cannot place for sure are opened to read their upload date. Leave empty for no lower limit. With 'Latest' order the list stops at the first older upload.

## `publishedBefore` (type: `string`):

Only uploads published on this day or earlier (inclusive): a date (2025-12-31) or relative (1 year). Leave empty for no upper limit. Together with 'Published on or after' this gives an exact from-to window, for example one month of a channel's uploads.

## `includeVideoDetails` (type: `boolean`):

Open every upload to add the exact view count, like count, comment count, exact publish date, full description and hashtags. One extra request per video; the price per result stays the same. Switch it off for faster list-only runs (rounded views, relative upload time). A date window always reads the details.

## `includeChannelStats` (type: `boolean`):

Also save one row per channel with its public facts: subscribers, total videos, total views, join date, country (when the channel shows it) and description. The stats row is one result. Uncheck every list under 'Uploads to read' to get only the stats rows.

## `proxyConfiguration` (type: `object`):

Apify Proxy (datacenter, the default group) is on by default: YouTube starts refusing one server's requests after a few hundred video pages in a row, and spreading them over datacenter IPs keeps large runs clean. The Actor always uses the datacenter group; a residential group or country set here is ignored. Your own proxy URLs are used as given.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/@TED"
  ],
  "tabs": [
    "videos"
  ],
  "maxVideosPerChannel": 10,
  "maxItems": 20,
  "sortBy": "newest",
  "includeVideoDetails": true,
  "includeChannelStats": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        "https://www.youtube.com/@TED"
    ],
    "tabs": [
        "videos"
    ],
    "maxVideosPerChannel": 10,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("glasswing/youtube-channel-scraper").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 = {
    "startUrls": ["https://www.youtube.com/@TED"],
    "tabs": ["videos"],
    "maxVideosPerChannel": 10,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("glasswing/youtube-channel-scraper").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 '{
  "startUrls": [
    "https://www.youtube.com/@TED"
  ],
  "tabs": [
    "videos"
  ],
  "maxVideosPerChannel": 10,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call glasswing/youtube-channel-scraper --silent --output-dataset

```

## MCP server setup

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

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/ValV3pgEfZjqHaF2N/builds/DfVC1hiX25c372t0V/openapi.json
