# YouTube Channel Email Scraper - Creator Emails & Socials (`topapi/youtube-channel-email-scraper`) Actor

Scrape public emails of YouTube creators from handles, channel links, ids or keywords: email + source, validation, phones, Instagram/TikTok/X/website links, subscribers, views, country. Reads the description, latest videos, pinned comment and creator sites. $0.90 per 1,000 channels with an email.

- **URL**: https://apify.com/topapi/youtube-channel-email-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 channel with emails

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

### What does YouTube Channel Email Scraper do?

**YouTube Channel Email Scraper** turns YouTube channels into contact rows: the public emails a creator publishes, where each one was found, phones, every external link sorted by platform (website, Instagram, TikTok, X, Facebook, LinkedIn, Discord and more) and the channel's stats. Give it channel handles, links, channel ids or video links, or type a niche keyword and it finds the creators for you. Built for influencer outreach, sponsorship prospecting and creator lead lists.

- 📧 **Emails from five places**: the channel description, the latest video descriptions, the pinned comment, the creator's own website (contact, business and about pages) and their link-in-bio page.
- 🔎 **Keyword discovery**: YouTube's own channel search for any topic, in 53 countries and 32 languages, with subscriber, country, joined-date and activity filters.
- ✅ **Every email checked**: mail server lookup, disposable and no-reply detection, the line it was written on and the exact page or video it came from.
- 💸 **You pay only for channels with an email**: $0.90 per 1,000, no start fee, no per-search fee. Channels without one are free (or $0.45 per 1,000 if you ask for them).
- 🔐 **No login, no cookies, no API key.**
- 🔁 **Monitor mode** for scheduled runs: only channels you have not received before.
- 🔌 **API, schedules, webhooks, Make, Zapier, n8n and MCP** through Apify.

### What data can you get from YouTube channels?

| | | |
|---|---|---|
| 📧 Best email `email` | 🧭 Where it was found `emailSource` | ✅ Validation `emailValidation` |
| 📋 All emails with source page, line and type `emails` | 🔒 Sign-in-gated email button present `hasHiddenEmail` | 📞 Phones `phones` |
| 🏷️ Channel name, `@handle`, id, link | 👥 Subscribers `subscriberCount` | 👀 Total views `viewCount` |
| 🎬 Videos `videoCount` | 🌍 Country `country` | 📅 Joined `joinedDate` |
| ✔️ Verified badge `isVerified` | 📝 Full description `description` | 🏷️ Keywords `keywords` |
| 🌐 Website `websiteUrl`, `websites` | 📸 Instagram, TikTok, X, Facebook, LinkedIn | 💬 Discord, Telegram, Twitch, Threads, Snapchat |
| 🎵 Spotify, Pinterest, GitHub, WhatsApp, Patreon, Skool | 🔗 Link-in-bio page `primaryAggregatorUrl` | 🧾 Every About link, typed `allLinks` |
| ⏱️ Newest upload, uploads in 30 days | 📈 Average and median recent views | 🔍 Keyword and search rank |

### How to scrape YouTube channel emails with YouTube Channel Email Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up) (free monthly credit included).
2. Open **YouTube Channel Email Scraper** and click **Try for free**.
3. Paste channels into **YouTube channels**, or type topics into **Find channels by keyword**.
4. Set filters if you search (subscriber range, country, joined date).
5. Click **Start**. Most channels take one to three seconds.
6. Download the contacts as CSV, Excel or JSON, or read them through the API.

### ⬇️ Input

