DEV Community

agenthustler
agenthustler

Posted on

Scraping YouTube in 2026: Channels, Videos & Search Without API Keys

If you've ever tried to collect YouTube data at scale, you've hit the wall: the official YouTube Data API v3 gives you 10,000 quota units per day. That sounds like a lot until you realize a single search query costs 100 units, and fetching video details costs 1 unit per video. Need to monitor 500 channels daily? You'll blow through your quota before lunch.

In this guide, I'll show you how to scrape YouTube channels, videos, and search results without API keys — using yt-dlp, the most reliable YouTube extraction tool available, and a ready-to-use Apify actor that wraps it into a scalable cloud solution.

Why yt-dlp Is the Right Foundation

If you've been in the YouTube data extraction space for any length of time, you've probably heard of youtube-dl. It was the original command-line tool for downloading YouTube videos. yt-dlp is its successor — and it has surpassed the original in every way.

By the numbers:

  • 85,000+ GitHub stars
  • 1,000+ contributors
  • Multiple releases per week
  • Fixes for YouTube changes typically ship within hours

yt-dlp doesn't just download videos. It's a metadata extraction powerhouse. You can pull structured data from YouTube without downloading a single frame of video. And because it uses YouTube's internal data endpoints (not web scraping), it's far more resilient to frontend changes than browser-based scrapers.

Here's a quick example of extracting metadata locally:

# Extract video metadata as JSON (no download)
yt-dlp --dump-json --no-download "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Enter fullscreen mode Exit fullscreen mode

This returns a JSON object with 100+ fields: title, description, view count, like count, upload date, duration, tags, categories, chapters, thumbnails, channel subscriber count, and much more.

What Data Can You Extract?

From Videos

Every YouTube video exposes a rich set of metadata:

Field Example
Title "Never Gonna Give You Up"
View count 1,500,000,000+
Like count 16,000,000+
Upload date 2009-10-25
Duration 212 seconds
Description Full text
Tags ["rick astley", "music video", ...]
Categories ["Music"]
Channel name "Rick Astley"
Channel subscribers 8,000,000+
Thumbnail URLs Multiple resolutions
Chapters Timestamped sections
Language Auto-detected

From Channels

When you point yt-dlp at a channel URL, you get:

  • Channel name and description
  • Subscriber count
  • Total video count
  • A list of all uploaded videos (with their metadata)
  • Channel profile and banner images

From Search Results

You can extract YouTube search results for any query:

  • Video titles and URLs matching your search
  • Channel results
  • Playlist results
  • Metadata for each result (views, upload date, duration)

Three Practical Use Cases

1. Competitor Analysis

Say you're a marketing agency managing a brand's YouTube presence. You need to track 10 competitor channels: what they're publishing, how their videos perform in the first 48 hours, which topics get the most engagement.

import requests
import json

API_TOKEN = "your_apify_token"
ACTOR_ID = "cryptosignals/youtube-scraper"

# List of competitor channels to monitor
competitors = [
    "https://www.youtube.com/@competitor1",
    "https://www.youtube.com/@competitor2",
    "https://www.youtube.com/@competitor3",
]

# Run the scraper
response = requests.post(
    f"https://api.apify.com/v2/acts/{ACTOR_ID}/runs",
    params={"token": API_TOKEN},
    json={"urls": competitors}
)

run_data = response.json()["data"]
print(f"Scraping {len(competitors)} channels — Run ID: {run_data['id']}")
Enter fullscreen mode Exit fullscreen mode

Once the run completes, you can fetch the dataset and analyze upload frequency, average view counts, top-performing topics, and engagement ratios — all without a single YouTube API key.

2. Content Research

Before creating a video, smart creators research what's already working. You want to know: for a given topic, what videos exist, how many views do they have, and what gaps can you fill?

# Search for a topic and analyze the results
search_input = {
    "urls": [
        "https://www.youtube.com/results?search_query=python+web+scraping+tutorial+2026"
    ]
}

response = requests.post(
    f"https://api.apify.com/v2/acts/{ACTOR_ID}/runs",
    params={"token": API_TOKEN},
    json=search_input
)
Enter fullscreen mode Exit fullscreen mode

