# YouTube Scraper $0.08/1K Videos: Search, Channels, Shorts (`zaiq/youtube-scraper`) Actor

Search public videos, Shorts, channels and playlists. Get channel profiles, video details, comments and optional captions with timed segments. Filter searches and list channel uploads newest first. Pay only for delivered data. No login or API key. $0.08 per 1,000 videos.

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

## Pricing

from $0.07 / 1,000 videos

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: Search, Channels, Videos, Shorts & Comments

Get public YouTube videos, Shorts, channel profiles and comments in one run. Search by keyword, list a channel's newest uploads, read a playlist in its own order, or supply individual video links. Export the results as structured rows.

Full video details and channel profiles are on by default. Captions and comments are optional. Captions include plain text, the language, whether they were auto-generated, and timed segments. This Actor uses public signed-out responses; it does not need a YouTube account or API key.

### What you get

| Field | What it holds |
|---|---|
| Video | `videoId`, `url`, `title`, `channel`, `channelId`, `channelUrl`, `views`, `likes`, `commentsCount`, `durationSeconds`, `publishedAt`, `description`, `tags`, `category`, `thumbnail`, `isShort`, `isLive`, `isLiveContent`, `chapters` |
| Channel | `name`, `handle`, `url`, `channelId`, `subscribers`, `videoCount`, `views`, `description`, `links`, `joinedDate`, `joinedText`, `country`, `thumbnail` when public |
| Comment | `commentId`, `videoId`, `videoUrl`, `text`, `author`, `authorChannelId`, `likes`, `replyCount`, `publishedAgo`, `parent`, `pinned`, `byCreator`, `authorVerified` |
| Optional captions | On the video row: `transcript`, `transcriptSegments` with `start`, `duration`, `text`; `transcriptLanguage`, `transcriptAutoGenerated`, `transcriptStatus`, `transcriptNote` and `availableTranscriptLanguages` |
| Playlist search card | Free `kind: playlist` rows with `playlistId`, title, channel, video count and URL. Add a playlist URL to read its videos. |
| Provenance and notes | `kind`, `source`, `scrapedAt`, `detailsStatus`, `note`. A free `kind: failure` row explains an input that returned no usable data. |
| SUMMARY | Counts and charged events, per-input notes, duplicate count, spending-limit status, request count, traffic and timing. |

### What people use it for

- **Video research:** Find recent videos in a topic, filter by length, and compare their public counts.
- **Channel monitoring:** Collect a channel's newest videos, Shorts or streams on a schedule.
- **Caption datasets:** Collect existing public captions with timestamps for indexing, analysis and accessibility workflows.
- **Comment analysis:** Export top or newest comments and selected replies with the parent comment IDs.
- **Playlist catalogs:** Read the videos in public educational or topical playlists while retaining their playlist IDs.

### How to use it

1. Keep the example search or add search terms, channel handles, playlist links or video links. You can combine these inputs.
2. Choose the search filters and result limits. For channels, select videos, shorts and/or streams. A channel URL ending in /shorts or /streams selects that tab.
3. Leave full details on for publication dates, descriptions and other available metadata. Enable transcripts or set Comments per video above zero if needed.
4. Set a maximum run cost, start the Actor, and open the dataset and SUMMARY. Filter the `kind` column to distinguish videos, channels, comments, playlists and failures.

### Input