| Parameter | Type | Description |
|---|---|---|
| **🔍 What to scrape** | | |
| `urls` | array | Handles (`@mkbhd`), channel links (`/@name`, `/channel/UC…`, `/c/…`, `/user/…`), channel ids, or video / Shorts / youtu.be links (their channel is read). |
| `searchQueries` | array | Topics to find creators for, e.g. `"sourdough baking"`. Uses YouTube's channel search. |
| `maxResultsPerQuery` | integer | Rows to deliver per keyword. Default 20. |
| `startUrls` | array | A link to a CSV or text file of channels, one per line or cell. |
| **🎯 Filters** (keyword results; listed channels too with `filtersApplyToUrls`) | | |
| `country`, `language` | string | The YouTube country and language the search runs in. Default United States, English. |
| `includeVideoResultChannels` | boolean | Also take the channels behind matching videos. Default off. |
| `minSubscribers`, `maxSubscribers` | integer | Subscriber range, e.g. 5,000 to 500,000. |
| `channelCountry` | array | Keep only channels whose About panel shows these countries (`"United States"`, `"DE"`). |
| `joinedDateFrom`, `joinedDateTo` | string | Channel creation window: `2020-01-31` or `"2 years"`. |
| `activeWithinDays` | integer | Newest upload at most this many days old. |
| `minAverageViews`, `minVideos` | integer | Average views of the latest ~30 uploads; number of videos. |
| `excludeKeywords` | array | Skip channels whose name, handle or description contains these words. |
| `filtersApplyToUrls` | boolean | Apply the filters to the channels you listed as well. Default off. |
| **✂️ Where to look for emails** | | |
| `scanVideoDescriptions` | integer | Newest video descriptions to read when the channel description has no email. Default 3. |
| `scanPinnedComment` | boolean | Read the newest video's pinned comment. Default on. |
| `scanLinkedWebsites` | boolean | Open the creator's own websites and link-in-bio page. Default on. |
| `maxWebsitePages`, `maxWebsitesPerChannel` | integer | Pages per site (default 3) and sites per channel (default 2). |
| `scanEvenIfEmailFound` | boolean | Check every place even when the description already has an email. Default off. |
| `validateEmails` | boolean | Mail-server, disposable and no-reply checks. Default on, free. |
| **➕ Extra data** | | |
| `includeChannelsWithoutEmail` | boolean | Also return channels with no public email ($0.45 per 1,000). Default off. |
| `includeRecentActivity` | boolean | Newest upload age and date, uploads in 30 days, average and median recent views. Free. |
| **🔁 Monitoring** | | |
| `monitorMode` | boolean | Only channels not checked by an earlier run with the same memory. |
| `monitorStoreName` | string | Name of the memory. Default `youtube-channel-email-monitor`. |
| `monitorRecheckEmails` | boolean | Re-read known channels and deliver those whose emails changed. |
| **📦 Output** | | |
| `maxResults` | integer | Most rows in the whole run. 0 = no limit. |
| `maxChannelsCheckedPerQuery` | integer | Stop a keyword after checking this many channels. Default 10 x the rows asked, at least 200. |
| **⚙️ Advanced** | | |
| `proxyConfiguration` | object | Optional. YouTube is read directly; Apify datacenter, then residential proxies are used by themselves if YouTube refuses a route. |
| `maxConcurrency` | integer | Channels processed at once. Default 12. |

Nothing is required: an empty input runs a two-channel sample.

#### Input JSON

```json
{
  "urls": ["@NetworkChuck", "https://www.youtube.com/@mkbhd", "https://youtu.be/dQw4w9WgXcQ"],
  "searchQueries": ["sourdough baking", "budget travel"],
  "maxResultsPerQuery": 20,
  "minSubscribers": 5000,
  "maxSubscribers": 500000,
  "country": "US",
  "language": "en"
}
```

#### Set a subscriber range for keyword searches

YouTube's channel search lists about 200-300 channels per keyword, many of them tiny. A minimum of a few thousand subscribers removes most channels that publish no contact at all, and it is applied before anything else is fetched. Measured on five keywords: 750 of 1,047 listed channels were under 5,000 subscribers.

#### Ask for rows, not channels

`maxResultsPerQuery` counts delivered rows. Most channels publish no email (28% of the channels checked in the run below did), so the actor checks several channels per row and stops a keyword at `maxChannelsCheckedPerQuery`. When a keyword runs out, the status line says how many channels YouTube listed and how many were checked; `includeVideoResultChannels` finds more.

#### Listed channels are always read

