DEV Community

Алексей Спинов
Алексей Спинов

Posted on

YouTube Has a Hidden API That Needs No API Key — Here's How to Use It

YouTube's official Data API v3 has strict quota limits (10,000 units/day). But YouTube.com itself uses an internal API called Innertube that has no quota limits and needs no API key.

What is Innertube?

Innertube is YouTube's internal API that powers the website and mobile apps. When you load youtube.com, your browser calls youtubei/v1/ endpoints to fetch video data, comments, search results, and more.

How to Access It

const response = await fetch("https://www.youtube.com/youtubei/v1/search", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    context: {
      client: {
        clientName: "WEB",
        clientVersion: "2.20240101"
      }
    },
    query: "web scraping tutorial"
  })
});

const data = await response.json();
Enter fullscreen mode Exit fullscreen mode

What Data You Can Get

Endpoint Data
/v1/search Search results with titles, views, channels
/v1/browse Channel videos, playlists
/v1/next Comments, recommendations
/v1/player Video metadata, formats

Key Advantages Over Official API

  • No API key required — just send POST requests
  • No quota limits — YouTube.com makes thousands of calls per session
  • More data fields — includes internal metrics not in official API
  • Comment replies — full comment threads including nested replies

Extracting Comments

The newer commentEntityPayload format (from frameworkUpdates.entityBatchUpdate.mutations) provides:

  • Comment text and author
  • Like count and reply count
  • Whether the creator hearted the comment
  • Author channel ID
  • Whether author is verified

Resources


Need YouTube data extracted? I'll scrape any YouTube channel, comments, or search results for $20. Email: Spinov001@gmail.com | All services →

Top comments (0)