# YouTube Channel ID Extractor (`googleapi/youtube-channel-id-scraper`) Actor

Resolve source-backed public YouTube channel identities and About fields, including displayed counters, public links, and image variants.

- **URL**: https://apify.com/googleapi/youtube-channel-id-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 ID Extractor resolves a public channel identity from a YouTube handle, channel ID, channel URL, or public video reference. It returns source-backed channel details such as the display name, About information, audience counters, public links, and channel images.

Use the stable `channelId` to match the same channel across datasets. The Actor does not search by display name or access private account information.

### Input

Provide one or more handles, channel IDs, video IDs, or public YouTube channel/video URLs. `maxItems` limits the number of resolved channel records. You can choose whether to include channel image URLs and external About links.

```json
{"channelUrls":["@YouTube","UC_x5XG1OV2P6uZZ5FSM9Ttw"],"maxItems":10}
```

```json
{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","includeMedia":false}
```

To attach recent entries from a matched channel's public feed, set `includeRecentVideos` to `true`; use `maxRecentVideos` and `maxFeedRequests` to limit this optional data.

`startUrls` is also accepted for public channel or video URLs. `deduplicate` keeps the first reference to each channel by default. Set `includeMedia` and `includeLinks` to control image URLs and external About links, and use `locale` to choose the language preference for public pages.

### Dataset output

A row includes `channelId`, `channelName`, `handle`, `channelUrl`, and any public description, country, join date, verification badges, subscriber/video/view counts, avatar and banner images, RSS feed URL, and public About links available for the channel.

Compact counters such as `1.25M subscribers` include the original text and an estimate flag. A normalized join date is only included when the public page provides an unambiguous date.

```json
{
  "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "channelName": "Example Creator",
  "handle": "@ExampleCreator",
  "channelUrl": "https://www.youtube.com/@ExampleCreator",
  "subscriberCount": 1250000,
  "subscriberCountText": "1.25M subscribers",
  "subscriberCountIsEstimated": true,
  "videoCount": 384,
  "videoCountText": "384 videos",
  "isVerified": true,
  "publicLinks": [
    {"label":"Website","linkUrl":"https://example.com/","domain":"example.com","linkType":"website"}
  ]
}
```

Only public values exposed by YouTube are included. Missing identity details do not produce substitute channel rows. Dataset results can be downloaded as JSON, CSV, Excel, or another format supported by Apify.

### Coverage and responsible use

Public pages can omit profile details or make a reference unavailable, and compact counters are approximate. Video references are used to identify their public owner channel when YouTube exposes that relationship. External About links are listed but not opened.

This independent Actor is not affiliated with YouTube or Google. Follow YouTube's terms and applicable laws when using public channel information.

# Changelog

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

# Actor input Schema

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

Accepts @handles, UC channel IDs, 11-character video IDs, or full HTTPS YouTube channel/video URLs.

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

Object-form alias for public YouTube channel or video URLs.

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

Compatibility alias for an array of full HTTPS YouTube URLs.

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

Compatibility alias for full HTTPS YouTube channel or video URLs.

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

Compatibility alias for one @handle, UC ID, video ID, or full public YouTube URL.

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

Compatibility alias for one public YouTube channel URL or handle.

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

Maximum normal identity rows across the ordered references. Default: 50.

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

Fixed at one identity page; video references may also fetch the public owner channel page.

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

Skip repeated channel IDs or canonical URLs while preserving the first source reference.

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

Include public avatar and banner URLs with available thumbnail sizes.

## `includeLinks` (type: `boolean`):

Include public external links presented by the channel; YouTube internal links are excluded.

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

Delay between ordered public requests.

## `maxConcurrency` (type: `integer`):

Identity resolution is intentionally ordered; only 1 is accepted.

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

Finite retries for transient public fetch failures.

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

Timeout for each public page request.

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

Compatibility alias for requestTimeoutSecs.

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

Maximum public HTML bytes retained for extraction.

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

Optional ordinary browser user agent. No stealth or fingerprint spoofing is used.

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

Accept-Language value for public requests.

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

Routes public HTTPS requests through configured Apify or custom HTTP(S) proxies. Residential proxies are recommended. No authentication cookies or browser session are transferred.

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

Identity resolution supports the first and only profile page.

## `includeRecentVideos` (type: `boolean`):

Opt-in: fetch one public YouTube Atom feed per source-verified channel. Adds nested recentVideos with full text, exact dates, media and source metrics; no external destination is fetched.

## `maxRecentVideos` (type: `integer`):

Maximum source feed entries included on each channel record. The public feed normally exposes at most 15 entries and has no pagination.

## `maxFeedRequests` (type: `integer`):

Run-wide budget for opt-in feed enrichment; one request per enriched channel.

## Actor input object example

```json
{
  "maxItems": 50,
  "maxPages": 1,
  "deduplicate": true,
  "includeMedia": true,
  "includeLinks": true,
  "requestDelayMs": 0,
  "maxConcurrency": 1,
  "maxRequestRetries": 1,
  "requestTimeoutSecs": 30,
  "maxResponseBytes": 2000000,
  "locale": "en-US",
  "page": 1,
  "includeRecentVideos": false,
  "maxRecentVideos": 5,
  "maxFeedRequests": 10
}
```

# 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-id-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-id-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-id-scraper --silent --output-dataset

```

## MCP server setup

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