Filters apply to keyword results. Channels you paste are read whatever their size or country, unless you switch on `filtersApplyToUrls`.

### ⬆️ Output

One row per channel. A real row from a run on 2026-10-28 (description shortened):

```json
{
  "channelName": "Marques Brownlee",
  "channelHandle": "@mkbhd",
  "channelId": "UCBJycsmduvYEL83R_U4JriQ",
  "email": "business@mkbhd.com",
  "emailSource": "channel-about",
  "emailValidation": "valid",
  "emails": [{ "email": "business@mkbhd.com", "source": "channel-about", "sourceUrl": "https://www.youtube.com/@mkbhd",
               "context": "business@MKBHD.com", "type": "role", "validation": "valid", "mxFound": true, "mailProvider": "Google Workspace" }],
  "hasHiddenEmail": true,
  "subscriberCount": 21400000,
  "viewCount": 5834393156,
  "videoCount": 1862,
  "country": "United States",
  "joinedDate": "2008-03-21",
  "isVerified": true,
  "instagramUrl": "http://instagram.com/MKBHD",
  "xUrl": "http://twitter.com/MKBHD",
  "discordUrl": "http://discord.gg/MKBHD",
  "lastUploadText": "6 days ago",
  "uploadsLast30Days": 7,
  "recentAverageViews": 7273333,
  "sourceType": "channel",
  "status": "Email found"
}
```

#### Fields and how often they are filled

Measured on 80 channel rows delivered by a five-keyword search (5,000+ subscribers) on 2026-10-28:

| Field | Filled | Notes |
|---|---:|---|
| `channelName`, `channelHandle`, `channelId`, `channelUrl`, `joinedDate`, `videoCount`, `isVerified`, `thumbnailUrl` | 100% | |
| `email`, `emailSource`, `emailValidation`, `emails` | 100% | every row has an email by default; 93 emails on 80 rows, 92 `valid`, 1 `invalid` |
| `emailSource` = `channel-about` / `video-descriptions` / `website` / `link-page` | 35% / 31% / 33% / 1% | where the best email came from |
| `youtubeEmail` | 35% | email written in the channel description itself |
| `viewCount`, `description` | 99% | |
| `subscriberCount`, `bannerUrl` | 95% | subscriber counts are hidden on some channels |
| `country` | 83% | only when the creator sets one |
| `keywords` | 73% | |
| `websiteUrl` | 68% | |
| `instagramUrl` / `facebookUrl` / `tiktokUrl` / `xUrl` | 50% / 31% / 19% / 8% | |
| `primaryAggregatorUrl` | 11% | Linktree, Beacons, Stan, carrd… |
| `phones` | 5% | from the description and website contact pages |
| `hasHiddenEmail` | 100% | true on most large channels; that address is not read |
| `lastUploadDate`, `uploadsLast30Days`, `recentAverageViews` | with `includeRecentActivity` | |

Views in the dataset: **Contacts**, **Social links**, **Channel stats**. The run summary (`RUN_SUMMARY` in the key-value store) counts channels checked without an email, filtered, not found or unreadable, per keyword, and where the emails came from.

### Use cases

- 🤝 **Influencer outreach**: creators in a niche and subscriber band, with an address to pitch.
- 💼 **Sponsorship sales**: channel size, activity and recent views next to the business inbox.
- 🧲 **Agency lead lists**: keyword sweeps across countries and languages, exported to a CRM.
- 🔁 **Always-on prospecting**: a weekly schedule in monitor mode delivers only new creators.
- 🧹 **List enrichment**: paste the channels you already have and get emails, socials and stats back.

### How much does it cost to scrape YouTube channel emails?

**$0.90 per 1,000 channels with an email** (`channel-with-email`), no start fee, no per-search fee. Channels without an email are free and not returned, unless you switch on `includeChannelsWithoutEmail` ($0.45 per 1,000 rows). Website scanning, video and pinned-comment scanning, email validation and recent activity are included.

Measured on Apify on 2026-10-28:

