100 free credits — no credit card required.Start building
Logo
Back to blog

The YouTube Data API in 2026: Quotas, Costs & Real Limits

··24 min read

YouTube API quota: 100 searches exhaust 10,000 daily units. How the quota math works, API key setup, transcript limits, and what to use when you hit it.

The YouTube Data API in 2026: Quotas, Costs & Real Limits

The YouTube Data API v3 is free — and the quota is the real cost. Your project gets 10,000 units per day, and a single search.list call burns 100 of them. That means your entire daily allowance disappears after 100 keyword searches, or about four searches per hour if you spread them evenly.

What 10,000 units actually buys you depends entirely on which methods you call. A pipeline that runs 10 searches, fetches metadata for the results, then pulls comment threads consumes roughly 1,700 units per cycle — leaving room for about five or six cycles before the wall hits. If you're doing paginated search, you'll burn through the quota even faster.


Is the YouTube API free?

Yes — there is no billing meter, no per-request fee, and no credit card required to make calls to the YouTube Data API v3. The YouTube API cost to developers is not measured in dollars.

The real cost is the quota ceiling and the engineering overhead required to stay under it. Every Google Cloud project gets 10,000 units per day. Once those are gone, every subsequent API call fails with a 403 until the quota resets at midnight Pacific Time (08:00 UTC).

One thing no other guide states clearly: there is no self-service option to buy more quota. This is not a free tier with a paid upgrade. If you need more than 10,000 units per day, you must submit the YouTube API Services Audit and Quota Extension Form and wait for Google to manually review your application. The process has no guaranteed timeline. Use cases involving scrapers, bulk data harvesting, or competitive analytics are frequently rejected. Many developers report multi-week waits and approvals that come in below what they requested — or not at all.

Source: developers.google.com/youtube/v3/getting-started

One more clarification before you start building: the YouTube Analytics API is a separate product from the YouTube Data API v3. The Analytics API provides time-series performance metrics for a channel's own videos — but it requires OAuth 2.0 from the channel owner. You cannot use the Analytics API to pull engagement metrics for arbitrary third-party channels. If you're building something that needs historical view trends or audience demographics for channels you don't own, the official Google product stack cannot help you.

Source: developers.google.com/youtube/analytics


How does the YouTube Data API quota work?

The YouTube Data API quota gives every Google Cloud project 10,000 units per day. Each method call deducts a fixed unit cost: search.list costs 100 units, videos.list costs 1 unit, and captions.download costs 200 units. The cost varies dramatically by method — which is where most developers get surprised.

Per-method unit costs

The official quota table from Google's quota documentation:

MethodUnits per callWhat it returns
search.list100Up to 50 video/channel IDs per page
videos.list1Up to 50 video metadata objects
channels.list1Up to 50 channel objects
playlists.list1Up to 50 playlist objects
playlistItems.list1Up to 50 playlist item objects
commentThreads.list1Up to 100 comment threads per page
comments.list1Up to 100 comment objects
captions.list50Caption track metadata only (not transcript text)
captions.download200Caption content (OAuth + video ownership required)
Write operations (videos.insert, etc.)1,600Inserts, updates, deletes

The gap between search.list (100 units) and videos.list (1 unit) is the number that will define your application's architecture. Knowing a video's ID and fetching its metadata costs 1 unit. Finding that video ID via keyword search costs 100.

What 10,000 units actually buys you

This is the table no other guide provides. The arithmetic is simple, but the implications compound quickly once you start building a real pipeline.

Use caseCalls per dayUnits per callUnits consumed% of daily quotaQuota runs out at
Keyword search (no result fetching)100 calls10010,000100%100 searches
Paginated search (3 pages × 50 results)99 calls1009,90099%33 paginated queries
Fetch metadata for 1,000 known video IDs20 calls (50/page)1200.2%500,000 IDs/day
Typical analytics pipeline (10 searches + 500 video fetches + 200 comment threads)mixed1,70017%~5–6 cycles/day
Full upload history for a channel with 5,000 videos100 calls11001%100 channels of this size
Caption downloads (any owned video)1 call2002002%50 downloads/day (OAuth + ownership required)

Source: developers.google.com/youtube/v3/determine_quota_usage

The math most guides skip: search.list is your bottleneck. At 100 units per call, you exhaust the daily quota in exactly 100 search calls — about four calls per hour if spread evenly across a 24-hour day. Build with this ceiling in mind from day one, or you will hit it in production and scramble to redesign your pipeline.

The part parameter adds another wrinkle. Each part you include in a request increases the unit cost of that call. Fetching videos.list with part=snippet costs 1 unit. Adding statistics or contentDetails raises it further. Only request the parts you actually need.

