# YouTube Scraper: Videos, Channels & Search Results (`jaybird/youtube-scraper`) Actor

Scrape YouTube search results, channel videos and video URLs. Get views, likes, comments, duration, upload date, tags, description and channel subscribers. $3 per 1,000 videos.

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

## Pricing

from $2.10 / 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: Videos, Channels & Search Results

Scrape YouTube **search results, channel videos and individual videos** into one clean row per video: title, **views, likes, comments**, duration, upload date, description, tags, hashtags, category and the channel's name, handle and subscriber count. No YouTube account or API key needed.

**You pay per video scraped.** Private, removed and region-blocked videos are listed in the run summary and never charged.

### What can it do?

- 🔎 **Search YouTube** by keyword, sorted by relevance or popularity, filtered to today, this week, this month or this year. Results are videos only: Shorts shelves, playlists and channel cards never take result slots.
- 📺 **List a channel's uploads** from its Videos tab, newest first. Paste a channel URL, an `@handle` or a channel ID.
- 🎬 **Look up specific videos** from watch, `youtu.be`, Shorts or live URLs, or plain video IDs.
- 📊 **Engagement numbers** on every row: exact views and likes, the comment count, and the channel's subscribers.
- 🏷️ **SEO data**: the full description, hashtags and, when YouTube includes them on the page, the video's tags and category.
- 🧭 **Where each video came from**: the search or channel it was found in and its rank there, so you can track positions over time.

### Who is it for?

- **Marketers and agencies** researching what ranks for a keyword, and how competitors' videos perform.
- **Creators** studying titles, lengths, tags and upload timing in their niche.
- **Brand and PR teams** monitoring videos that mention a product or topic, with the newest uploads first.
- **Researchers and analysts** building datasets of videos, channels and engagement.

### How to use it

1. Add **Search queries**, **Channels** or **Video URLs** (any mix, one per row).
2. Set **Max results per search or channel** (default 20). Video URLs are always scraped.
3. For searches, optionally choose **Sort by** (relevance or popularity) and **Upload date**.
4. Run it, then export the dataset as JSON, CSV or Excel, or read it through the Apify API.

#### Input example

```json
{
    "searchQueries": ["web scraping tutorial"],
    "channels": ["@veritasium"],
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxResults": 50,
    "sortBy": "relevance",
    "uploadDate": "any"
}
```

#### Output example

One row per video (description shortened here):

```json
{
    "videoId": "ng2o98k983k",
    "url": "https://www.youtube.com/watch?v=ng2o98k983k",
    "title": "Python Tutorial: Web Scraping with BeautifulSoup and Requests",
    "description": "In this Python Programming Tutorial, we will be learning how to scrape websites…",
    "duration": "45:48",
    "durationSeconds": 2748,
    "viewCount": 1196558,
    "likeCount": 25134,
    "commentCount": 1100,
    "publishedAt": "2017-11-08",
    "publishedDateText": "Nov 8, 2017",
    "publishedTimeAgo": "8y ago",
    "channelName": "Corey Schafer",
    "channelId": "UCCezIgC97PvUuR4_gbFUs5g",
    "channelHandle": "@coreyms",
    "channelUrl": "https://www.youtube.com/@coreyms",
    "channelSubscriberCount": 1560000,
    "keywords": [],
    "hashtags": [],
    "category": null,
    "isLive": false,
    "isFamilyFriendly": null,
    "thumbnailUrl": "https://i.ytimg.com/vi/ng2o98k983k/hqdefault.jpg",
    "source": { "type": "search", "input": "web scraping tutorial", "rank": 6 },
    "scrapedAt": "2026-11-02T18:35:19.906Z"
}
```

The dataset has four views: **Overview**, **Engagement**, **Channels**, and **Tags and descriptions**. The run's `OUTPUT` record summarizes each input's outcome, unavailable videos with YouTube's reason, and failed pages.

### Pricing

Pay per result: **$3 per 1,000 videos** on the Apify Free plan, down to $2.10 per 1,000 on Gold and above. Search and channel pages are free; you pay only for video rows. Unavailable videos are free. Apify adds a small start fee of $0.00005 per GB of run memory.

Set a maximum charge on the run and the Actor stops cleanly when it is reached.

### Feedback and reviews

Something not working, or a field you need? Open an issue on the [Issues tab](https://apify.com/jaybird/youtube-scraper/issues) and we'll take a look.

If this Actor saved you time, a short [review on Apify Store](https://apify.com/jaybird/youtube-scraper/reviews) helps other people decide whether it fits their needs.

### FAQ

**Why are tags, category or the exact upload time sometimes empty?** YouTube leaves part of each watch page out when it serves the page to automated visitors. It did that on most pages in our tests (tags and category were present on about 1 in 6 videos). The page still shows the title, views, likes, comments, date, description and channel, so those fields are always filled. When the exact upload timestamp is missing, `publishedAt` holds the date shown on the page (`2017-11-08`). Duration then comes from the search or channel listing, so it can be empty only for videos you list by URL.

**How exact are the numbers?** Views and likes are exact counts. Comment and subscriber counts are rounded the way YouTube displays them (2.4M, 21.4M). Views are empty while a video is live.

**Does it need a YouTube account or API key?** No. It reads only what YouTube shows to logged-out visitors and never signs in. Age-restricted and members-only videos need a signed-in viewer, so they are reported as unavailable and not charged.

**Why did a search return fewer videos than Max results?** YouTube stopped offering more results for that query, or the date filter left fewer matches. The run summary shows how many videos each search and channel returned.

**Does it scrape comments, transcripts or Shorts tabs?** Not yet. It returns video-level data. Open an issue if you need one of these.

**Is scraping YouTube allowed?** The Actor collects only publicly visible video and channel information and no personal data beyond what channels publish. YouTube's terms restrict automated access, so check that your use complies with the terms and laws that apply to you.

### Related Jaybird Actors

- [Google Ads Transparency Scraper](https://apify.com/jaybird/google-ads-transparency-scraper): ads any advertiser runs on Google and YouTube.
- [Meta Ad Library Scraper](https://apify.com/jaybird/meta-ad-library-scraper): Facebook and Instagram ads.
- [TikTok Ad Library Scraper](https://apify.com/jaybird/tiktok-ad-library-scraper): ads shown on TikTok.
- [AI Search Visibility Tracker](https://apify.com/jaybird/ai-search-visibility-tracker): how your brand shows up in AI search answers.

# Actor input Schema

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

Keywords to search on YouTube, one per row. Each search returns up to Max results videos.

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

Channel URLs, @handles or channel IDs (UC…), one per row. Returns the channel's latest uploads from its Videos tab, newest first.

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

Specific videos: watch, youtu.be, Shorts or live URLs, or 11-character video IDs.

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

Stop each search or channel after this many videos. Video URLs are always scraped.

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

Relevance is YouTube's default order. Popularity puts the most-viewed videos first.

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

Only search results uploaded within this period. Does not apply to channels or video URLs.

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

Apify Proxy (datacenter) by default, which YouTube's public pages accept.

## Actor input object example

```json
{
  "searchQueries": [
    "web scraping tutorial"
  ],
  "maxResults": 10,
  "sortBy": "relevance",
  "uploadDate": "any",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "web scraping tutorial"
    ],
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jaybird/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": ["web scraping tutorial"],
    "maxResults": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("jaybird/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": [
    "web scraping tutorial"
  ],
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call jaybird/youtube-scraper --silent --output-dataset

```

## MCP server setup

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