# YouTube Scraper - Videos, Shorts & Channels (`overbifrost/youtube-scraper`) Actor

Scrape public YouTube videos, Shorts, channels, playlists and search results. Export titles, descriptions, published dates, view and engagement counts, and channel metadata to structured JSON or CSV. Use direct links, handles or keyword searches with clear coverage and error reporting.

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

## Pricing

from $0.21 / 1,000 video scrapeds

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

**Scrape public YouTube video, Shorts, channel, playlist, and search metadata to JSON or CSV.** Enter a YouTube link or search term to collect titles, URLs, channel details, dates, durations, and engagement when the public source exposes them. No YouTube API key, account, or cookies are required.

Use it to research channels, follow a video topic, or build a metadata list for analysis. Each record shows what was observed and what was unavailable. This Actor collects metadata; it does not download videos, audio, transcripts, or comments.

**Pay per result:** video records are listed at **$0.30 per 1,000** in the standard pricing column (eligible plan discounts may apply). Channel and playlist records, and an Actor-start event, are priced separately. Check the [Pricing tab](https://apify.com/overbifrost/youtube-scraper/pricing) for your current rate.

### How to use this YouTube scraper

1. Open the **Input** tab. Start with one channel or one keyword; remove prefilled sources you do not want to collect. Video and playlist links are also supported.
2. Request **5–10 videos**, keep **videoDetails off**, and leave **proxyStrategy: NONE** for the first check. Increase the result and request limits only after reviewing that output.
3. Click **Start** and wait for the Actor run to finish.
4. Open the **Output** tab for the Dataset and **Results overview**. Review `RUN_SUMMARY` and record coverage, then download JSON/CSV or pass the Dataset to another workflow.

You can also schedule runs and retrieve results through the [Apify API](https://docs.apify.com/api/v2), Make, Zapier, or other supported integrations.

### What YouTube data can you scrape?

| You want to... | Enter... | What you get |
| --- | --- | --- |
| Extract YouTube video information | Video links or 11-character IDs | Video titles, descriptions, durations, thumbnails, channel details, dates, views, and engagement **when available** |
| Scrape YouTube Shorts | Shorts links or a channel's Shorts tab | Short video records and available public metadata |
| Explore a YouTube channel | Channel URL or `@handle` | Channel name, public statistics, description, links, and a limited list of uploads or Shorts |
| Export YouTube playlist videos | Playlist link or ID | Playlist details and discovered video items with playlist positions |
| Search YouTube for videos | Keywords or YouTube search URL | Matching video listings with optional sorting and date/duration filters |

Each video, channel, or playlist is saved as a separate record. Repeated videos are deduplicated by identity, including when the same video appears through several inputs. Results are capped by your chosen limits, not silently treated as complete channel histories.

### YouTube input examples

#### Example: collect videos from a YouTube channel

```json
{
  "channelUrls": ["https://www.youtube.com/@RickAstleyYT"],
  "channelTabs": ["VIDEOS"],
  "maxVideosPerChannel": 5,
  "resultsLimit": 5,
  "videoDetails": false,
  "maxTotalRequests": 8,
  "proxyStrategy": "NONE"
}
```

This asks for the channel information and **up to five** videos from its Videos tab. Some public video-list fields, such as precise views, may be unavailable. If YouTube blocks the request, the result explains that rather than inventing data.

#### Example: find YouTube videos by keyword

```json
{
  "searchQueries": ["wireless microphone review"],
  "maxResultsPerSearchQuery": 10,
  "resultsLimit": 10,
  "videoDetails": false,
  "maxTotalRequests": 8,
  "proxyStrategy": "NONE"
}
```

Use search filters for relevance, upload date, duration, region, or language. They are source-supported hints. For search-only results, the scraper additionally checks observed video durations against your SHORT (<4 minutes), MEDIUM (4–20 minutes), or LONG (>20 minutes) selection before saving and charging; unknown or mismatched durations are excluded and reported in RUN_SUMMARY. This may reduce the number of results. Other search settings and rankings remain source-dependent.

### YouTube scraper output: JSON and CSV

Choose the export that suits your workflow:

- **FULL** (default): structured records with observed fields, timestamps/count precision, provenance, and acquisition status.
- **FLAT**: spreadsheet-friendly columns.
- **COMPACT**: smaller records containing core metadata and stable identity.
- **CSV**: enable `writeCsv` to save an additional formula-safe `videos.csv` file.

The following is a **simplified illustration** of a video listing, not a live result or a promise that every field is present:

```json
{
  "recordType": "VIDEO",
  "videoId": "PXC_PYeB6F8",
  "state": "COMPLETE",
  "detailLevel": "LISTING",
  "title": "Example video title",
  "viewCount": {
    "value": null,
    "displayText": null,
    "approximate": false
  },
  "observedFields": ["title", "durationSeconds", "thumbnailUrl"]
}
```

In the real Dataset, FULL records also include stable IDs, URLs, source evidence, coverage and other fields. **A missing value remains `null` rather than a guessed number.**

Alongside the Dataset, the Actor saves a human-readable `REPORT.html`, a `RUN_SUMMARY`, and a `CHARGE_JOURNAL`. Turn on `saveDiagnostics` for an optional, bounded `DIAGNOSTICS` report explaining source and field coverage.

### YouTube scraper pricing

This Actor uses Apify **Pay Per Event (PPE)**. At the standard displayed pricing column:

| Delivered record or event | Price |
| --- | ---: |
| One unique VIDEO record | **$0.00030** ($0.30 per 1,000) |
| One unique CHANNEL record | **$0.00050** ($0.50 per 1,000) |
| One unique PLAYLIST record | **$0.00050** ($0.50 per 1,000) |
| Actor start | **$0.00005** per event |

For example, **100 delivered video records + 1 channel record + 1 start** would total approximately **$0.03055** at those rates. Eligible subscription discounts may lower the result price. The precise billing rules and prices for your account are shown in the **Pricing** tab.

**Important:** A substantive, unique **LISTING** video can be billed even when optional full-detail enrichment fails. You do not pay WIE's video/channel/playlist event for duplicates, filtered-out items, or records whose source state is blocked or otherwise not charge-eligible. A start charge can still apply even with zero records. Platform usage is included in the currently displayed pricing model.

### Why use this YouTube data scraper?

- **One run, multiple sources:** combine direct videos, channel uploads, Shorts, playlists, and keyword searches.
- **Observed data:** source-observed fields, approximate count flags, and explicit `COMPLETE`, `PARTIAL`, `BLOCKED`, `RATE_LIMITED`, or `INCONCLUSIVE` outcomes.
- **Understand the coverage:** channel and playlist records show whether a requested limit was reached and whether more content may be available.
- **Predictable controls:** result, request, and concurrency limits keep jobs bounded; no proxy is used unless you select one.
- **Exports and automation:** consistent JSON schemas, stable deduplication identities, CSV options, and Apify schedules/API access.

This tool is designed for **evidence-backed public metadata**, not guessing every statistic from incomplete YouTube pages.

### Tips for reliable results

#### Start with a small run

For your first run, choose one channel or one keyword, request 5–10 videos, keep `videoDetails: false`, and use `proxyStrategy: "NONE"`. Review the Dataset and `RUN_SUMMARY` before increasing the limits.

#### Need richer video details?

A direct video URL requests watch-page details. Setting `videoDetails: true` additionally requests watch pages for videos found via channels, playlists, or search. **These extra requests may trigger YouTube login or bot checks**, so complete details are not guaranteed. Existing listing records are kept if enrichment fails, and source-wide blocks stop further optional enrichment.

#### Missing views, dates, or channel names?

YouTube shows different information on different pages. For example, some channel Videos listings do not expose view counts or per-video channel names, even when a continuation page does. Consult `observedFields` and `detailLevel`; don't interpret a blank count as zero. Relative publication dates may be estimates, and K/M-rounded counts are marked approximate.

#### Want hundreds or thousands of results?

Increase your per-source caps and request budget deliberately. Pagination depends on available YouTube continuation tokens and is not guaranteed for every page. Use the record's coverage fields — `coverage.hasMore` and `coverage.stoppedReason` on playlists, `videosTab`/`shortsTab` on channels — to distinguish a completed list from a limited or interrupted one.

### Frequently asked questions

#### Do I need a YouTube API key or account?

No. This Actor reads accessible, logged-out public YouTube pages. Some pages are inaccessible without login, and public access can be rate-limited or blocked.

#### Does it download YouTube videos, audio, subtitles, or comments?

No. The current product extracts **metadata**, not media files, transcripts, full comment threads, or captions.

#### Can I scrape YouTube Shorts and playlists?

Yes. Supply Shorts links, channel Shorts tabs, or playlist URLs. The output includes the metadata that the relevant public source actually exposes.

#### Can I export results to Excel or Google Sheets?

You can download CSV or use the FLAT output format for a spreadsheet-friendly Dataset. Transfers to external apps depend on the integrations you connect.

#### Will every run return results?

No scraping service can guarantee that YouTube pages are always accessible. If a source fails or cannot be verified, this Actor reports the state instead of creating fake results. Use a modest input and review the run summary.

#### Is this an official YouTube tool?

No. This is an **independent, unofficial scraper**, not affiliated with, endorsed by, or sponsored by YouTube or Google. It does not grant special rights to access, reuse or redistribute YouTube content. Follow the [YouTube Terms of Service](https://www.youtube.com/t/terms) and applicable laws for your use case.

### Support and troubleshooting

Read the [YouTube scraper overview](https://overbifrost.com/wie/youtube-scraper/) for supported sources and the [YouTube input guide](https://overbifrost.com/wie/docs/#youtube-input) for links, search terms, and request limits.

If a run returns fewer items than requested, check `RUN_SUMMARY` and the record's `coverage`. For a blocked or rate-limited response, reduce the scope and try later rather than assuming the video does not exist. To report a reproducible problem, use the [Actor Issues tab](https://apify.com/overbifrost/youtube-scraper/issues). Include the build version, a redacted input example, the state/diagnostic code, and the expected versus observed result. Do not share credentials or private user data.

You can also [contact OverBifrost support](https://overbifrost.com/support/) for help with a run or its output.

The tool runs with limited Apify permissions. Optional proxies are not enabled by default; they can carry separate usage costs and do not guarantee access.

# Actor input Schema

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

Paste YouTube watch, youtu.be, Shorts, live, or embed links, or bare 11-character IDs. Direct videos request watch-page details, which may be blocked.

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

Channel URLs or @handles. The prefilled Rick Astley URL is an example for Apify's daily health check; replace it with your own channel.

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

Playlist URLs (youtube.com/playlist?list=…) or bare playlist IDs. Items become VIDEO records with playlist position provenance.

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

Keyword search or YouTube results URL. The prefilled search is a small backup example for the daily Store health check; replace or clear it.

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

Which channel tabs to collect. VIDEOS = uploads; SHORTS = Shorts. The prefilled daily-test example selects VIDEOS only.

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

Maximum items per selected channel tab; 0 collects channel metadata only. The example uses 4 to keep the first run small.

## `maxPlaylistItems` (type: `integer`):

Maximum items read per playlist.

## `maxResultsPerSearchQuery` (type: `integer`):

Maximum video results from each keyword search. The example uses 3 to keep the first run small.

## `videoDetails` (type: `boolean`):

Optional extra detail fetch for videos found via channels, playlists or search. Watch pages may trigger bot checks; existing listing results remain saved. Each attempted detail fetch adds one HTTP request.

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

Order YouTube keyword search results by relevance, upload date, view count or rating where supported. Applies only to search queries.

## `searchUploadDate` (type: `string`):

Limit keyword search results by YouTube's upload-date buckets. Applies only to search queries, not directly supplied URLs.

## `searchDuration` (type: `string`):

YouTube's duration buckets (<4min / 4-20min / >20min). This is NOT the same as Shorts classification.

## `searchRegion` (type: `string`):

Two-letter country code, for example US, GB or NO. Applies as a hint to YouTube search; results are not guaranteed to be country-exclusive.

## `searchLanguage` (type: `string`):

Language hint for YouTube search, e.g. en or en-US. Does not translate video metadata or guarantee language-only results.

## `publishedAfter` (type: `string`):

Keep videos published on or after this ISO timestamp. Videos without an observable date are kept unless keepUnknownDates is off.

## `publishedBefore` (type: `string`):

Keep videos published on or before this ISO timestamp.

## `minViewCount` (type: `integer`):

Keep videos whose observed view count meets this minimum. Videos without an available count cannot be verified against the threshold.

## `minLikeCount` (type: `integer`):

Keep videos whose observed like count meets this minimum. Missing like counts are unknown, not zero.

## `minCommentCount` (type: `integer`):

Keep videos whose observed comment count meets this minimum. Missing comment counts are unknown, not zero.

## `mediaTypes` (type: `array`):

Keep only these media kinds. UNKNOWN-kind videos are excluded when this filter is set.

## `titleContains` (type: `string`):

Optional case-insensitive keyword filter on observed video titles.

## `descriptionContains` (type: `string`):

Optional case-insensitive keyword filter on observed video descriptions; unavailable descriptions cannot be matched.

## `keepUnknownDates` (type: `boolean`):

When a date filter is set, keep videos whose publish date could not be determined.

## `resultsLimit` (type: `integer`):

Maximum VIDEO results saved per run (channel and playlist metadata rows are separate).

## `outputFormat` (type: `string`):

Choose FULL (structured metadata), FLAT (spreadsheet-oriented fields) or COMPACT (key metadata) for saved results.

## `writeCsv` (type: `boolean`):

Also save a formula-safe CSV of video rows to the key-value store.

## `saveDiagnostics` (type: `boolean`):

Save bounded DIAGNOSTICS JSON in Key-value store: per-record source evidence, missing video fields and run warnings (up to 500 evidence rows). No raw HTML.

## `maxTotalRequests` (type: `integer`):

Hard cap on source HTTP requests. For a small first run, keep this at 8; raise it only when you need more pages.

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

Parallel video detail requests. The example uses 1; higher values may increase rate limits and usage.

## `minDelayMs` (type: `integer`):

Minimum pause in milliseconds between YouTube requests. Use a conservative value to reduce request pressure.

## `maxDelayMs` (type: `integer`):

Maximum pause in milliseconds between YouTube requests. Must be at least the minimum delay.

## `proxyStrategy` (type: `string`):

NONE makes direct requests without paid Apify proxies. Residential/datacenter proxies may incur additional usage costs and do not guarantee access.

## Actor input object example

```json
{
  "channelUrls": [
    "https://www.youtube.com/@RickAstleyYT"
  ],
  "searchQueries": [
    "Rick Astley official music video"
  ],
  "channelTabs": [
    "VIDEOS"
  ],
  "maxVideosPerChannel": 4,
  "maxPlaylistItems": 100,
  "maxResultsPerSearchQuery": 3,
  "videoDetails": false,
  "searchSort": "RELEVANCE",
  "searchUploadDate": "ANY",
  "searchDuration": "ANY",
  "keepUnknownDates": true,
  "resultsLimit": 7,
  "outputFormat": "FULL",
  "writeCsv": false,
  "saveDiagnostics": false,
  "maxTotalRequests": 8,
  "maxConcurrency": 1,
  "minDelayMs": 250,
  "maxDelayMs": 650,
  "proxyStrategy": "NONE"
}
```

# Actor output Schema

## `report` (type: `string`):

Browse your saved videos, Shorts, channels and playlists, with key details and collection status. Open the Dataset for all records.

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

Public video, Shorts, channel and playlist records with observed metadata and coverage state.

## `runSummary` (type: `string`):

Requested, acquired, persisted and charged counts plus source coverage diagnostics.

## `chargeJournal` (type: `string`):

Per-result billing decisions with reasons, including uncertain and skipped outcomes.

# 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 = {
    "channelUrls": [
        "https://www.youtube.com/@RickAstleyYT"
    ],
    "searchQueries": [
        "Rick Astley official music video"
    ],
    "channelTabs": [
        "VIDEOS"
    ],
    "maxVideosPerChannel": 4,
    "maxResultsPerSearchQuery": 3,
    "videoDetails": false,
    "resultsLimit": 7,
    "outputFormat": "FULL",
    "writeCsv": false,
    "saveDiagnostics": false,
    "maxTotalRequests": 8,
    "maxConcurrency": 1,
    "minDelayMs": 250,
    "maxDelayMs": 650,
    "proxyStrategy": "NONE"
};

// Run the Actor and wait for it to finish
const run = await client.actor("overbifrost/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 = {
    "channelUrls": ["https://www.youtube.com/@RickAstleyYT"],
    "searchQueries": ["Rick Astley official music video"],
    "channelTabs": ["VIDEOS"],
    "maxVideosPerChannel": 4,
    "maxResultsPerSearchQuery": 3,
    "videoDetails": False,
    "resultsLimit": 7,
    "outputFormat": "FULL",
    "writeCsv": False,
    "saveDiagnostics": False,
    "maxTotalRequests": 8,
    "maxConcurrency": 1,
    "minDelayMs": 250,
    "maxDelayMs": 650,
    "proxyStrategy": "NONE",
}

# Run the Actor and wait for it to finish
run = client.actor("overbifrost/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 '{
  "channelUrls": [
    "https://www.youtube.com/@RickAstleyYT"
  ],
  "searchQueries": [
    "Rick Astley official music video"
  ],
  "channelTabs": [
    "VIDEOS"
  ],
  "maxVideosPerChannel": 4,
  "maxResultsPerSearchQuery": 3,
  "videoDetails": false,
  "resultsLimit": 7,
  "outputFormat": "FULL",
  "writeCsv": false,
  "saveDiagnostics": false,
  "maxTotalRequests": 8,
  "maxConcurrency": 1,
  "minDelayMs": 250,
  "maxDelayMs": 650,
  "proxyStrategy": "NONE"
}' |
apify call overbifrost/youtube-scraper --silent --output-dataset

```

## MCP server setup

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