# YouTube Channel Videos Scraper (`googleapi/youtube-channel-videos-scraper`) Actor

Extract public YouTube channel video listings with channel metadata and opt-in bounded watch details through public pages or the official YouTube Data API.

- **URL**: https://apify.com/googleapi/youtube-channel-videos-scraper.md
- **Developed by:** [Google API](https://apify.com/googleapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 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.

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 this Actor does

YouTube Channel Videos Scraper collects public video listings from YouTube channels. It can also include the Shorts tab and add details from a limited number of public video pages. Results combine each video with the channel information visible on the public page.

The channel listing uses YouTube's visible page controls and scrolling. `page` and `maxPages` refer to batches reached on the page, not stable numeric offsets, so results are not guaranteed to include a channel's complete video history.

### Input

Provide channel handles or public channel URLs. `maxVideosPerChannel` limits rows per channel. Use `sortBy` to choose `newest`, `popular`, or `oldest`; set `includeShorts` to `true` to add Shorts. `deduplicate` removes repeated video IDs.

```json
{"channelHandles":["GoogleDevelopers"],"maxVideosPerChannel":25,"sortBy":"newest"}
```

```json
{"channelUrls":["https://www.youtube.com/@GoogleDevelopers"],"includeShorts":true,"maxVideosPerChannel":40,"sortBy":"popular"}
```

Set `maxVideoDetails` above 0 to add information from up to 10 public video pages per run, including full descriptions, tags, exact counts, category, caption-track languages, and other available details.

An optional official YouTube Data API route is available for video details. To use it, enable `useYouTubeDataApi`, set `maxVideoDetails` above 0, and configure `youtubeApiKey` as a secret in Apify. Do not put an API key in the input JSON. API results depend on the key's permissions and available quota.

Use `startUrls` as an alternative to `channelUrls` for public channel URLs. `includeMedia` controls video thumbnails and channel images; `locale` sets the public page language preference. `maxVideosPerChannel` is the per-channel limit, while `maxItems` is also accepted as an alias.

### Dataset output

Each row requires `videoId`, `videoUrl`, `title`, and `isShort`. Listing data can also include `viewCount`, `viewCountText`, `publishedText`, duration, thumbnail images, channel identity, audience totals, channel links, and the source tab.

With video details enabled, available fields may include `videoDescription`, `videoDescriptionHtml`, `videoTags`, category, exact view and like counts, publication date, caption tracks, translation languages, and family-safety or availability details. Fields provided by the official API may include category and language codes, license, live broadcast status, and comment count.

```json
{
  "videoId": "YDCB8Bk1OBE",
  "videoUrl": "https://www.youtube.com/watch?v=YDCB8Bk1OBE",
  "title": "Example public video",
  "viewCountText": "15K views",
  "publishedText": "13 hours ago",
  "duration": "2:27",
  "isShort": false,
  "channelName": "Google for Developers",
  "handle": "@GoogleDevelopers",
  "sourceTab": "videos"
}
```

Displayed counts and relative publication labels are preserved; rounded values are not presented as exact counts, and relative labels are not converted into invented timestamps. Dataset results can be downloaded in JSON, CSV, Excel, or another format supported by Apify.

### Cost, coverage, and responsible use

Check the Actor's Pricing tab for current Actor and Apify platform charges. Video detail requests add to the run, and the official API route uses the quota of the configured API key.

Results reflect public channel listings at run time and are bounded by the selected batch and row limits. The Actor does not access private channel data or bypass access controls. Follow YouTube's terms, applicable laws, and the Data API terms when using the results.

# Changelog

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

# Actor input Schema

## `channelUrl` (type: `string`):

Public HTTPS YouTube channel URL or @handle.

## `channelUrls` (type: `array`):

Ordered public HTTPS YouTube channel URLs or @handles.

## `channelHandles` (type: `array`):

Public channel handles with or without @.

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

Object-form alias for public YouTube channel URLs.

## `sourceUrls` (type: `array`):

Compatibility alias for a list of public YouTube channel URLs.

## `urls` (type: `array`):

Compatibility alias for a list of public YouTube channel URLs.

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

Compatibility alias for one public YouTube channel URL or handle.

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

Compatibility alias for maxVideosPerChannel. Default: 50.

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

Maximum public video and optional Short rows per input channel. Default: 50.

## `page` (type: `integer`):

1-based public UI batch to begin emitting from. Earlier batches are reached by ordinary scrolling; YouTube exposes no stable numbered-page or offset control.

## `maxPages` (type: `integer`):

Maximum total UI-loaded batches to traverse per Videos or Shorts tab, including batches skipped before page. Each later batch is counted only when visible scrolling reveals new video IDs.

## `deduplicate` (type: `boolean`):

Skip repeated video IDs across channel sources.

## `includeMedia` (type: `boolean`):

Include video thumbnails and channel avatar/banner variants when present in the source.

## `includeShorts` (type: `boolean`):

Read the public Shorts tab in addition to the Videos tab. The per-channel result limit is split deterministically.

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

Public ordering requested from the visible Videos and Shorts tab controls on YouTube.

## `maxVideoDetails` (type: `integer`):

Fetch this many public watch pages for full descriptions, tags, exact counts, category, caption tracks, and availability. Set to 0 to disable; maximum 10 per run.

## `requestDelayMs` (type: `integer`):

Delay between ordered public channel/video requests.

## `maxRequestRetries` (type: `integer`):

Maximum retries for the initial channel-page crawler request. Later Shorts and watch-page navigations are not separately retried.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each public channel or video page request.

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

Optional Apify Proxy configuration. When supplied, the browser crawler routes channel, scroll, and optional video-detail page requests through the configured proxy.

## `requestTimeoutMs` (type: `integer`):

Compatibility alias for requestTimeoutSecs.

## `maxResponseBytes` (type: `integer`):

Maximum public HTML retained per request.

## `userAgent` (type: `string`):

Optional ordinary browser user agent; stealth and fingerprint spoofing are not used.

## `locale` (type: `string`):

Accept-Language value for public requests.

## `useYouTubeDataApi` (type: `boolean`):

Select the official API for opt-in video details. Requires a positive maxVideoDetails budget and the secret youtubeApiKey. Public channel listings still use the browser.

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

Configure an already authorized YouTube Data API v3 key securely in Apify. Never include it in source files or example input. Ignored unless useYouTubeDataApi is enabled. API requests go directly to Google; proxyConfiguration applies to browser requests.

## Actor input object example

```json
{
  "maxVideosPerChannel": 50,
  "page": 1,
  "maxPages": 3,
  "deduplicate": true,
  "includeMedia": true,
  "includeShorts": false,
  "sortBy": "newest",
  "maxVideoDetails": 0,
  "requestDelayMs": 250,
  "maxRequestRetries": 1,
  "requestTimeoutSecs": 30,
  "maxResponseBytes": 2000000,
  "locale": "en-US",
  "useYouTubeDataApi": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("googleapi/youtube-channel-videos-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("googleapi/youtube-channel-videos-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 '{}' |
apify call googleapi/youtube-channel-videos-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,googleapi/youtube-channel-videos-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/zBmDn17qdJQHXZl6k/builds/XscmPuSlScqP9gfHB/openapi.json