Source: developers.google.com/youtube/v3/getting-started#partial

When you exceed your quota, the API returns an HTTP 403 with this body:

{
  "error": {
    "code": 403,
    "message": "The caller does not have permission",
    "errors": [
      {
        "domain": "youtube.quota",
        "reason": "quotaExceeded"
      }
    ]
  }
}

There is no grace quota. There is no warning before you hit zero. The counter resets at midnight Pacific Time — which is 08:00 UTC in winter and 07:00 UTC in summer. If you exhaust your quota at 11:58 PM Pacific, you have two minutes to wait.


How do I get a YouTube API key?

To get a YouTube API key: create a Google Cloud project, enable the YouTube Data API v3 in the API Library, then generate an API key under Credentials. The full process takes under five minutes and requires no billing information. Here are the six steps:

  1. Go to Google Cloud Console and sign in with a Google account.
  2. Create a new project (or select an existing one). Your quota allocation is per project.
  3. Navigate to APIs & Services → Library.
  4. Search for "YouTube Data API v3" and click Enable.
  5. Navigate to APIs & Services → Credentials → Create Credentials → API Key.
  6. Copy the key. Then click Edit and restrict it to the YouTube Data API v3 — optionally also restrict it to your server's IP or your domain.

Source: developers.google.com/youtube/v3/getting-started

Key restriction matters in production. An unrestricted API key can be used by anyone who finds it in your JavaScript source or a network request. Restricting it to your server's IP ensures that even if the key leaks, it can only be called from your infrastructure.

A minimal working API call

Here is a complete, runnable Python example that fetches metadata for a specific video, handles quotaExceeded and keyInvalid errors, and prints the fields developers most commonly need:

from googleapiclient.discovery import build
from googleapiclient.errors import HttpError

API_KEY = "YOUR_API_KEY_HERE"
VIDEO_ID = "dQw4w9WgXcQ"

def get_video_metadata(video_id: str) -> dict | None:
    """
    Fetch title, view count, like count, and duration for a video.
    Costs 1 quota unit (part=snippet,statistics,contentDetails = 3 parts).
    Returns None if the video is private, deleted, or doesn't exist.
    """
    youtube = build("youtube", "v3", developerKey=API_KEY)

    try:
        response = youtube.videos().list(
            part="snippet,statistics,contentDetails",
            id=video_id
        ).execute()

        items = response.get("items", [])
        if not items:
            print(f"No video found for ID: {video_id}")
            return None

        video = items[0]
        return {
            "title": video["snippet"]["title"],
            "channel": video["snippet"]["channelTitle"],
            "published_at": video["snippet"]["publishedAt"],
            "view_count": video["statistics"].get("viewCount"),
            "like_count": video["statistics"].get("likeCount"),
            "duration": video["contentDetails"]["duration"],  # ISO 8601, e.g. "PT3M42S"
        }

    except HttpError as e:
        reason = e.error_details[0]["reason"] if e.error_details else "unknown"
        if reason == "quotaExceeded":
            print("Daily quota exhausted. Resets at midnight Pacific Time.")
        elif reason == "keyInvalid":
            print("API key is invalid or not enabled for YouTube Data API v3.")
        else:
            print(f"API error {e.resp.status}: {reason}")
        return None

if __name__ == "__main__":
    metadata = get_video_metadata(VIDEO_ID)
    if metadata:
        for key, value in metadata.items():
            print(f"{key}: {value}")

Install the client library with pip install google-api-python-client.

API key vs OAuth 2.0: which do you need?

Every tutorial mentions that both exist. None of them gives you a clear decision rule. Here it is:

You needAuth methodWhy
Public video/channel/playlist metadataAPI keyPublic data; no user sign-in required
Search results by keywordAPI keysearch.list is public
Comments on a public videoAPI keycommentThreads.list is public
A user's liked videos or subscriptionsOAuth 2.0User-private data; user must grant consent
Upload a video on behalf of a userOAuth 2.0Write operation; requires user delegation
Download captions for a video you ownOAuth 2.0captions.download requires ownership
Your own channel's Analytics dataOAuth 2.0 (YouTube Analytics API)Separate product; owner-only access

The single most important rule: you cannot use an API key to access any data that a YouTube user has not made fully public. Private or unlisted videos return a 404 to API key requests — the video appears not to exist. For anything that requires acting on behalf of a user (read their private data, write anything), you need OAuth 2.0 with appropriate scopes.

Source: developers.google.com/youtube/v3/guides/authentication