| Field | Example | Notes |
|---|---|---|
| `searchTerms` | `["home espresso tutorial"]` | One search term per line; leave empty for link-only jobs. |
| `searchType` | `video` | `video`, `shorts`, `channel`, `playlist`. Playlist searches return free cards, not their full contents. |
| `searchSort`, `uploadDate`, `duration` | `views`, `year`, `medium` | Order by relevance/date/views/rating; upload hour/today/week/month/year; duration short/medium/long. YouTube controls filter behavior. |
| `maxSearchResults` | `5` | Per search, up to 500. Results are deduplicated across the run. |
| `channelUrls`, `channelTabs` | `["@example-learning"]`, `["videos", "shorts"]` | Placeholder handle. Accepts channel links and IDs too. Tabs are newest first. |
| `maxVideosPerChannel` | `5` | Per channel per tab, up to 500; zero reads only the requested profile. |
| `playlistUrls`, `maxVideosPerPlaylist` | Public playlist links; `10` | Up to 500 per playlist, in playlist order. |
| `videoUrls` | Public video links or IDs | Watch, shortened, Shorts and live links are accepted. |
| `maxVideos` | `100` | Run-wide video ceiling, up to 5,000. Direct links are processed first, then searches, channels and playlists. |
| `fullDetails`, `includeChannelRows` | `true`, `true` | Turn off for fewer requests. A direct video still needs a details request to return a useful row. |
| `transcripts`, `preferredLanguage` | `false`, `en` | Existing captions only. The selected language is reported; if the preferred language is missing, another available language may be returned. |
| `commentsPerVideo`, `commentSort` | `0`, `top` | Up to 10,000 per video; `top` or `newest`. The limit includes replies. |
| `maxRepliesPerComment` | `0` | Up to 100 under each top-level comment; replies count toward the total comment limit. |
| `country`, `language` | `US`, `en` | Search ranking preferences. Country does not change the network location. |

### Output

Each result is one row in the run's dataset (download it as JSON, CSV, Excel, XML or HTML, or read it through the API). An example row (values shortened):

```json
{
  "kind": "video",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "views": 24850851,
  "likes": 566579,
  "commentsCount": 9400,
  "durationSeconds": 1120,
  "publishedAt": "2017-10-05T15:11:25+00:00",
  "category": "Education",
  "isShort": false,
  "isLive": false,
  "transcriptLanguage": "en",
  "transcriptAutoGenerated": false,
  "transcriptStatus": "ok",
  "videoId": "Example0001",
  "url": "https://video.example/watch?v=Example0001",
  "channel": "Example Learning",
  "channelId": "UC0000000000000000000000",
  "channelUrl": "https://video.example/@example-learning",
  "transcript": "This is a 3.",
  "transcriptSegments": [
    {
      "start": 4.22,
      "duration": 1.18,
      "text": "This is a 3."
    }
  ]
}
```

This example comes from the real 17 October 2026 test run: three videos, three channel profiles, 60 comments and three caption transcripts. Names, handles, identifiers and site addresses in the example have been replaced. The transcript is shortened to its first real segment; the counts and dates are from the run. SUMMARY records the results and charged events.

### Pricing

- **$0.00008 per unique delivered video** ($0.08 per 1,000). Available full details are included.
- **$0.00008 per unique channel profile** ($0.08 per 1,000) when channel rows are enabled or channel search is selected.
- **$0.0005 per comment or reply**. Replies count toward the requested comment limit.
- **$0.005 per delivered caption transcript**, in addition to its video event. Text and timed segments are attached to the same video row; there is no extra transcript dataset row.
- Unavailable captions and free failure rows are not charged. A usable listing row is still a video result when some detail fields are unavailable; its note explains the limitation.
- Launch price. It may rise later; Apify emails every user 14 days before any price increase takes effect, and a rise can happen at most once a month.
- Playlist search cards are free. No AI transcription, model fee, translation fee or proxy add-on is charged.

What typical jobs cost at the list price:

| Job | Cost |
|---|---|
| 100 video rows, with channel rows and optional extras off | $0.008 |
| 10 videos from one channel, plus its profile | $0.00088 |
| One video, its captions and 20 comments, channel rows off | $0.01508 |
| Three videos, three captions, 60 comments and three channel profiles | $0.0455 |
| The default five-video search with five different channel profiles | Up to $0.0008 |

On Apify's Scale and Business plans the per-event prices are lower (Store discounts). Set **Maximum cost per run** and the Actor stops cleanly when it is reached: you never pay more than that.

### Tips

- Start with five results to check whether the search and filters match the data you want.
- Turn full details and channel rows off for a lighter discovery run. Listing counts can be rounded, and exact publication dates may be absent.
- Use video IDs and comment IDs to join exports or remove duplicates between scheduled runs. Deduplication within a run is automatic; a later run is a new collection and is charged again.
- Check transcriptStatus before using transcript text. A missing transcript is not evidence that nobody speaks in the video.
- Use publishedAgo or publishedText when the site supplies only a relative date. The Actor does not invent exact comment timestamps.