From the results, you can build a spreadsheet of existing content: titles, view counts, channel sizes, and upload dates. This tells you whether the topic is saturated or has room for new content, and what angle might differentiate your video.

3. Influencer Discovery

Brands looking for YouTube influencers need to evaluate channels across multiple dimensions: subscriber count, average views per video, upload consistency, and content relevance. Manually checking each channel is tedious. With automated scraping, you can:

  1. Search for niche keywords to find channels in your space
  2. Extract channel-level metrics (subscribers, total videos, recent upload frequency)
  3. Pull video-level data to calculate average engagement rates
  4. Compare influencers side-by-side in a structured dataset
# After fetching results, calculate engagement metrics
results = requests.get(
    f"https://api.apify.com/v2/actor-runs/{run_id}/dataset/items",
    params={"token": API_TOKEN}
).json()

for channel in results:
    name = channel.get("channel", "Unknown")
    subscribers = channel.get("channel_follower_count", 0)
    views = channel.get("view_count", 0)

    if subscribers > 0:
        engagement = views / subscribers
        print(f"{name}: {subscribers:,} subs, engagement ratio: {engagement:.1f}")
Enter fullscreen mode Exit fullscreen mode

Running at Scale with Apify

While yt-dlp works great locally, running it at scale introduces challenges:

  • IP rate limiting: YouTube throttles requests from single IP addresses
  • Concurrency: Processing thousands of URLs sequentially is slow
  • Infrastructure: You need a server running 24/7 for scheduled scraping

This is where the YouTube Scraper actor on Apify comes in. It wraps yt-dlp in Apify's cloud infrastructure, giving you:

  • Automatic proxy rotation to avoid IP blocks
  • Parallel execution across multiple containers
  • Scheduled runs (daily, hourly, or custom cron)
  • Built-in storage with API access to results
  • Webhooks to trigger your pipeline when data is ready

Using curl to Trigger a Run

If you prefer working with curl:

# Start a scraping run
curl -X POST \
  "https://api.apify.com/v2/acts/cryptosignals~youtube-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://www.youtube.com/watch?v=jNQXAC9IVRw",
      "https://www.youtube.com/@GoogleDeepMind"
    ]
  }'

# Get results from the default dataset
curl "https://api.apify.com/v2/acts/cryptosignals~youtube-scraper/runs/last/dataset/items?token=YOUR_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Scheduling Recurring Scrapes

On Apify, you can schedule the actor to run automatically:

  1. Go to the actor page on Apify
  2. Click "Schedule"
  3. Set your cron expression (e.g., 0 8 * * * for daily at 8 AM)
  4. Configure your input (list of URLs to scrape)
  5. Optionally set up a webhook to POST results to your server

This is ideal for daily competitor monitoring or weekly content research pipelines.

Tips for Effective YouTube Scraping

1. Batch your requests. Instead of running the actor once per URL, pass all URLs in a single run. This is more efficient and cheaper on compute units.

2. Use channel URLs for bulk extraction. If you need all videos from a channel, pass the channel URL rather than individual video URLs. The scraper will enumerate all uploads automatically.

3. Store results incrementally. Use Apify's named datasets to append results from each run. This gives you a historical record you can query for trend analysis.

4. Respect rate limits. Even with proxy rotation, avoid scraping the same URLs more than necessary. Cache results and only re-scrape when you need fresh data.

5. Filter output fields. If you only need titles and view counts, specify which fields to return. This reduces storage costs and speeds up data processing downstream.

Wrapping Up

YouTube scraping in 2026 doesn't require API keys, quota management, or fragile web scrapers. Tools like yt-dlp have matured to the point where metadata extraction is reliable, fast, and comprehensive.

If you want the power of yt-dlp without managing infrastructure, the YouTube Scraper on Apify gives you a cloud-native solution with proxy rotation, scheduling, and API access out of the box.

→ Try YouTube Scraper on the Apify Store


Have questions about YouTube scraping or want to share your use case? Drop a comment below — I'm happy to help.

Top comments (0)