Can you get YouTube transcripts via the API?

No — not for arbitrary public videos via the official API. This is the most common misconception in the YouTube developer ecosystem, and it costs people hours of debugging before they find the truth buried in the docs.

Here is the honest breakdown:

captions.list (50 units): Lists the caption tracks available for a video. Returns track metadata — the track ID, language, kind (standard vs. ASR auto-generated), and whether it is closable. It does not return transcript text.

captions.download (200 units): Downloads the actual caption content in text form. Here is the critical restriction: this endpoint requires OAuth 2.0 authentication, and the authenticated user must own the video (or have appropriate channel manager permissions). If you attempt to download captions for a video you do not own, you receive a 403. This is not a bug you can work around — it is an intentional access control.

Source: developers.google.com/youtube/v3/docs/captions Source: developers.google.com/youtube/v3/docs/captions/download

There is no official YouTube Data API endpoint to retrieve auto-generated transcripts for arbitrary public videos. The auto-captions visible in the YouTube player are not exposed to third-party developers through the official API.

The de-facto workaround: youtube-transcript-api

The most widely adopted workaround is the youtube-transcript-api Python library. It reverse-engineers YouTube's internal /api/timedtext endpoint — the same one the YouTube player uses — to fetch auto-captions for any video where captions exist and are not disabled.

Install it with pip install youtube-transcript-api. A minimal fetch looks like:

from youtube_transcript_api import YouTubeTranscriptApi

# Fetches the auto-generated English transcript for a public video
transcript = YouTubeTranscriptApi.get_transcript("dQw4w9WgXcQ", languages=["en"])
for segment in transcript[:3]:
    print(f"[{segment['start']:.1f}s] {segment['text']}")

Caveats you need to know before using this in production:

  • This is not an official API. YouTube can break it without notice by changing the internal endpoint or adding bot detection — and they have done so in the past.
  • It works only for videos where captions exist (auto-generated or manually uploaded) and are not disabled by the uploader.
  • No documented rate limits exist, but aggressive use at scale can result in IP blocks.
  • No SLA, no support channel, no guarantee of continued operation.

Use youtube-transcript-api for personal projects, low-volume research, one-off data collection, or prototypes where production reliability is not a hard requirement. Do not build a customer-facing product on top of it without a fallback plan.

If you're already dealing with unofficial scraping approaches for other platforms — the same patterns that apply to getting TikTok data without an official API apply here — you know how quickly these break in production.


What else can't you do with the YouTube Data API?

This is the developer spec sheet the official docs avoid writing. These are hard limits, not missing features waiting for a version bump:

Search results cap at 500 per query. search.list supports pagination via pageToken, but only up to 10 pages of 50 results. There is no 501st result, regardless of what filters you apply. Historical bulk collection for a topic — say, every video about a brand posted in the last year — is impossible within the official API's constraints.

Source: developers.google.com/youtube/v3/docs/search/list

No "oldest first" sort for keyword search. You can sort search results by relevance, date (newest first), view count, or rating. You cannot retrieve the oldest-first results for a keyword, which makes chronological corpus collection impractical.

No bulk history endpoint. To retrieve all videos uploaded by a channel, you page through playlistItems.list on the channel's uploads playlist. That costs 1 unit per call × however many pages of 50 items it takes. A channel with 5,000 videos requires 100 API calls. A network of 50 such channels consumes 5,000 units — half your daily quota — before you have done anything with the data.

Source: developers.google.com/youtube/v3/docs/playlistItems/list

Comments are frequently disabled. commentThreads.list returns a commentsDisabled error for any video where the owner has turned off comments. This affects a significant fraction of videos — particularly in news, children's content, and high-controversy categories. Your application must handle this gracefully rather than treating it as an unexpected error.

Source: developers.google.com/youtube/v3/docs/commentThreads/list

No engagement time-series for third-party channels. The Data API v3 gives you point-in-time view counts and like counts when you call videos.list. It does not give you historical view trends over time. That data lives in the YouTube Analytics API — which, again, requires OAuth 2.0 from the channel owner. You cannot get a competitor's historical view trajectory through any official API endpoint.

The part parameter tax compounds. Every additional part you request increases the unit cost of that call. Request only the part values your code actually reads. This sounds obvious but gets missed when you copy-paste example code that fetches five parts to display one field.

No pay-for-quota path. As noted above: you cannot purchase quota. The audit form is the only path, and it routinely rejects data-heavy use cases.

For comparison across social media APIs, YouTube's official API is actually less permissive than several other platforms' equivalents — the hard quota ceiling and the transcript access restriction are genuine pain points that competing platforms' APIs handle differently.