| Run | Channels checked | Rows | Time | Price |
|---|---:|---:|---:|---:|
| Prefilled run (2 channels + `sourdough baking`, 5 rows) | 23 | 7 | 6 s | $0.0063 |
| One channel by link | 1 | 1 | 1 s | $0.0009 |
| 60 listed channels | 60 | 57 | 24 s | $0.051 |
| Five keywords, 20 rows each, 5,000+ subscribers | 286 | 80 | 173 s | $0.072 |
| Ten keywords, 30 rows each, 1,000+ subscribers, video results too | 955 | 300 | 13 min | $0.27 |
| Monitor run, nothing new since the last one | 5 | 0 | 4 s | $0 |

A run stops cleanly at the maximum charge you set: a $0.003 cap delivered and charged 4 rows (2 with an email, 2 without).

### Integrations, API, scheduling & MCP

- ⏰ **Schedules**: run the same keywords weekly with `monitorMode` on; each run delivers only new creators.
- 🔔 **Webhooks**: get a call when a run finishes and fetch the dataset.
- 🔌 **Make, Zapier, n8n, Google Sheets, HubSpot, Slack**: through Apify's integrations.
- 🧑‍💻 **API**: start runs and read rows with the [Python](https://docs.apify.com/api/client/python) or [JavaScript](https://docs.apify.com/api/client/js) client, or plain HTTP.
- 🤖 **MCP**: AI agents call it through the Apify MCP server.

Look up one channel from your own code:

```bash
curl -X POST "https://api.apify.com/v2/acts/TopApi~youtube-channel-email-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls":["@mkbhd"]}'
```

### More scrapers from TopApi

- 📸 [Instagram Email Scraper](https://apify.com/TopApi/instagram-contact-scraper) - emails, phones, WhatsApp and websites from Instagram profiles.
- 🎵 [TikTok User Search Scraper](https://apify.com/TopApi/tiktok-user-search-scraper) - find TikTok creators by keyword with bio links and emails.
- 🩳 [YouTube Shorts Scraper](https://apify.com/TopApi/youtube-shorts-scraper) - Shorts with views, likes, channels and transcripts.
- 🎮 [Twitch Scraper](https://apify.com/TopApi/twitch-scraper) - channels, live streams, VODs and clips.
- 🐦 [Twitter Profile Scraper](https://apify.com/TopApi/x-profile-scraper) - X followers, bio and verified badge.

### Limits & empty runs

- **Only public emails**: what the creator wrote in the description, videos or pinned comment, or published on their own site. YouTube's "View email address" button needs a signed-in Google account; `hasHiddenEmail` tells you the channel has one, and that address is not read.
- **Most channels publish no email**: 28% of the channels checked in the five-keyword run did (5,000+ subscribers). Smaller channels publish less.
- **YouTube's channel search lists about 200-300 channels per keyword**; more keywords or `includeVideoResultChannels` find more.
- **Subscriber counts are rounded by YouTube** (21.4M) and hidden on some channels; views and video counts are exact.
- **Websites behind a bot check** are skipped and noted in `websitesScanned`; links that carry an affiliate or discount code, shops and shorteners are not opened, and a site that does not name the channel is not used for emails.
- **A run that returns nothing** says why in its status: no email on the checked channels, filters removed everything, or nothing new since the last monitor run. Nothing is charged.
- **A run YouTube refuses completely** ends FAILED with the reason and charges nothing. The actor moves to Apify datacenter and residential proxies by itself first.

### ❓ FAQ

#### How much does YouTube Channel Email Scraper cost?

$0.90 per 1,000 channels with an email, no start fee and no charge for searching. Channels without an email are free unless you ask for them ($0.45 per 1,000).

#### Where does YouTube Channel Email Scraper find the emails?

In the channel description first, then the newest video descriptions, the newest video's pinned comment, the creator's own websites and their link-in-bio page. Each email says where it was found (`source`, `sourceUrl`) and the line it was written on (`context`).

#### Can YouTube Channel Email Scraper get the hidden "View email address" email?

No. That button needs a signed-in Google account. The `hasHiddenEmail` field tells you a channel has one, so you can reach it another way.

#### How does YouTube Channel Email Scraper find channels by keyword?

It runs YouTube's channel search for each keyword in the country and language you choose, applies your subscriber range before fetching anything, and checks channels until it has the rows you asked for.

#### Are the emails from YouTube Channel Email Scraper validated?

Yes, for free: each domain's mail server is looked up, and disposable and no-reply addresses are flagged (`valid`, `risky`, `invalid`, `disposable`). No email is sent and no mailbox is probed.

#### Can YouTube Channel Email Scraper run on a schedule?

Yes. Turn on `monitorMode` and schedule the run; each run delivers only channels earlier runs have not checked, and a run with nothing new costs nothing in charges.

#### Do I need a YouTube account or API key for YouTube Channel Email Scraper?

No. No login, no cookies and no YouTube API key.

#### Can I use YouTube Channel Email Scraper through the Apify API or MCP?

Yes. Start runs and fetch rows with the Python or JavaScript client or plain HTTP, connect it to Make, Zapier, n8n or Google Sheets, or call it from AI agents through the Apify MCP server.

#### Why did my YouTube Channel Email Scraper run return no rows?

The status says which: none of the checked channels publishes an email, the filters removed every channel, or nothing is new since the last monitor run. None of these is charged.

#### Your feedback

Found a bug or need a field? Open an issue on the actor's Issues tab.

# Actor input Schema

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

One per line: @handle (@mkbhd), channel link (https://www.youtube.com/@veritasium, /channel/UC…, /c/…, /user/…), channel id (UCBJycsmduvYEL83R_U4JriQ) or a video / Shorts link (its channel is read).

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

Topics to find creators for, e.g. "sourdough baking", "budget travel". Runs YouTube's channel search; searching is free, you pay only for delivered channels.

## `maxResultsPerQuery` (type: `integer`):

Rows to deliver per keyword (channels with an email, plus channels without one if you turn that on). YouTube lists about 200-300 channels per keyword.

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

Optional: a link to a CSV or text file of channels (one handle, link or id per line or cell), or more channel links.

## `country` (type: `string`):

The YouTube country the keyword search runs in. YouTube shows different creators for the same words in different countries.

## `language` (type: `string`):

The language of the keyword search. Pair it with the country: Germany + Arabic finds the Arabic-speaking creators YouTube shows in Germany.

## `includeVideoResultChannels` (type: `boolean`):

Besides YouTube's channel results, add the channels behind the videos the keyword finds. Finds more active creators when the channel list runs short.

## `minSubscribers` (type: `integer`):

Skip channels below this size, e.g. 5000. Checked before anything is fetched when YouTube's search shows the count. 0 = no minimum.

## `maxSubscribers` (type: `integer`):

Skip channels above this size, e.g. 500000 for micro-influencers. 0 = no maximum.

## `channelCountry` (type: `array`):

Keep only channels whose About panel names one of these countries, e.g. "United States", "DE". Channels that show no country are skipped when this is set.

## `joinedDateFrom` (type: `string`):

Only channels created on or after this date: 2020-01-31, or relative like "2 years".

## `joinedDateTo` (type: `string`):

Only channels created on or before this date: 2024-12-31, or relative like "6 months".

## `activeWithinDays` (type: `integer`):

Only channels whose newest upload is at most this many days old, e.g. 30. Reads the channel's latest uploads (free).

## `minAverageViews` (type: `integer`):

Only channels whose latest ~30 uploads average at least this many views.

## `minVideos` (type: `integer`):

Only channels with at least this many public videos.

## `excludeKeywords` (type: `array`):

Skip channels whose name, handle or description contains any of these words, e.g. "news", "official".

## `filtersApplyToUrls` (type: `boolean`):

Off: the channels you list are always read. On: they must pass the filters above as well.

## `scanVideoDescriptions` (type: `integer`):

How many of the newest video descriptions to read for an email. 0 = off.

## `scanPinnedComment` (type: `boolean`):

Read the pinned comment of the newest video.

## `scanLinkedWebsites` (type: `boolean`):

Open the creator's own websites from the About panel (home page, then contact / business / about pages) and their link-in-bio page. Sponsor and affiliate links are skipped.

## `maxWebsitePages` (type: `integer`):

Most pages read on each website, home page included.

## `maxWebsitesPerChannel` (type: `integer`):

Most of the channel's own websites to open.

## `scanEvenIfEmailFound` (type: `boolean`):

Read the videos, pinned comment and websites even when the description already has an email, so the emails list is complete. Slower.

## `validateEmails` (type: `boolean`):

Check each email's domain for a working mail server and flag disposable and no-reply addresses: valid, risky, invalid, disposable. Included in the price.

## `includeChannelsWithoutEmail` (type: `boolean`):

Off: you get, and pay for, only channels with an email. On: channels without one are returned too ($0.45 per 1,000) with stats, links, socials and the hidden-email flag.

## `includeRecentActivity` (type: `boolean`):

Add the newest upload's age and date, uploads in the last 30 days, and the average and median views of the latest ~30 uploads. Free.

## `monitorMode` (type: `boolean`):

Skip channels an earlier run with the same memory name already checked. A repeat run over the same keywords costs nothing until new creators appear.

## `monitorStoreName` (type: `string`):

Name of the key-value store that remembers checked channels. Use one name per list you build.

## `monitorRecheckEmails` (type: `boolean`):

In monitor mode, also re-read channels seen before and deliver them again when their emails changed (or a channel without one now publishes one).

## `maxResults` (type: `integer`):

Most rows the whole run delivers, across all channels and keywords. 0 = no limit.

## `maxChannelsCheckedPerQuery` (type: `integer`):

Stop a keyword after checking this many channels even if it has not reached its row count (most channels publish no email). Default: 10 x the rows asked, at least 200.

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

Optional. The actor reads YouTube directly and moves to Apify datacenter, then residential proxies by itself if YouTube refuses a route.

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

Channels processed at once.

## Actor input object example

```json
{
  "urls": [
    "@NetworkChuck",
    "@mkbhd"
  ],
  "searchQueries": [
    "sourdough baking"
  ],
  "maxResultsPerQuery": 5,
  "country": "US",
  "language": "en",
  "includeVideoResultChannels": false,
  "filtersApplyToUrls": false,
  "scanVideoDescriptions": 3,
  "scanPinnedComment": true,
  "scanLinkedWebsites": true,
  "maxWebsitePages": 3,
  "maxWebsitesPerChannel": 2,
  "scanEvenIfEmailFound": false,
  "validateEmails": true,
  "includeChannelsWithoutEmail": false,
  "includeRecentActivity": false,
  "monitorMode": false,
  "monitorStoreName": "youtube-channel-email-monitor",
  "monitorRecheckEmails": false,
  "maxResults": 50,
  "maxConcurrency": 12
}
```

# Actor output Schema

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

One item per channel: public emails with source and validation, phones, links by platform, subscribers, views, videos, country, joined date.

## `summary` (type: `string`):

Channels checked without an email, filtered, not found or unreadable; per-keyword counts; where emails were found; websites read. Not written for a small run that delivered every channel it was given.

# 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 = {
    "urls": [
        "@NetworkChuck",
        "@mkbhd"
    ],
    "searchQueries": [
        "sourdough baking"
    ],
    "maxResultsPerQuery": 5,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/youtube-channel-email-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 = {
    "urls": [
        "@NetworkChuck",
        "@mkbhd",
    ],
    "searchQueries": ["sourdough baking"],
    "maxResultsPerQuery": 5,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/youtube-channel-email-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 '{
  "urls": [
    "@NetworkChuck",
    "@mkbhd"
  ],
  "searchQueries": [
    "sourdough baking"
  ],
  "maxResultsPerQuery": 5,
  "maxResults": 50
}' |
apify call topapi/youtube-channel-email-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/youtube-channel-email-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/89ECApDKB8Xb1Rrtj/builds/en9yKGgQcc4B0z4tj/openapi.json
