Introducing the Instagram APIRead more →

Guide · Python · Updated

YouTube API Quota Exceeded? Get Comments and Channels Without It

The YouTube Data API is free within a daily quota, and more quota takes Google's audit. Here is when the quota runs out, the ways around it, and the same data from one API key.

To get YouTube comments and channel data past the Data API's quota, you can spend fewer units, ask Google for more through its audit, download pages with yt-dlp, or call a hosted YouTube API that has no daily quota. The first two keep you on the official API. The other two read YouTube's public pages instead.

This guide shows where the quota runs out, compares the ways around it, and reads comments, channels and videos with SocialTap.

What the quota allows

A Google Cloud project gets 10,000 units a day for every method but search and uploads, and search has its own limit of 100 calls a day. Most reads cost one unit:

MethodUnits per callWhat it returns
commentThreads.list1A page of up to 100 top-level comments
comments.list1A page of a comment's replies
channels.list1Channels by ID or handle
videos.list1Videos by ID
search.list1A page of results, within 100 searches a day

"All API requests, including invalid requests, incur at least a one-point quota cost", in Google's words, so retries and mistakes count too. The quota resets at midnight Pacific time.

When it runs out

Reading the comments of a few videos fits in the default quota. It runs out in three common cases:

  • Search. At 100 searches a day, finding videos or channels by keyword stops long before the units do.
  • One project for many jobs. Every script, teammate and environment on the project draws from the same 10,000 units.
  • Polling. Checking thousands of videos or channels on a schedule spends units on every check, changed or not.

More quota takes a compliance audit: you show that your project follows YouTube's API terms, then send the Audit and Quota Extension Form, and YouTube's API team replies when it has reviewed it.

The ways around it, compared

OptionDaily limitWhat you set up
Cache results and spend fewer unitsThe same quotaCode to cache and batch IDs
A quota extensionWhat Google grantsAn audit and a form
yt-dlp, with --write-commentsNone from the APIYour own servers, often blocked on cloud IPs
Scraper platforms such as ApifyNoneActors you configure, billed per result
A hosted YouTube API such as SocialTapNoneOne API key

yt-dlp reads public pages, so it has no quota, but YouTube blocks many cloud servers, as the youtube-transcript-api guide explains. A hosted API handles the proxies and blocks for you.

A video's comments with one API key

SocialTap reads YouTube's public pages when you ask and returns live data in one schema, with no Google Cloud project and no quota. Install the SDK:

Install
pip install socialtap

Get a key on the signup page and set it as SOCIALTAP_API_KEY. Every account starts with 100 free credits. This walks a video's comments, 20 a page, newest first or in YouTube's Top ranking:

Python SDK
from socialtap import SocialTap, APIError, NotFoundError, PrivateOrUnavailableError

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

try:
    # Stops at the end of the list, or at the first guard it reaches.
    items = client.youtube.comments.iterate(url="jNQXAC9IVRw", sort="newest", max_pages=10, max_credits=100)
    for item in items:
        print(item)
    print(items.pages_fetched, items.credits_charged, items.stop_reason, items.end_reason)
except NotFoundError as err:
    # The item does not exist or was deleted.
    print(err.code, err.remediation)
except PrivateOrUnavailableError as err:
    # The item exists but isn't public: it is private, age- or region-restricted, or needs a login.
    print(err.code, err.remediation)
except APIError as err:
    # Retryable errors reach you only after the SDK's own retries. Failed requests cost no credits.
    print(err.code, err.status, err.retryable, err.remediation, err.request_id)

Each comment has its text, posting time, like and reply counts, the commenter's handle and channel, and whether it is pinned, hearted or by the creator. A comment's replies come from YouTube Comment Replies API, with the comment's link.

A channel and its videos

This reads a channel from its handle or link, with its subscriber count and exact video and view counts:

Python SDK
from socialtap import SocialTap

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

res = client.youtube.profile.get(handle="@NASA")
print(res.data)
print(res.credits.charged, res.meta.request_id)

From Data API methods to SocialTap

Data APISocialTapEndpoint
commentThreads.listclient.youtube.comments.iterate()YouTube Comments API
comments.list, for repliesclient.youtube.replies.iterate()YouTube Comment Replies API
channels.listclient.youtube.profile.get()YouTube Channel API
playlistItems.list, a channel's uploadsclient.youtube.posts.iterate()YouTube Channel Videos API
videos.listclient.youtube.post.get()YouTube Video API
search.listclient.youtube.search_posts.iterate()YouTube Search API

What it costs

You pay per successful request, and a list request returns a page:

  • Comments: $0.04–$0.10 per 1,000 comments.
  • A channel's videos: $0.02–$0.04 per 1,000 posts.
  • Search results: $0.03–$0.07 per 1,000 posts.

Failed requests and cache hits cost nothing, and there's no daily cap to plan around. The YouTube API page compares the official API's quota and terms with ours.

Frequently asked questions

How much quota does the YouTube Data API give?

10,000 units a day per Google Cloud project, for every method but search and uploads. Search has its own limit of 100 calls a day. Most reads, comments included, cost one unit per call.

Back to contents

What happens when the YouTube API quota is exceeded?

Requests fail with a quotaExceeded error until the quota resets at midnight Pacific time. Invalid requests cost at least one unit too, so retries don't help.

Back to contents

How do I get more YouTube API quota?

Pass YouTube's compliance audit, then send its Audit and Quota Extension Form. YouTube's API team reviews the request and replies.

Back to contents

How do I scrape YouTube comments without the API?

Send the video's link to a hosted YouTube API such as SocialTap. It returns the top-level comments a page at a time, newest first or in YouTube's Top ranking, with no Google Cloud project or quota.

Back to contents

Does it work on Shorts and live replays?

Yes. Comments come from videos, Shorts and live replays alike, from a watch link, a Shorts link, a youtu.be link or the video's ID.

Back to contents

Replace the YouTube Data API with one API key.

Get a key, run the code above and see live data in a minute. Failed requests are free.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 319 endpoints
Start for free Read the docs