YouTube API vs scraping vs unified social APIs: what to use at scale

When the 10,000-unit wall blocks you, you have three realistic options. Here is an honest comparison — no winner is declared upfront, because the right answer depends on your use case.

YouTube Data API v3Unofficial libraries (yt-dlp, youtube-transcript-api)Unified social API (e.g., SocialCrawl)
Daily call limit10,000 units (100 searches)None documented; IP-block risk at scaleCredit-based; no YouTube quota wall
Transcript accessNo (owned videos only, OAuth required)Yes (unofficial, can break without notice)Yes (first-class endpoint)
Multi-platformYouTube onlyYouTube only42+ platforms, one schema
PricingFree (no pay-for-quota option)Free (no SLA)Credit packs, never expire
Production-readyYes (with quota management)No (ToS risk, no SLA)Yes
Auth overheadAPI key or OAuth 2.0 per projectNoneOne API key
Historical bulk dataLimited (500 results per query cap)Possible but fragile at scaleYes
Computed fieldsRaw data onlyRaw data onlyengagement_rate, estimated_reach, content_category
Comments disabled handlingReturns commentsDisabled errorN/AHandled server-side

Decision logic:

Use the official YouTube Data API v3 when: you need real-time YouTube data within the quota ceiling, ToS compliance is a hard requirement, your use case fits within 100 search calls per day, and you're not building on transcript access for third-party videos.

Use unofficial libraries when: you're running personal scripts, low-volume research, or one-off data collection where production reliability is not required and the ToS risk is acceptable for your context.

Use a unified social data API when: you need more than 100 YouTube search calls per day, you need transcript retrieval for arbitrary public videos, you're building a product that spans multiple platforms, or you need a stable production endpoint with a real SLA rather than an unofficial endpoint that can break at any moment.

For a broader look at the social media scraping APIs available for production use, that post covers the full landscape.


Keeping your app alive when the quota runs out: retry patterns and caching

The quotaExceeded 403 is not the only failure mode, but it is the most consequential — because unlike a transient network error, it does not resolve itself after a few seconds. It resolves at midnight Pacific Time.

Good defensive code handles the 403 correctly rather than crashing, logging an opaque error, or retrying in a tight loop that burns the remaining quota on retries for other calls.

Here is a production-grade retry wrapper with exponential backoff and jitter:

import time
import random
from googleapiclient.errors import HttpError

def execute_with_backoff(request, max_retries: int = 5):
    """
    Execute a YouTube API request with exponential backoff for transient errors.

    Raises immediately on quotaExceeded (no point retrying — quota is gone
    until midnight Pacific). Backs off on 500/503 server errors.
    Raises on all other errors.
    """
    for attempt in range(max_retries):
        try:
            return request.execute()

        except HttpError as e:
            status = e.resp.status
            content = e.content.decode("utf-8") if e.content else ""

            if status == 403 and "quotaExceeded" in content:
                # Quota is gone for today. Retrying will not help.
                raise RuntimeError(
                    "YouTube API daily quota exhausted. "
                    "Resets at midnight Pacific Time (08:00 UTC)."
                ) from e

            elif status in (500, 503):
                # Transient server error — back off and retry
                if attempt == max_retries - 1:
                    raise  # Last attempt failed; surface the original error
                wait = (2 ** attempt) + random.uniform(0, 1)
                print(f"Server error {status}. Retrying in {wait:.1f}s (attempt {attempt + 1}/{max_retries})")
                time.sleep(wait)

            else:
                # Anything else (404, keyInvalid, forbidden) — raise immediately
                raise

    raise RuntimeError(f"Max retries ({max_retries}) exceeded")

Why jitter matters: Without the random.uniform(0, 1) offset, every instance of your application backs off by the same amount after a server error — then hammers the API simultaneously when the wait expires. Jitter spreads the retry storm across a random window, reducing the thundering herd effect.

Raise immediately on quotaExceeded: Retrying a 403 quota error does not recover quota. It just wastes time and may affect other calls queued behind it. Fail fast, log clearly, and either switch to a backup data source or queue the work for after midnight Pacific.

Cache aggressively. Video metadata — title, description, channel name, like count, view count — does not change by the minute. Cache videos.list responses for at least an hour. For channels that post infrequently, 24 hours is reasonable. Caching is the highest-leverage quota optimization available: every cache hit saves a real unit.

Prefer videos.list over search.list when you already have the ID. If your application maintains a database of video IDs from a previous collection pass, fetching fresh metadata costs 1 unit per call. Running a new search.list to find the same video costs 100. The 100× difference compounds across any real pipeline.