### Use it through the API

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("zaiq/youtube-scraper").call(run_input={"searchTerms": ["home espresso tutorial"], "maxSearchResults": 5})
for row in client.dataset(run.default_dataset_id).iterate_items():
    print(row)
```

**JavaScript**

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('zaiq/youtube-scraper').call({"searchTerms": ["home espresso tutorial"], "maxSearchResults": 5});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**HTTP (one call, results back)**

```bash
curl -X POST 'https://api.apify.com/v2/acts/zaiq~youtube-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"searchTerms": ["home espresso tutorial"], "maxSearchResults": 5}'
```

### Integrations and schedules

- **Schedules:** run it every hour, day or week from the Apify Console (Schedules) and keep a history of results.
- **Make, Zapier, n8n, Google Sheets, Slack, Airtable:** connect it through Apify's integrations, or send each finished run to a **webhook**.
- **Datasets:** results stay in the run's dataset; export them or read them by API whenever you need them.

### Use it with AI agents (MCP)

Add Apify's MCP server with this Actor already pinned (`https://mcp.apify.com?tools=zaiq/youtube-scraper`) to Claude, ChatGPT, Cursor, VS Code or any MCP client. The agent can find this Actor and run it for you: ask it for "find recent public tutorial videos, their channel profiles and captions, then collect 20 comments per video". AI agents can also pay for runs directly through Apify's agentic payments.

### Limits

- Only public, signed-out data is collected. Private, members-only, age-gated or region-restricted data is not unlocked. Login walls and bot checks are reported. HTTP 429 stops further requests in the run.
- YouTube refuses some calls from server addresses ("Sign in to confirm you're not a bot"); those calls move to Apify's proxies, datacenter first, then residential addresses, at no extra charge. Nothing is solved or forged; a video YouTube keeps refusing is a free failure row.
- YouTube may omit, round or change counts. Fields that were not supplied stay null or empty. Channel subscriber counts are usually rounded. `isLive` means currently live; `isLiveContent` can also describe a past stream.
- Captions must already be publicly available. There is no AI transcription or translation. Empty caption files, unavailable languages, proof-token requirements and refused downloads are reported without a transcript charge.
- Timed caption segments retain the site's timing and can overlap, particularly with auto-generated captions. This is not a speaker-diarization service.
- Comments may be disabled or partly hidden. Comment publishedAt is null when only a relative publishedAgo value is available. Fewer returned rows are explained in SUMMARY.
- A video or channel appearing in multiple inputs is emitted once, with its first source. Playlist order is preserved, while channel upload tabs are newest first.
- Up to 100 inputs per input list, 500 search or listing results per source, and 5,000 videos per run. A request ceiling also prevents an unexpectedly long run. The spending limit can reduce these totals.

### FAQ

**Does this require an account or API key?**

No YouTube account or YouTube API key is needed.

**Are full details an extra event?**

No. The video event includes available details. A transcript, comments and a channel profile are separately priced optional results.

**Does switching transcripts on guarantee a transcript?**

No. It asks for the video's existing public captions. A successful nonempty transcript is charged once; an unavailable transcript has a status and note and is not charged.

**Does the preferred language translate captions?**

No. It selects an available caption track. If that language is missing, the returned language is identified.

**What happens at my spending limit?**

Work is checked before it starts. The Actor reduces result batches or skips optional work that cannot fit, keeps delivered results, and records stoppedAtSpendingLimit in SUMMARY.

**Can I get Shorts and live streams?**

Yes. Select the Shorts search type or a channel's shorts/streams tab. Live captions may be unavailable until a stream ends.

**Why does a playlist search not contain every video?**

Playlist search returns matching playlist cards. Put their URLs in playlistUrls to read their contents, using maxVideosPerPlaylist to control the size.

**Can I get exact comment dates?**

Only when YouTube provides them. Current public comment responses normally give relative text; the Actor preserves it as publishedAgo and leaves publishedAt null.

**Can I export just videos or comments?**

Yes. Filter rows by kind before exporting or processing the dataset.

### Related Actors from Zaiq

