# YouTube Scraper: Videos, Channels, Search, New Videos Only (`redfoxscout/youtube-scraper`) Actor

Scrape YouTube videos from search terms, channel pages (videos, Shorts, streams) and video URLs. Returns title, channel, subscribers, views, publish date, duration, Short and live flags and description. Set a date to get only new videos. No login or API key. $2.00 per 1,000 videos.

- **URL**: https://apify.com/redfoxscout/youtube-scraper.md
- **Developed by:** [Red Fox Scout](https://apify.com/redfoxscout) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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

Scrape **YouTube videos** from search terms, channel pages (videos, Shorts and live streams) and video URLs. Each row has the **title, channel, subscriber count, views, publish date, duration, Short and live flags** and a **description**, and you can set a date to get **only videos published after it**, so a scheduled run pays for new uploads only. **No login, no cookies, no API key.** Not affiliated with YouTube.

**Price: $2.00 per 1,000 videos.** Failed searches and error rows are free, and a video that two searches return is charged once. Apify's free plan ($5 monthly credit) covers about 2,500 videos a month.

![YouTube Scraper output table: title, channel, subscribers, views, publish date and duration for a python tutorial search, the MrBeast channel and one video URL](https://raw.githubusercontent.com/TikTop-Data/apify-store-assets/main/images/youtube-scraper-output.png)

### Questions it answers

- Which videos did these channels publish since yesterday, with views and duration?
- What are the newest or most viewed videos for a search term this week?
- What is a channel's most popular video of all time, and how big is the channel?
- What is the full description, tag list and exact publish date of each video in a list?

### Who uses this

- 📈 **Marketers and agencies:** track competitor and creator channels and see what they publish and what gets views.
- 🎬 **Creators and analysts:** compare video length, views and upload rhythm across a niche.
- 🔎 **Researchers and journalists:** collect video lists for a topic with dates and links.
- 🤖 **Developers and AI agents:** feed a dashboard, spreadsheet or agent with structured YouTube data.

### Why this YouTube Scraper

- 🆕 **Only new videos:** set `publishedAfter` and schedule the Actor daily. Videos older than the date are skipped and never charged, and a channel read stops as soon as the list gets older than your date.
- 👥 **Channel stats on every row:** channel name, ID, link and subscriber count come with each video from a channel.
- 📺 **Videos, Shorts and live streams:** pick the channel tab, and sort a channel by latest, most popular or oldest.
- 🔍 **Search filters:** sort by upload date, view count or rating, and limit by upload window and video length.
- 🏷️ **$2.00 per 1,000 videos:** one charge per video, with no add-on charges for dates, filters or full details.

### How to use the YouTube Scraper

1. Click **Try for free** (a free Apify account is enough).
2. Add search terms, channel handles such as `@MrBeast`, or video links, one per line.
3. Optional: set a published-after date, the channel tab, a sort order and search filters.
4. Click **Start**, then download as JSON, CSV or Excel, or schedule it for a daily feed.

### Input

| Field | Default | What it does |
|---|---|---|
| `searchTerms` | – | Keywords to search on YouTube, one per line. |
| `channels` | – | Channel handles or links (`@MrBeast`, `/channel/UC...`, `/c/name`), one per line. |
| `videoUrls` | – | Video or Shorts links or 11 character IDs. Each returns the full description, tags and exact date. |
| `publishedAfter` | – | Skip videos older than a date (`2026-11-01`) or a window (`7 days`, `24 hours`, `2 weeks`). |
| `channelTab` | `videos` | `videos`, `shorts` or `streams`. |
| `channelSort` | `latest` | `latest`, `popular` or `oldest`. |
| `searchSort` | `relevance` | `relevance`, `date`, `views` or `rating`. |
| `uploadDate` | `any` | Search window: `hour`, `today`, `week`, `month` or `year`. |
| `videoDuration` | `any` | Search length: `short` (under 4 min), `medium` (4 to 20 min) or `long` (over 20 min). |
| `fetchFullDetails` | `false` | Open every video page for the full description, tags, category and exact date. |
| `maxItems` | 50 | Videos per search, channel or URL (max 2,000). |
| `proxyConfiguration` | off | Optional proxy. YouTube usually answers Apify's servers directly; turn it on if your runs return "YouTube answered HTTP 403" rows. |

Example (the input behind the output below):

```json
{ "searchTerms": ["python tutorial"], "channels": ["@MrBeast"], "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"], "maxItems": 8 }
```

### Output

One row per video. Real rows from that run (descriptions shortened):

```json
{
  "videoId": "K5KVEU3aaeQ",
  "url": "https://www.youtube.com/watch?v=K5KVEU3aaeQ",
  "title": "Python Full Course for Beginners",
  "channelName": "Programming with Mosh",
  "channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
  "channelUrl": "https://www.youtube.com/@programmingwithmosh",
  "channelSubscribers": null,
  "viewCount": 8066167,
  "publishedText": "1 year ago",
  "publishedAt": "2025-11-05T00:00:00.000Z",
  "publishedAtApprox": true,
  "durationSeconds": 7341,
  "isShort": false,
  "isLive": false,
  "description": "Master Python from scratch No fluff—just clear, practical coding skills to kickstart your journey! Want to dive deeper? ...",
  "tags": null,
  "category": null,
  "thumbnailUrl": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hqdefault.jpg",
  "searchQuery": "python tutorial"
}
```

```json
{
  "videoId": "RE3_PGwDwhw",
  "url": "https://www.youtube.com/watch?v=RE3_PGwDwhw",
  "title": "Lose 150 Lbs Together, Win $250,000",
  "channelName": "MrBeast",
  "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "channelUrl": "https://www.youtube.com/@MrBeast",
  "channelSubscribers": 525000000,
  "viewCount": 179000000,
  "publishedText": "2 weeks ago",
  "publishedAt": "2026-10-22T00:00:00.000Z",
  "publishedAtApprox": true,
  "durationSeconds": 2597,
  "isShort": false,
  "isLive": false,
  "description": null,
  "tags": null,
  "category": null,
  "thumbnailUrl": "https://i.ytimg.com/vi/RE3_PGwDwhw/hqdefault.jpg",
  "searchQuery": "@MrBeast"
}
```

- Search results and channel lists show relative ages ("2 weeks ago"). `publishedAt` is counted back from the run time, and `publishedAtApprox` is `true`. Turn on `fetchFullDetails`, or pass the video URL, for the exact timestamp (`publishedAtApprox` is `false`).
- Channel lists show view counts rounded by YouTube (for example 179M). Search results and video pages show exact counts.
- `description` is a snippet in search results, empty in channel lists, and the full text for video URLs or with `fetchFullDetails`. `tags` and `category` are filled only then.
- `channelSubscribers` comes with channel and video-URL rows. YouTube does not show it in search results, so it is `null` there.
- `searchQuery` is the search, channel or URL a video came from. A failed search adds one row with an `error` field and no charge.

### Example tasks

Ready-made inputs you can open, change and run:

- [New videos from YouTube channels in the last 7 days](https://apify.com/redfoxscout/youtube-scraper/examples/youtube-new-videos-last-7-days-from-channels)

### Monitor channels for new videos

Put your channels in `channels`, set `publishedAfter` to `1 day` and schedule the Actor daily in Apify. Each run returns only videos published in the last day, so you pay for new uploads only. Shorts have no date in YouTube's lists, so on the Shorts tab the Actor opens each Short to read its exact date when `publishedAfter` is set.

### How much does it cost?

$2.00 per 1,000 videos.

- 100 videos: about $0.20
- 10,000 videos: about $20.00
- Failed searches and error rows: free. A video that two searches return is charged once. Videos filtered out by `publishedAfter` are not charged.

Apify's free plan gives $5 of credit every month, enough for about 2,500 videos.

### FAQ

**Is this legal?** The Actor reads video pages and lists that YouTube shows to any visitor without logging in. It does not log in, use cookies or accounts, solve CAPTCHAs, or download video or audio. Channel names and links are shown as YouTube displays them. This is not legal advice, so check the terms and rules that apply to how you use the data.

**Does it return comments or transcripts?** No. This Actor returns video and channel data. For comments and replies, use [YouTube Comments Scraper](https://apify.com/redfoxscout/youtube-comments-scraper). It does not return transcripts or video files.

**Why did a video URL come back with an error?** YouTube sometimes answers a single video page with "Sign in to confirm you're not a bot". That row is an error row and is not charged. Run it again later, or find the video through a search or its channel, which use different pages and are not affected.

**How many videos can one search return?** YouTube search and channel lists load page by page and stop after a few hundred to a few thousand results. Set `maxItems` up to 2,000 per search or channel. For deeper history on a channel, use the tab and sort options to reach different slices.

**Why are some subscriber counts empty?** YouTube does not show a channel's subscriber count next to search results. Add the channel to `channels` or the video to `videoUrls` to get it.

**Why do some rows say "YouTube answered HTTP 403"?** YouTube sometimes refuses requests from cloud servers for a while. Those rows are not charged. Run again later, or turn on Apify Proxy in the `proxyConfiguration` input.

### Related Actors

- [YouTube Comments Scraper](https://apify.com/redfoxscout/youtube-comments-scraper): comments and replies from any video, with pinned and creator-heart flags.
- [Google Autocomplete Scraper](https://apify.com/redfoxscout/google-autocomplete-scraper): YouTube and Google search suggestions for video ideas.
- [Telegram Channel Scraper](https://apify.com/redfoxscout/telegram-channel-scraper): posts from public Telegram channels with views, dates and links.
- [Threads Scraper](https://apify.com/redfoxscout/threads-scraper): public Threads posts and profiles with no login.
- [Pinterest Scraper](https://apify.com/redfoxscout/pinterest-scraper): pins and boards from Pinterest searches.
- [Google News Scraper](https://apify.com/redfoxscout/google-news-scraper): news articles by keyword and topic.

# Actor input Schema

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

Keywords to search on YouTube, one per line, e.g. python tutorial or best budget laptop 2026.

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

Channel handles or links, one per line, e.g. @MrBeast, https://www.youtube.com/@mkbhd or https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA.

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

Video or Shorts links, one per line, e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ. Each returns the full description, tags and exact publish date.

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

Skip videos older than a date like 2026-11-01 or a window like 7 days or 24 hours; schedule it daily with 1 day to pay only for new videos.

## `channelTab` (type: `string`):

Which tab of each channel to read, e.g. shorts to list only YouTube Shorts.

## `channelSort` (type: `string`):

Order of a channel's videos, e.g. popular for its all-time top videos.

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

How YouTube orders search results, e.g. upload date for the newest videos first.

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

Only search results uploaded in this window, e.g. week for the past seven days.

## `videoDuration` (type: `string`):

Only search results of this length, e.g. long for videos over 20 minutes.

## `fetchFullDetails` (type: `boolean`):

Open each video page for the full description, tags, category and exact publish date; slower, and the same price per video.

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

Optional. YouTube usually answers Apify's servers directly; if a run returns 'YouTube answered HTTP 403' rows, turn on Apify Proxy here and run again.

## `maxItems` (type: `integer`):

Stop each search after this many results.

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

How many searches run at once.

## Actor input object example

```json
{
  "searchTerms": [
    "python tutorial"
  ],
  "channelTab": "videos",
  "channelSort": "latest",
  "searchSort": "relevance",
  "uploadDate": "any",
  "videoDuration": "any",
  "fetchFullDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxItems": 50,
  "maxConcurrency": 3
}
```

# 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 = {
    "searchTerms": [
        "python tutorial"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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