Track your unit budget yourself. Google does not return remaining quota in the API response. You must instrument your own call counter — log units consumed per call type, aggregate per day, and alert when you approach a threshold (say, 80% of daily quota). Without this, quota exhaustion appears as an opaque 403 in production.


Frequently asked questions about the YouTube API

Is the YouTube API free?

Yes. The YouTube Data API v3 has no monetary charge per request. There is no billing meter and no credit card required to use it. The cost is the 10,000 unit per day quota ceiling and the engineering overhead to manage it. There is no pay-for-quota option — the only path to a higher limit is a manual audit form that Google reviews at its own pace, with no guaranteed approval.

Source: developers.google.com/youtube/v3/getting-started

What is the YouTube API daily quota limit?

The YouTube API daily quota is 10,000 units per project, resetting at midnight Pacific Time. Which methods you call determines how far that budget stretches: search.list (100 units/call) allows only 100 searches maximum, while videos.list (1 unit/call) allows up to 10,000 metadata fetches. A typical analytics pipeline combining searches, metadata fetches, and comment pulls costs around 1,700 units per cycle — leaving room for five or six cycles per day.

Source: developers.google.com/youtube/v3/determine_quota_usage

How much does the YouTube API cost?

The YouTube API is free to use — there is no per-call fee, no billing meter, and no credit card required. The only cost is indirect: the 10,000 unit daily quota limits what you can do. There is no paid tier to buy additional quota. The sole path to a higher limit is submitting the YouTube API Services Audit and Quota Extension Form for manual Google review, with no guaranteed outcome or timeline.

Source: developers.google.com/youtube/v3/getting-started

How do I get a YouTube API key?

Go to Google Cloud Console, create or select a project, navigate to APIs & Services → Library, enable "YouTube Data API v3," then go to Credentials → Create Credentials → API Key. Restrict the key to the YouTube Data API v3 and your server's IP or domain before deploying it anywhere. The full step-by-step with a working Python example is in the API key setup section above.

Source: developers.google.com/youtube/v3/getting-started

Can I get YouTube video transcripts with the API?

Not for arbitrary public videos. The official captions.download endpoint (200 units/call) requires OAuth 2.0 authentication and the authenticated user must own the video. For third-party public videos, this returns a 403. There is no official API endpoint to retrieve auto-generated transcripts for videos you do not own. The de-facto workaround is the youtube-transcript-api Python library, which reverse-engineers an internal YouTube endpoint — but it carries no SLA and can break without notice.

Source: developers.google.com/youtube/v3/docs/captions/download

What is the difference between a YouTube API key and OAuth 2.0?

An API key authenticates your project and grants read-only access to public YouTube data. OAuth 2.0 authenticates an individual user and grants access to data they own or have permission to access. Decision rule: use an API key for public videos, channels, search results, and comments. Use OAuth 2.0 when you need to act on behalf of a specific user — reading their private videos, uploading to their channel, downloading captions for their videos, or accessing their YouTube Analytics data.

Source: developers.google.com/youtube/v3/guides/authentication

How do I increase my YouTube API quota?

Submit the YouTube API Services Audit and Quota Extension Form at support.google.com/youtube/contact/yt_api_form. The form requires demonstrating ToS compliance and explaining your use case and target quota level. Google reviews applications manually with no guaranteed timeline. Use cases involving data scraping, bulk harvesting, or competitive analytics are routinely rejected. There is no self-service option — you cannot pay for a higher quota.

Source: support.google.com/youtube/contact/yt_api_form

What are the best alternatives to the YouTube Data API for getting data at scale?

For low-volume personal use where ToS risk is acceptable: unofficial libraries like yt-dlp and youtube-transcript-api work without any API quota. For production use at scale — more than 100 search calls per day, transcript access for arbitrary public videos, multi-platform coverage, or a stable endpoint with a real SLA — unified social APIs are the practical answer. SocialCrawl covers YouTube video metadata, channel stats, comments, and transcripts alongside 42 other platforms under a single API key, without YouTube's per-unit quota ceiling.


Before scoping a YouTube data pipeline, run your expected call patterns through Google's quota calculator — it makes the ceiling concrete before you discover it in production.

If you want to see YouTube data through a production API before writing a single line of code, the SocialCrawl Explorer lets you query YouTube videos, channels, comments, and transcripts directly in your browser.

Topics
#youtube-api#youtube-data-api#youtube-api-key#youtube-api-quota#youtube-transcript-api#youtube-api-cost#youtube-api-alternative#youtube-data-api-v3

Related posts