- [youtube-outlier-finder](https://apify.com/zaiq/youtube-outlier-finder): compare videos with their channel's usual views
- [youtube-comments-scraper](https://apify.com/zaiq/youtube-comments-scraper): comments with optional audience analysis
- [youtube-transcript-scraper](https://apify.com/zaiq/youtube-transcript-scraper): dedicated caption and subtitle workflows

### Support

Questions, a site that changed, or a field you need? Open an issue on this Actor's **Issues** tab: we answer there, usually within a day.

***

Also found as: youtube scraper, youtube search scraper, youtube channel scraper, youtube shorts scraper, youtube playlist scraper, youtube comments scraper, youtube transcript scraper.

# Actor input Schema

## `searchTerms` (type: `array`):

One query per line. Leave empty when using channel, playlist or video links.

## `searchType` (type: `string`):

Videos, Shorts, channel profiles or playlist cards. Playlist search returns free cards; playlist links list their videos.

## `searchSort` (type: `string`):

Use YouTube's relevance, newest upload, views or rating order.

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

Filter video searches by the upload window. YouTube may ignore this for channel or playlist searches.

## `duration` (type: `string`):

Short: under 4 minutes; medium: 4–20 minutes; long: over 20 minutes. Separate from the Shorts content type.

## `maxSearchResults` (type: `integer`):

Maximum unique matching results per query, before run-wide deduplication.

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

Public channel links, IDs or @handles. A /shorts or /streams suffix selects that tab for that channel.

## `channelTabs` (type: `array`):

Use videos, shorts and/or streams. Each tab is newest first; the maximum applies per channel per tab.

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

Maximum videos from each requested tab of each channel. Videos are deduplicated across all inputs.

## `playlistUrls` (type: `array`):

Public playlist links or IDs. Videos retain playlist order; unavailable entries are skipped with a note.

## `maxVideosPerPlaylist` (type: `integer`):

Maximum listed videos per playlist, in playlist order.

## `videoUrls` (type: `array`):

Public watch, Shorts, live, youtu.be links, or 11-character video IDs.

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

Run-wide cap across all searches, channels, playlists and direct links. Direct links are processed first.

## `fullDetails` (type: `boolean`):

Get exact public counts, description, tags, category, publication date and chapters where shown. If details fail, an available listing row is kept with a note.

## `transcripts` (type: `boolean`):

Fetch existing public captions and timed segments. $0.005 only for a delivered, nonempty transcript. No AI transcription or translation.

## `preferredLanguage` (type: `string`):

Language code such as en or es. Prefer it when available, otherwise return the original or another available track and state the language.

## `commentsPerVideo` (type: `integer`):

Maximum comments including replies per delivered video. Zero skips comments. $0.0005 per delivered comment.

## `commentSort` (type: `string`):

Top follows YouTube's ranking; newest follows the comment sort menu.

## `maxRepliesPerComment` (type: `integer`):

Maximum replies under each top-level comment. Replies count toward Comments per video. Zero skips replies.

## `includeChannelRows` (type: `boolean`):

Add one paid profile per unique channel named in delivered videos or channel inputs. Channel searches always return profiles.

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

Two-letter region code for search ranking. This does not change the network location or bypass regional restrictions.

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

Language code for search results. Public dates remain source text when an exact date is not supplied.

## Actor input object example

```json
{
  "searchTerms": [
    "home espresso tutorial"
  ],
  "searchType": "video",
  "searchSort": "relevance",
  "uploadDate": "any",
  "duration": "any",
  "maxSearchResults": 5,
  "channelTabs": [
    "videos"
  ],
  "maxVideosPerChannel": 5,
  "maxVideosPerPlaylist": 10,
  "maxVideos": 100,
  "fullDetails": true,
  "transcripts": false,
  "preferredLanguage": "en",
  "commentsPerVideo": 0,
  "commentSort": "top",
  "maxRepliesPerComment": 0,
  "includeChannelRows": true,
  "country": "US",
  "language": "en"
}
```

# Actor output Schema

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

Dataset: the results.

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

What each input returned, and notes.

# 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 = {
    "searchTerms": [
        "home espresso tutorial"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zaiq/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 = { "searchTerms": ["home espresso tutorial"] }

# Run the Actor and wait for it to finish
run = client.actor("zaiq/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 '{
  "searchTerms": [
    "home espresso tutorial"
  ]
}' |
apify call zaiq/youtube-scraper --silent --output-dataset

```

## MCP server setup

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