# YouTube Scraper — Videos, Channels and Search (`thirdwatch/youtube-scraper`) Actor

Extract YouTube search results, channel videos, and video details. Get titles, view counts, durations, channel information, and thumbnails for content research and monitoring. No YouTube API key required.

- **URL**: https://apify.com/thirdwatch/youtube-scraper.md
- **Developed by:** [Thirdwatch](https://apify.com/thirdwatch) (community)
- **Categories:** Videos
- **Features:** Limited permissions
- **Stats:** 269 total users, 18 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.60 / 1,000 results

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

> **Thirdwatch portfolio:** 8,800+ users across 140+ public Actors, 2M+ records delivered, >95% run success. [Explore all Thirdwatch Actors](https://apify.com/thirdwatch).

> Scrape YouTube search results, channel videos, and video details — titles, view counts, durations, channel info, thumbnails, and more. No API key.

### What you get

Structured YouTube data across three modes in one actor. Search by keyword, pull a channel's video feed, or fetch details for specific video URLs. Every row includes title, view count, duration, channel, publish time, and thumbnail. No API key or quota to manage.

### Output fields

| Field | Description |
|-------|-------------|
| `videoId` | YouTube video ID |
| `title` | Video title |
| `url` | Video URL |
| `channelName` | Channel name |
| `channelUrl` | Channel URL |
| `description` | Video description |
| `viewCount` | Number of views |
| `duration` | Duration in seconds |
| `durationText` | Human-readable duration (e.g., `4:31:04`) |
| `publishedTimeText` | Relative publish time (e.g., `5 years ago`) |
| `thumbnailUrl` | Thumbnail image URL |
| `isLive` | Currently-live flag |
| `isShort` | YouTube Short flag |

### Example output

```json
{
    "videoId": "rfscVS0vtbw",
    "title": "Learn Python - Full Course for Beginners",
    "url": "https://www.youtube.com/watch?v=rfscVS0vtbw",
    "channelName": "freeCodeCamp.org",
    "channelUrl": "https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ",
    "description": "This course will give you a full introduction into all of the core concepts in python...",
    "viewCount": 45000000,
    "duration": 16264,
    "durationText": "4:31:04",
    "publishedTimeText": "5 years ago",
    "thumbnailUrl": "https://i.ytimg.com/vi/rfscVS0vtbw/hqdefault.jpg",
    "isLive": false,
    "isShort": false
}
```

### Input parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `queries` | Yes | List of search terms, channel URLs (`@handle` or `/channel/ID`), or video URLs. Input type is auto-detected. |
| `maxResults` | No | Max total results across all queries. Default `25`, max `500`. |
| `maxResultsPerQuery` | No | Max results per individual query. Default `50`. |
| `searchType` | No | `videos`, `channels`, or `playlists`. Default `videos`. |
| `sort` | No | Sort order: `relevance`, `date`, `viewCount`, or `rating`. Default `relevance`. |

### Use cases

- **Content researchers**: Analyze what's trending in a topic or category.
- **Marketers**: Research competitor channels — upload cadence, top videos, and view patterns.
- **Data analysts**: Build view-count and duration datasets across niches.
- **Media teams**: Monitor videos about your brand, product, or industry.
- **Educators and curators**: Find and track educational content across channels.

### Use cases & recipes

Step-by-step guides on [thirdwatch.dev/blog](https://thirdwatch.dev/blog):

- [Build a YouTube Content Trend Pipeline (2026 Guide)](https://thirdwatch.dev/blog/build-youtube-content-trend-pipeline)
- [Research YouTube Keyword Competition (2026 Guide)](https://thirdwatch.dev/blog/research-youtube-keyword-competition)
- [Scrape YouTube Search and Channel Data at Scale (2026)](https://thirdwatch.dev/blog/scrape-youtube-search-and-channel-data)
- [Track YouTube Channel Growth and Views at Scale (2026)](https://thirdwatch.dev/blog/track-youtube-channel-growth-and-views)

### Limitations

- Search pages cap at ~20 videos each — `maxResults` drives how many pages are fetched.
- Exact like counts are only populated when a video URL is provided directly (not from search pages).
- Very heavy runs can hit rate limits on YouTube's public pages — split large jobs across queries.
- YouTube Shorts are returned in search results with `isShort: true`.

### Compared to alternatives

- **vs. streamers/youtube-scraper** (per-month licensing): This actor is pay-per-result, so test runs cost cents. One schema covers search, channel feeds, and video details rather than separate endpoints.

Pairs well with [TikTok Scraper](https://apify.com/thirdwatch/tiktok-scraper?fpr=9m2cd6) and [Instagram Scraper](https://apify.com/thirdwatch/instagram-scraper?fpr=9m2cd6) for cross-platform video research.

### FAQ

**Can I scrape a channel's full video list?**
Yes. Pass the channel handle (`@freecodecamp`) or `/channel/UC...` URL. `maxResultsPerQuery` caps how many of their videos come back.

**Do I need a YouTube Data API key?**
No. Quotas and keys are not required.

**How accurate are view counts?**
Counts are pulled live and match what YouTube shows publicly on the video. Drift from real-time counts is possible on fast-moving videos.

**Can I filter to Shorts only?**
Not directly. All videos are returned with `isShort` flags — filter downstream.

Last verified: 2026-04

More scrapers at [thirdwatch.dev](https://thirdwatch.dev).

# Actor input Schema

## `queries` (type: `array`):

List of search terms, channel URLs (@handle or /channel/ID), or video URLs to scrape.

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

Maximum total number of results across all queries. This is a total cap across all queries — raise it when using maxResultsPerQuery on multiple queries.

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

Maximum number of results per individual query. Defaults to maxResults if not set.

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

Type of results to return from search queries.

## `sort` (type: `string`):

Sort order for search results.

## Actor input object example

```json
{
  "queries": [
    "python tutorial"
  ],
  "maxResults": 25,
  "maxResultsPerQuery": 50,
  "searchType": "videos",
  "sort": "relevance"
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "python tutorial"
    ],
    "maxResults": 25,
    "maxResultsPerQuery": 50,
    "searchType": "videos",
    "sort": "relevance"
};

// Run the Actor and wait for it to finish
const run = await client.actor("thirdwatch/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 = {
    "queries": ["python tutorial"],
    "maxResults": 25,
    "maxResultsPerQuery": 50,
    "searchType": "videos",
    "sort": "relevance",
}

# Run the Actor and wait for it to finish
run = client.actor("thirdwatch/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 '{
  "queries": [
    "python tutorial"
  ],
  "maxResults": 25,
  "maxResultsPerQuery": 50,
  "searchType": "videos",
  "sort": "relevance"
}' |
apify call thirdwatch/youtube-scraper --silent --output-dataset

```

## MCP server setup

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