# YouTube Scraper - Search, Channels & Video Stats (`clearfetch/youtube-scraper`) Actor

Scrape YouTube without login or API key: search results, channel videos and any video link, with exact views, likes, comment count, publish date, duration, description and channel stats. Filter by upload date. No cookies, no proxy.

- **URL**: https://apify.com/clearfetch/youtube-scraper.md
- **Developed by:** [Nada Hanad](https://apify.com/clearfetch) (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 $0.70 / 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 - Search, Channels & Video Stats

Scrape YouTube without logging in or an API key: search results, a channel's videos, or any list of video links,
with exact views, likes, publish date, duration, description, comment count and channel stats for every video.
**$1.00 per 1,000 results.** No quota, no cookies, no proxy, no browser.

### What data you get

**Videos** (one row each, same columns every time):

- `views` and `likes` (exact), `commentCount` when YouTube shows it
- `publishedAt` (exact date from the video's page), `durationSeconds`, `title`, full `description`, `hashtags`
- Channel: `channelName`, `channelHandle`, `channelId`, `channelUrl`, `channelSubscribers`, `channelVerified`
- `thumbnailUrl`, `isLive`, and where it came from: `source` (search, channel or url), `sourceValue`, `sourceRank`

**Channels**: `subscribers`, `videoCount`, `description`, `keywords`, `verified`, `avatarUrl`, `channelId`, `handle`.

### How to use

1. Add search queries, channels (@handles or links) or video links, one per line.
2. Optionally narrow searches by upload date (last hour to this year) or order them by popularity, and keep only
   videos newer than a date or an age like "7 days".
3. Run it, then download JSON, CSV or Excel, or pull the rows through the API. Schedule it to track channels.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `searchQueries` | array | — | One search per line. |
| `channels` | array | — | @handles, channel links or channel ids. |
| `videoUrls` | array | — | Watch, youtu.be, Shorts or live links, or video ids. Also `urls`, `startUrls`. |
| `maxResultsPerSource` | integer | `20` | Videos per search and per channel (0 = as many as YouTube lists, up to 1,000). |
| `contentType` | string | `videos` | `shorts` lists channels' Shorts tabs and applies YouTube's Shorts filter to searches. |
| `fetchVideoDetails` | boolean | `true` | Read each video's page for exact views, likes, date and full description. Off is faster and keeps the list's rounded views and relative date. |
| `includeChannelInfo` | boolean | `true` | One row per channel. |
| `searchSort` | string | `relevance` | `relevance` or `popularity`. |
| `uploadDate` | string | `any` | `hour`, `today`, `week`, `month`, `year`. |
| `newerThan` | string | — | A date or an age like `"7 days"`. Older videos are left out and not charged. |
| `maxConcurrency` | integer | `5` | Pages read in parallel. |
| `timeoutSecs` | integer | `30` | Per request. |
| `proxyConfiguration` | object | off | Not needed. |

### Output example

A real video row from a run with `"channels": ["@NASA"]` on 2026-09-29 (description shortened here):

```json
{
  "ok": true,
  "type": "video",
  "id": "jHKf1eHp3eQ",
  "url": "https://www.youtube.com/watch?v=jHKf1eHp3eQ",
  "title": "Artemis III: Our Next Step Back to the Moon",
  "channelName": "NASA",
  "channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
  "channelUrl": "https://www.youtube.com/@NASA",
  "channelHandle": "@NASA",
  "channelSubscribers": 15100000,
  "channelVerified": true,
  "views": 148431,
  "viewsApproximate": false,
  "likes": 3057,
  "commentCount": null,
  "commentCountApproximate": false,
  "publishedAt": "2026-09-03T00:00:00.000Z",
  "publishedAtApproximate": false,
  "publishedText": "Sep 3, 2026",
  "durationSeconds": 61,
  "description": "In April 2026, we flew humans to the Moon for the first time in over 50 years during the Artemis II mission. But this mission was only the beginning.\n\nSoon after, the crew of Artemis III was announced …",
  "hashtags": [],
  "thumbnailUrl": "https://i.ytimg.com/vi/jHKf1eHp3eQ/hqdefault.jpg",
  "isShort": false,
  "isLive": false,
  "source": "channel",
  "sourceValue": "@NASA",
  "sourceRank": 3,
  "detailed": true,
  "inputUrl": "@NASA",
  "scrapedAt": "2026-09-29T16:57:41.121Z"
}
```

And the channel row from the same run:

```json
{
  "ok": true,
  "type": "channel",
  "channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
  "name": "NASA",
  "handle": "@NASA",
  "url": "https://www.youtube.com/@NASA",
  "subscribers": 15100000,
  "subscribersText": "15.1M subscribers",
  "videoCount": 6100,
  "description": "NASA's mission is to pioneer the future in space exploration, scientific discovery, and aeronautics research.\r\n\r\nTo do that, we have worked around the world—and …",
  "keywords": "nasa space iss shuttle 50th astronauts planets earth rockets hubble telescopes NASA TV galaxy apollo gemini mercury sta Moon Artemis \"solar system\"",
  "verified": true,
  "avatarUrl": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s900-c-k-c0x00ffffff-no-rj",
  "isFamilySafe": true,
  "inputUrl": "@NASA",
  "scrapedAt": "2026-09-29T16:57:39.979Z"
}
```

An input that cannot be read comes back as one row with `ok: false` and a plain reason, such as `channel not found on
YouTube` or `video not found, private, or removed`. Those rows are free.

### Pricing

**$1.00 per 1,000 results**: one charge per video or channel row written. Failed inputs, repeats (a video found by
two searches is written once) and videos filtered out by date are free.

Paid Apify plans pay less: 10% off on Bronze, 20% on Silver and 30% on Gold and higher tiers.

### Use cases

- **Competitor and creator tracking**: schedule a daily run on a list of channels and follow each new video's views
  and likes.
- **Keyword and trend research**: what ranks for a search this week, how many views it gets, and who makes it.
- **Influencer discovery**: find channels by topic, then check subscribers and real engagement per video.
- **Enrich a list of video links** with exact stats for reports and dashboards.

### FAQ

**Do I need a YouTube API key?** No, and there is no daily quota. The Actor reads the same public pages a visitor
sees.

**Why is `durationSeconds` empty for some video links?** Duration comes from search and channel lists. For a video
given only as a link, YouTube does not always include it in the page it serves to servers.

**Are views exact?** Yes when the video's own page is read (the default). With **Read each video's page** off, views
come from the list, where YouTube rounds them (507K), and `viewsApproximate` says so.

**Is it legal?** It reads public pages that anyone can see without logging in. You are responsible for how you use
the data, including data protection rules for personal data.

### Integrations

Run it from the Apify API or a client library, schedule it in Apify Console, or connect it to n8n, Make, Zapier or
any MCP client through Apify's integrations. Results are available as JSON, CSV, Excel and through the dataset API.

### More tools from clearfetch

- [YouTube Comments Scraper](https://apify.com/clearfetch/youtube-comments-scraper): every comment and reply under a video
- [YouTube Shorts Scraper](https://apify.com/clearfetch/youtube-shorts-scraper): a channel's Shorts, Shorts search and Shorts links
- [YouTube Channel Scraper](https://apify.com/clearfetch/youtube-channel-scraper): channel stats and latest uploads, for schedules
- [TikTok Scraper](https://apify.com/clearfetch/tiktok-scraper): hashtags, profiles, sounds and video stats
- [Google Trends Scraper](https://apify.com/clearfetch/google-trends-scraper): interest over time, regions and related queries

### Changelog

- **1.1.0** (2026-09) — Shorts: `contentType: "shorts"` lists a channel's Shorts tab and filters searches to
  Shorts; Shorts are read from their own page, with duration and the publish time to the second; `isShort` is set
  on every row.
- **1.0.0** (2026-09) — first release: search with upload-date filter and popularity order, channel videos with
  channel stats, video links, exact views, likes and dates from each video's page.

# Actor input Schema

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

One search per line, like you would type it on YouTube. Each returns up to "Max results per source" videos.

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

@handles, channel links or channel ids (UC...). Each returns a channel row (subscribers, video count, description) and its latest videos.

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

Full stats for specific videos: watch links, youtu.be, Shorts and live links, or bare video ids. Also accepts "urls" and "startUrls" with any mix of YouTube links.

## `maxResultsPerSource` (type: `integer`):

Videos per search query and per channel. 0 means as many as YouTube lists (up to 1,000).

## `contentType` (type: `string`):

For channels, which tab to list: Videos or Shorts. For searches, regular results or YouTube's Shorts filter. Video links work either way.

## `fetchVideoDetails` (type: `boolean`):

Exact views, likes, comment count, full description and exact publish date for listed videos. Off is faster and keeps title, rounded views, relative date and duration from the list.

## `includeChannelInfo` (type: `boolean`):

One row per channel with subscribers, video count, description and keywords.

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

YouTube's own ordering for search results.

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

YouTube's upload-date filter for searches.

## `newerThan` (type: `string`):

An age like "7 days" or a date like 2026-09-01. Older videos from searches and channels are left out and not charged.

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

Pages read in parallel.

## `timeoutSecs` (type: `integer`):

Per request. Pages YouTube returns without data are retried.

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

Not needed: YouTube serves these pages to Apify's own servers. Only for very large volumes.

## Actor input object example

```json
{
  "searchQueries": [
    "web scraping tutorial"
  ],
  "channels": [
    "@NASA"
  ],
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "maxResultsPerSource": 5,
  "contentType": "videos",
  "fetchVideoDetails": true,
  "includeChannelInfo": true,
  "searchSort": "relevance",
  "uploadDate": "any",
  "newerThan": "",
  "maxConcurrency": 5,
  "timeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Video rows with views, likes, comment count, publish date, duration, description and channel; channel rows with subscribers and video count. Inputs that could not be read appear with ok=false and a reason, and are not charged.

# 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"
    ],
    "channels": [
        "@NASA"
    ],
    "videoUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "maxResultsPerSource": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearfetch/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"],
    "channels": ["@NASA"],
    "videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
    "maxResultsPerSource": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("clearfetch/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"
  ],
  "channels": [
    "@NASA"
  ],
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "maxResultsPerSource": 5
}' |
apify call clearfetch/youtube-scraper --silent --output-dataset

```

## MCP server setup

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