# YouTube Channels (`datasaurus/youtube-channels`) Actor

A powerful tool for extracting detailed information about YouTube channels. Fast and Reliable.

- **URL**: https://apify.com/datasaurus/youtube-channels.md
- **Developed by:** [datasaurus](https://apify.com/datasaurus) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 88 total users, 34 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 channels

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

## YouTube Channels Scraper

A powerful tool for extracting detailed channel information from YouTube.

Check out our other YouTube scrapers: [YouTube Comments](https://apify.com/datasaurus/youtube-comments) | [YouTube Videos](https://apify.com/datasaurus/youtube-videos)

n8n node: [n8n](https://www.npmjs.com/package/n8n-nodes-youtube-channels-rental)

Supply channel handles, URLs or IDs, or search YouTube for channels by keyword, and receive structured JSON data.

### Why use this YouTube channel scraper?

- **Look up or discover channels:** supply handles, URLs or IDs, and combine them with keyword searches in the same run. Keyword search also works independently, without any channel inputs.
- **Useful profile data in one row:** collect channel identity, description, statistics, country, language, keywords, topics, status and thumbnails.
- **Keep discovery provenance:** search results include the query and rank, so you can trace why a channel appeared.
- **Avoid duplicate records:** channels found through more than one input are returned once per `channelId`; search results are ordered by rank within each query.
- **Find links in the description:** `descriptionLinks` extracts URLs present in the channel description. YouTube's Data API does not provide a separate structured list of the social links shown on every channel page.
- **Join the scraper suite:** `channelId` lets you connect channel records with matching videos and comments from our [Videos](https://apify.com/datasaurus/youtube-videos) and [Comments](https://apify.com/datasaurus/youtube-comments) Actors.

This Actor focuses on channel metadata and discovery. Use the Videos Actor to expand a channel into uploads and available transcripts, or the Comments Actor to collect comments from its uploads.

### 🎯 Features

**Multiple Input Formats Supported:**

- Channel handle: `"@SailingLaVagabonde"`
- Channel URL: `https://www.youtube.com/@SailingLaVagabonde`
- Channel ID URL: `"youtube.com/channel/UCZdQjaSoLjIzFnWsDQOv4ww"`
- Channel ID: `"UCZdQjaSoLjIzFnWsDQOv4ww"`
- Search keywords: `"sailing documentary"`; use `|` for alternatives in one query, such as `sailing|boating` (commas are not a multi-query separator).

**Comprehensive Channel Data:**

- Base Information
  - Title and description
  - URLs found in the channel description
  - Custom URL
  - Publication date
  - Country and language

- Channel Statistics
  - View count
  - Subscriber count
  - Video count
  - Hidden subscriber status

- Branding Details
  - Keywords
  - Default language
  - Country settings
  - Thumbnail URLs

- Channel Status
  - Privacy settings
  - Link status
  - Upload capabilities
  - Made for kids status

### Use cases

- **Channel research** — compare channel descriptions, topics and statistics.
- **Creator discovery** — collect information about a supplied list of creators.
- **Channel monitoring** — compare subscriber, view and video counts across runs.
- **Content research** — examine channel topics, keywords and branding.

### 🚀 Getting started

1. Create or sign in to your Apify account.
2. Enter channel handles, channel URLs or channel IDs.
3. Run the Actor and collect your data.

### 💳 Pricing

In pay-per-event mode, the Actor charges for saved channel records and channel searches:

| Event | Price | When it is charged |
| --- | ---: | --- |
| `channel` | $0.0005 per channel | For each channel record saved to the default dataset. |
| `keyword_search` | $0.02 | Once per distinct `searchQueries` item per run, regardless of how many search result pages are fetched. |

### 📥 Input format

```json
{
  "channels": [
    "@SailingLaVagabonde",
    "https://www.youtube.com/channel/UCZdQjaSoLjIzFnWsDQOv4ww"
  ],
  "searchQueries": ["sailing documentary", "sailing|boating"],
  "maxChannelsPerQuery": 50,
  "searchOrder": "relevance"
}
```

Use `channels`, `searchQueries`, or both; `searchQueries` works independently as a separate channel discovery search and does not require channel handles, IDs, or URLs. Add each search query as a separate array item. To search for either of multiple alternatives in one query, use YouTube's `|` operator (for example, `"sailing|boating"`); commas are not interpreted as separate queries. Keyword search results include `sourceQuery` and `searchRank`, and records are returned in rank order for each query. Each distinct `searchQueries` item incurs one `$0.02` `keyword_search` event per run, regardless of pagination.

### 📤 Output format

Channel data is returned as structured JSON. Example:

```json
{
  "channelId": "UCZdQjaSoLjIzFnWsDQOv4ww",
  "title": "Sailing La Vagabonde",
  "description": "We're a sailing channel documenting our journey...",
  "descriptionLinks": [],
  "sourceUrl": "https://www.youtube.com/channel/UCZdQjaSoLjIzFnWsDQOv4ww",
  "sourceQuery": null,
  "searchRank": null,
  "scrapedAt": "2025-01-23T10:00:00+00:00",
  "customUrl": "@SailingLaVagabonde",
  "publishedAt": "2014-08-19T02:27:29Z",
  "viewCount": 298051885,
  "subscriberCount": 1520000,
  "videoCount": 358,
  "keywords": "sailing,travel,adventure,family,ocean",
  "defaultLanguage": "en",
  "country": "AU",
  "relatedPlaylists": {
    "uploads": "UULZdQjaSoLjIzFnWsDQOv4ww"
  },
  "privacyStatus": "public",
  "isLinked": true,
  "longUploadsStatus": "eligible",
  "madeForKids": false,
  "topicCategories": [
    "https://en.wikipedia.org/wiki/Travel",
    "https://en.wikipedia.org/wiki/Sailing"
  ],
  "thumbnails": {
    "default": "https://yt3.ggpht.com/...",
    "medium": "https://yt3.ggpht.com/...",
    "high": "https://yt3.ggpht.com/..."
  }
}
```

Statistics are sample values, and description and thumbnail URLs are abbreviated. Actual results contain the values available when the Actor runs.

### AI agents and integrations

Connect chat clients such as **Claude and ChatGPT** to Apify through the [Apify MCP server](https://docs.apify.com/integrations/mcp) to discover and run eligible Actors.

Structured records let agents work directly with channel IDs, descriptions and statistics.

Example requests for an agent configured to use this Actor:

> Collect channel information and subscriber counts for these YouTube handles.

> Return descriptions, video counts and topic categories for these channel IDs.

n8n node: [n8n-nodes-youtube-channels-rental](https://www.npmjs.com/package/n8n-nodes-youtube-channels-rental)

### ✏️ API access

Access through Apify's API and automation features:

- REST API
- SDK integration
- Webhooks
- Automated workflows

For setup and reference documentation, see the [Apify API documentation](https://docs.apify.com/api/v2). For workflow automation, see the [n8n integration guide](https://docs.apify.com/integrations/n8n).

[Browse all Datasaurus scrapers](https://apify.com/datasaurus).

# Actor input Schema

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

Enter a channel handle (@username), channel ID, channel URL

## `searchQueries` (type: `array`):

Search YouTube for matching channels. Add one query per list item; separate alternatives in a single query with | (for example, sailing|boating), not commas. This search runs independently of Channels, so you can use it alone or together with channel handles, IDs, or URLs. In pay-per-event mode, each distinct query incurs one $0.02 keyword_search event per run, regardless of how many result pages are fetched. Each result page still consumes YouTube search quota. The event rate must be configured in Apify pricing.

## `maxChannelsPerQuery` (type: `integer`):

Maximum channel search results to collect per query.

## `searchOrder` (type: `string`):

How YouTube ranks matching channel search results.

## Actor input object example

```json
{
  "channels": [
    "@YouTube",
    "UC_x5XG1OV2P6uZZ5FSM9Ttw",
    "https://www.youtube.com/c/YouTube"
  ],
  "searchQueries": [],
  "maxChannelsPerQuery": 50,
  "searchOrder": "relevance"
}
```

# 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 = {
    "channels": [
        "@YouTube",
        "UC_x5XG1OV2P6uZZ5FSM9Ttw",
        "https://www.youtube.com/c/YouTube"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datasaurus/youtube-channels").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": [
        "@YouTube",
        "UC_x5XG1OV2P6uZZ5FSM9Ttw",
        "https://www.youtube.com/c/YouTube",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("datasaurus/youtube-channels").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": [
    "@YouTube",
    "UC_x5XG1OV2P6uZZ5FSM9Ttw",
    "https://www.youtube.com/c/YouTube"
  ]
}' |
apify call datasaurus/youtube-channels --silent --output-dataset

```

## MCP server setup

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

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/LBuhwjFPsdRwsCOx2/builds/dQR4wUO7mPAbsIjx4/openapi.json
