# YouTube Scraper · Transcripts & Comments · $0.35/1k (`alfalfa/youtube-scraper`) Actor

YouTube videos from searches, channels, playlists or URLs, with views, likes, descriptions and tags; optional transcripts, comments and channel details. No API key or login. Video/comment rows $0.35/1k on Business or $0.50/1k on Free. Optional extras priced separately; no start fee.

- **URL**: https://apify.com/alfalfa/youtube-scraper.md
- **Developed by:** [Alfalfa](https://apify.com/alfalfa) (community)
- **Categories:** Videos, Social media, AI
- **Stats:** 27 total users, 18 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 rows

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

## YouTube Scraper: videos, transcripts and comments without an API key

Get YouTube data as a table: the videos of a **search**, a **channel**, a **playlist** or a list of **video URLs**, each with title, views, likes, publish date, duration, description, tags and channel. Add **subscriber and comment counts**, a **transcript** (timed segments, plain text, SRT or WebVTT), or **comments** when you need them. No YouTube account or Data API key. Export to Excel, CSV or JSON, or read it through the API.

**$0.50 per 1,000 rows** (videos or comments), transcripts $0.30 per 1,000 videos, no start fee, platform usage and proxies included.

### What you get

One row per video:

| Field | Example |
|---|---|
| `id`, `url`, `title` | `_uQrJ0TkZlc`, `https://www.youtube.com/watch?v=_uQrJ0TkZlc`, `Python Full Course for Beginners` |
| `channelName`, `channelId`, `channelUrl` | `Programming with Mosh`, `UCWv7vMbMWH4-V0ZXdmDpPBA`, … |
| `subscriberCount` (optional) | `5160000` when counts or comments are requested, or from a channel source; otherwise often `null` |
| `publishedAt`, `publishedText` | `2019-02-18T07:00:08-08:00`, `7 years ago` |
| `category`, `isUnlisted` | `Education`; `isUnlisted` appears when YouTube marks a video unlisted |
| `durationText`, `durationSeconds` | `6:14:07`, `22447` |
| `viewCount`, `likeCount` | `49062038`, `1270677` |
| `commentCount` (optional) | `63000` with counts or comments on; otherwise usually `null` |
| `description`, `keywords` | full description, video tags |
| `thumbnailUrl`, `isShort`, `isLive`, `isLiveContent`, `ageRestricted` | `isLive` = live right now, `isLiveContent` = a stream, current or past |
| `transcript`, `transcriptText`, `transcriptLanguage` | 4,530 timed segments, the whole text, `en English` |
| `transcriptSrt` or `transcriptVtt` | the same subtitles as an SRT or WebVTT file, with **Transcript format** set to SRT or WebVTT |
| `searchQuery`, `inputUrl` | where the video came from |

With **Max comments per video** above 0, comments come as extra rows with `type` = `comment`: `id`, `text`, `author`, `authorChannelId`, `authorUrl`, `authorAvatar`, `publishedText`, `likeCount`, `replyCount`, `isVerified`, `isCreator`, plus `videoId`, `videoUrl` and `videoTitle` of the video they belong to. Top comments or newest first. **Max replies per comment** adds the replies as rows too, right after their comment, with `parentId` and `replyLevel` = 1.

With **Include channel records** on, every channel gets one row with `type` = `channel`: `id`, `handle`, `name`, `description`, `country`, `joinedAt`, `viewCount` (all-time), `videoCount`, `subscriberCount`, `links` (Twitter, Instagram, website … as `{title, url}`), `avatar`, `channelKeywords`. Channel URLs get their own channel; searches and playlists get every channel that appears, once per run.

Likes, exact publish date and time, category, full description and tags need **Include video details** (on by default, one small request per video). In an ordinary keyword search, `subscriberCount` and `commentCount` are usually `null`. Turn on **Include subscriber and comment counts** for both (one larger request per video, no surcharge); collecting comments also fills them. Channel sources carry the subscriber count anyway. With details off you get the listing fields only (title, channel, views, relative date, duration), about twice as fast.

### Sources

- **Search queries**: one per line. Filter by upload date (last hour to this year) and order by relevance, upload date, views or rating.
- **Channel URLs**: `youtube.com/@handle`, `/channel/UC…`, `/c/name`, `/user/name`. Add `/videos`, `/shorts` or `/streams` to pick the tab, or set **Channel content**. Newest first as on the channel page, or set **Channel video order** to **Popular** (most viewed first) or **Oldest**.
- **Playlist URLs**: `youtube.com/playlist?list=…`. A channel's uploads playlist (`UU` + channel ID) works too.
- **Video URLs**: `youtube.com/watch?v=…`, `youtu.be/…`, `/shorts/…`, `/live/…`.
- **Search result URLs** copied from the browser.

**Max videos per source** caps each search, channel or playlist. A search page holds about 20 videos; channels and playlists page 30 at a time and can go into the thousands.

### Use cases

- **Research and monitoring**: every new video on a topic this week, with views and likes, into a sheet; a competitor's channel, every Monday.
- **Transcripts for AI**: full subtitles of a channel or a search as plain text for summaries, RAG, translation or content repurposing. One run, one JSON. As SRT or WebVTT they drop straight into a video editor, a player or a subtitle workflow.
- **Channel audits**: a channel's all-time hits (most viewed first) or its earliest uploads, with views, dates and lengths, for competitor research and content strategy.
- **Comment analysis**: the top or newest comments of a launch video, an ad or a podcast episode, with likes and authors, for sentiment and feedback mining.
- **Lead generation and outreach**: channels talking about your niche, their size, and the authors of the most liked comments.
- **Content planning**: the most viewed videos for a keyword in the last month, their length, tags and titles.

### Examples

Fifty most viewed Python tutorials of this month with transcripts:

```json
{ "searchQueries": ["python tutorial"], "sortBy": "views", "uploadDate": "month", "maxVideos": 50, "transcript": true }
```

Latest 200 videos of a channel, listing fields only (fast):

```json
{ "startUrls": [{ "url": "https://www.youtube.com/@mkbhd/videos" }], "maxVideos": 200, "scrapeDetails": false }
```

The 20 most viewed videos of a channel with SRT subtitles:

```json
{ "startUrls": [{ "url": "https://www.youtube.com/@veritasium" }], "channelSort": "popular", "maxVideos": 20, "transcript": true, "transcriptFormat": "srt" }
```

The newest 500 comments of one video, with up to 5 replies each:

```json
{ "startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }], "maxComments": 500, "maxReplies": 5, "commentsSort": "newest" }
```

Channel record plus the latest 50 videos of three channels:

```json
{ "startUrls": [{ "url": "https://www.youtube.com/@mkbhd" }, { "url": "https://www.youtube.com/@NASA" }, { "url": "https://www.youtube.com/@veritasium" }], "maxVideos": 50, "channelDetails": true }
```

Verified output row from the 19 September 2026 preview run (shortened; **Include subscriber and comment counts** and **Include transcript** enabled):

```json
{
  "type": "video",
  "id": "_uQrJ0TkZlc",
  "url": "https://www.youtube.com/watch?v=_uQrJ0TkZlc",
  "title": "Python Full Course for Beginners",
  "channelName": "Programming with Mosh",
  "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
  "subscriberCount": 5160000,
  "publishedAt": "2019-02-18T07:00:08-08:00",
  "category": "Education",
  "durationSeconds": 22447,
  "viewCount": 49062038,
  "likeCount": 1270677,
  "commentCount": 63000,
  "transcriptLanguage": "en English"
}
```

This row also contained 4,530 timed `transcript` segments and 263,320 characters of `transcriptText`; they are omitted above for readability. Counts are a snapshot and can change.

#### Separate video, comment and channel exports

The default dataset always contains the same `type: video`, `type: comment` and optional `type: channel` rows in their original order. Turn on **Separate datasets by row type** to also copy those rows into the run's Videos, Comments and Channels datasets. In the run's **Storage** tab, choose a dataset from the dropdown and export JSON, CSV or Excel. The switch is off by default. Copies do not trigger another row charge, but they use additional dataset storage and download transfer; large transcripts can make the video copy substantial.

### Use it from code, n8n, Make, Zapier or an AI agent

- **API**: `POST https://api.apify.com/v2/acts/alfalfa~youtube-scraper/run-sync-get-dataset-items?token=…` with the JSON input above returns the rows directly (runs up to 5 minutes). Longer jobs: start the run, poll, read the dataset. Any Apify client library works.
- **n8n, Make, Zapier**: add the Apify node, pick `alfalfa/youtube-scraper`, paste the same JSON input and read the run's dataset in the next step. See the [Apify integrations docs](https://docs.apify.com/platform/integrations).
- **AI agents and MCP (Claude, Cursor, VS Code, ChatGPT)**: connect the Apify MCP server with this Actor as a tool, `https://mcp.apify.com/?tools=alfalfa/youtube-scraper`, and the agent can pull videos, transcripts and comments by describing what it wants. See [Apify MCP docs](https://docs.apify.com/platform/integrations/mcp).

### Pricing

| Event | Price |
|---|---|
| Video row | $0.50 per 1,000 ($0.45 / $0.40 / $0.35 on Starter / Scale / Business plans) |
| Comment or reply row | same as a video row |
| Transcript | $0.30 per 1,000 videos with a transcript, nothing for videos without captions |
| Channel record | $0.50 per 1,000 channels on top of the row, i.e. $1 per 1,000 channels in total on the free plan |
| Start fee, platform usage, proxies | none, included |

Examples at Free tier: 1,000 videos without extras cost **$0.50**; 1,000 videos that all have captions with transcripts cost **$0.80**; 1 video plus 100 comment rows costs **$0.0505**; 1,000 videos plus 10 distinct channel records cost **$0.51**. A channel record counts as one row **and** has the channel surcharge. The transcript charge applies only when a transcript is saved.

**Final Actor event price.** The per-row price includes the Actor's platform usage and proxy costs; there is no Actor start fee or per-run minimum. Apify's own plan or storage charges, if any, are separate. The optional separate datasets do not add row events.

A run's **Maximum total charge** is honoured: the Actor stops before the budget, so the bill never exceeds it.

### Search to transcript: a checked example

On 19 September 2026, a private preview run searched `python tutorial` with `maxVideos: 1`, counts, transcript, one comment and a channel record enabled. Its video row for [`_uQrJ0TkZlc`](https://www.youtube.com/watch?v=_uQrJ0TkZlc) had a title, views and likes, `subscriberCount: 5160000`, `commentCount: 63000`, **4,530 timed transcript segments** and 263,320 characters of `transcriptText`. The run saved one video, one comment and one channel row. With separate datasets enabled, the three copies exactly matched the default rows. At the current Free-tier event prices, that public-run output would cost **$0.0023**: three rows, one transcript and one channel add-on. Counts change on YouTube; this is a snapshot, not a promise for every query.

### Limits and honesty

- Public videos only. Private, deleted and members-only videos are reported as unavailable, not charged. Age-restricted videos return the listing fields and the details with `ageRestricted: true`; their comments and transcripts are not readable without a login.
- YouTube shows rounded counts in some places (`21.2M subscribers`, `2.4M comments`); the rounded value is what you get. Views and likes are exact.
- Transcripts exist only where the uploader or YouTube's auto-captioning provided them. Live streams have none while live.
- Search returns what YouTube's search shows a visitor in the US with English settings: about 20 videos per page and rarely more than 500-600 results per query. Split by upload date for more.
- Comment replies come with **Max replies per comment**; they count towards the per-video comment limit.

### FAQ

**Do I need a YouTube API key?** No. The Data API's free quota is 10,000 units a day (a few hundred searches); this Actor has no quota and no key.

**Does it work for Shorts?** Yes: Shorts URLs, a channel's Shorts tab, and Shorts in search results. `isShort` marks them.

**Can I get subtitles in another language?** Set **Transcript language** to a language code. Manual captions in that language are preferred, then auto-generated ones in it, then a manual track in any language, then the first track available. `transcriptLanguage` records what was used.

**Can I download the transcript as an SRT or VTT file?** Set **Transcript format** to SRT or WebVTT: every video row then carries the whole subtitle file in `transcriptSrt` or `transcriptVtt` (numbered cues, `00:00:18,640 --> 00:00:21,880`), next to the timed segments and the plain text. Save the field as `<video id>.srt` or `.vtt` and it plays in VLC, YouTube Studio, Premiere or any player. Auto-generated captions overlap in time on YouTube; in the file each cue ends where the next one starts.

**Can I get a channel's most viewed videos?** Set **Channel video order** to **Popular** (or **Oldest** for the first uploads) on a channel URL; it works for the Videos, Shorts and Live tabs. Searches use **Search order** instead.

**Is this legal?** The Actor reads public pages the way a visitor without an account does and stores nothing but the results in your dataset. Respect YouTube's terms and copyright when you reuse the content, and personal data laws for comment authors.

**How fast is it?** About 100 videos with details in 20-30 seconds; listing only, several hundred a minute. Comments add one request per 20 comments, a transcript two requests per video.

### Examples you can run in one click

Each example opens with its input already filled in and a sample of the results, so you can change any field and run it right away.

- [All videos of a YouTube channel](https://apify.com/alfalfa/youtube-scraper/examples/youtube-channel-videos-scraper)
- [Comments of a channel's latest videos](https://apify.com/alfalfa/youtube-scraper/examples/youtube-channel-comments)
- [YouTube channel record and latest videos](https://apify.com/alfalfa/youtube-scraper/examples/youtube-channel-scraper)
- [YouTube comments of a video](https://apify.com/alfalfa/youtube-scraper/examples/youtube-comments-scraper)
- [YouTube Shorts of a channel](https://apify.com/alfalfa/youtube-scraper/examples/youtube-shorts-scraper)

Need something the examples do not cover? Every field is on the Input tab, and any example input works unchanged in an API call or an n8n, Make or Zapier workflow.

### Was this useful?

If this Actor saved you time, a short review on its Store page helps others find it and tells me what to improve next. Missing a field or stuck on an input? Open an Issue on the Actor page; issues are answered within a day.

### Related Actors by the same author

| Actor | What it does | Price |
|---|---|---|
| [YouTube Transcript Scraper](https://apify.com/alfalfa/youtube-transcript-scraper) | transcripts only: the subtitles of videos, channels, playlists or searches as timed segments, plain text, SRT or WebVTT | $0.09 per 1,000 transcripts |
| [Google Maps Scraper](https://apify.com/alfalfa/google-maps-scraper) | places from any search and location with address, phone, website, rating and hours, plus reviews and website emails | $0.07 per 1,000 places |
| [Amazon Product Scraper](https://apify.com/alfalfa/amazon-product-scraper) | products from searches, Best Sellers lists and ASINs in 22 Amazon stores with price, rating, BSR and details | $0.28 per 1,000 products |
| [LinkedIn Jobs Scraper](https://apify.com/alfalfa/linkedin-jobs-scraper) | public LinkedIn job postings by keyword, location, date, company or URL, with full description, salary, applicants, seniority and poster | $0.30 per 1,000 jobs |
| [LinkedIn Company Scraper](https://apify.com/alfalfa/linkedin-company-scraper) | LinkedIn company pages from URLs, names, websites or a filtered keyword search with size, employee count, followers, offices and recent posts | $1 per 1,000 companies |
| [Facebook Ads Library Scraper](https://apify.com/alfalfa/facebook-ads-library-scraper) | ads from the Meta Ad Library by keyword, advertiser page or URL, with creatives, dates, platforms and EU reach | $0.45 per 1,000 ads |
| [Google Ads Transparency Scraper](https://apify.com/alfalfa/google-ads-transparency-scraper) | every Google ad of an advertiser or website domain with format, dates, regions, previews and YouTube video ids | $0.30 per 1,000 ads |
| [Facebook Posts Scraper](https://apify.com/alfalfa/facebook-posts-scraper) | posts of any public page or profile with reactions, comment counts, media, optional video transcripts | $2 per 1,000 posts |
| [Facebook Comments Scraper](https://apify.com/alfalfa/facebook-comments-scraper) | comments and replies of any public post | $0.30 per 1,000 comments |
| [Facebook Pages Scraper](https://apify.com/alfalfa/facebook-pages-scraper) | page details with email, phone, address, followers, rating, About text | from $2.50 per 1,000 pages |
| [Facebook Events Scraper](https://apify.com/alfalfa/facebook-events-scraper) | events by search, page or URL with dates, venue, tickets and organizer email | $3 per 1,000 events |

Not affiliated with, endorsed by or connected to YouTube, Google LLC or Apify.

# Changelog

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

# Actor input Schema

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

What to search for on YouTube, one query per line: <code>data engineering tutorial</code>, <code>iphone review</code>. Each query is one source of up to <b>Max videos</b> results.

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

Video URLs (<code>youtube.com/watch?v=...</code>, <code>youtu.be/...</code>, <code>/shorts/...</code>), channel URLs (<code>youtube.com/@handle</code>, <code>/channel/UC...</code>, with <code>/videos</code>, <code>/shorts</code> or <code>/streams</code>), playlist URLs (<code>playlist?list=...</code>) or search result URLs. Each URL is one source on top of the search queries. A watch URL with a <code>list=</code> parameter counts as the video, not the playlist.

## `maxVideos` (type: `integer`):

Maximum videos per search query, channel or playlist. A search returns about 20 videos per page; channels and playlists can go into the thousands.

## `scrapeDetails` (type: `boolean`):

Open every video for likes, exact publish date and time, category, full description and tags. One small extra request per video, no surcharge. Off = listing fields only (title, views, date text, duration), about twice as fast. Automatically on when transcripts, comments or counts are requested.

## `engagementCounts` (type: `boolean`):

Add the channel's subscriber count and the video's comment count. One larger extra request per video, no surcharge; also filled automatically when comments are collected.

## `transcript` (type: `boolean`):

Download the video's subtitles as timed segments and plain text (manual captions preferred, auto-generated as fallback). One extra request per video. Charged separately per video with a transcript, see the pricing.

## `transcriptLanguage` (type: `string`):

Preferred language code of the transcript, e.g. <code>en</code>, <code>de</code>, <code>es</code>. When the video has no captions in that language, a manual track in another language is used, then the first available one; the language used is recorded in <code>transcriptLanguage</code>.

## `transcriptFormat` (type: `string`):

Timed segments (<code>transcript</code>) and plain text (<code>transcriptText</code>) always come with a transcript. Pick SRT or WebVTT to add the subtitles as one more field, <code>transcriptSrt</code> or <code>transcriptVtt</code>: numbered cues timed <code>HH:MM:SS,mmm</code> (SRT) or <code>HH:MM:SS.mmm</code> (WebVTT), ready to save as a subtitle file.

## `maxComments` (type: `integer`):

Comments to collect per video, saved as separate rows with <code>type</code> = <code>comment</code> and the video ID. 0 = no comments. Twenty comments per request.

## `maxReplies` (type: `integer`):

Replies to collect under each comment, as rows with <code>parentId</code> and <code>replyLevel</code> 1. 0 = no replies. Replies count towards <b>Max comments per video</b>. Ten replies per request.

## `commentsSort` (type: `string`):

YouTube's Top comments or newest first.

## `channelDetails` (type: `boolean`):

One extra row with <code>type</code> = <code>channel</code> per channel: description, country, joined date, total views, video and subscriber counts, handle, external links. For channel URLs the channel itself; for video URLs, searches and playlists every channel that appears (once per run). Charged separately per channel, see the pricing.

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

Order of search results (search queries and search URLs only).

## `uploadDate` (type: `string`):

Only search results uploaded within this window (search queries only).

## `channelTab` (type: `string`):

Which tab of a channel URL to read when the URL itself does not say (<code>/videos</code>, <code>/shorts</code>, <code>/streams</code>).

## `channelSort` (type: `string`):

Order of a channel's videos, Shorts or streams: newest first as on the channel page, most viewed first, or oldest first. Channel URLs only; searches follow <b>Search order</b> and playlists keep their own order.

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

Sources processed in parallel (default 5). Pages of one source are always read in order.

## `separateDatasets` (type: `boolean`):

Also copy video, comment and channel rows to their own exportable datasets. The default dataset and per-row billing stay the same. Off by default; copies use additional dataset storage and download transfer.

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

Residential proxies are included in the price. Leave the default unless you want your own proxy servers.

## Actor input object example

```json
{
  "searchQueries": [
    "data engineering tutorial"
  ],
  "maxVideos": 20,
  "scrapeDetails": true,
  "engagementCounts": false,
  "transcript": false,
  "transcriptLanguage": "en",
  "transcriptFormat": "segments",
  "maxComments": 0,
  "maxReplies": 0,
  "commentsSort": "top",
  "channelDetails": false,
  "sortBy": "relevance",
  "uploadDate": "any",
  "channelTab": "videos",
  "channelSort": "latest",
  "maxConcurrency": 5,
  "separateDatasets": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `items` (type: `string`):

All scraped rows as JSON. Append ?format=csv for CSV.

# 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 = {
    "searchQueries": [
        "data engineering tutorial"
    ],
    "maxVideos": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alfalfa/youtube-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 = {
    "searchQueries": ["data engineering tutorial"],
    "maxVideos": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("alfalfa/youtube-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 '{
  "searchQueries": [
    "data engineering tutorial"
  ],
  "maxVideos": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call alfalfa/youtube-scraper --silent --output-dataset

```

## MCP server setup

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