Guide · Social media APIs for developers

YouTube API key: how to get one and what the daily quota buys

By Antoine Blanco··7 min read

A YouTube API key takes four steps in the Google Cloud console: create a project, enable YouTube Data API v3, open Credentials, create the key. It reads public data only. Uploading a video, reading your own analytics or replying to a comment needs OAuth 2.0 instead, and the daily quota is what actually limits you.

Everything below was read on the YouTube Data API documentation on November 10, 2026.

How to get a YouTube API key

You need a Google account. The console is free to open; the YouTube Data API itself has no per call charge, only a quota.

  1. Open the Google Cloud console and create a project, or select one you already own.
  2. Open the API Library and enable YouTube Data API v3. If it is not enabled, every request answers with a 403 whatever your credentials look like.
  3. Open the Credentials page.
  4. Select Create credentials > API key. The key appears immediately.
  5. Select Restrict key before you ship anything.

Google's own wording on that last point: "Restrict the key before using it in production." Two restrictions matter. An API restriction limits the key to the YouTube Data API, so a leaked key cannot be spent on other Google services. An application restriction limits it to your server IP addresses, your HTTP referrers or your app signature.

A key goes on the request as a query parameter:

curl "https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&id=VIDEO_ID&key=YOUR_API_KEY"

Which means it travels in URLs, in server logs and in browser history. Treat it as public once it is in client side code, and keep anything that costs you real quota behind your own backend.

API key or OAuth: the YouTube API credentials you actually need

This is where most people lose an afternoon. The key is not a login. It identifies your project for billing and quota, not a user.

Google states the rule plainly: "Use an API key for requests that only retrieve public data, such as public video metadata or search results." For anything else, your application "must use the OAuth 2.0 protocol."

What you want to do Method Credential
Read a public video's views and title videos.list API key
Search public videos search.list API key
Read a public channel's subscriber count channels.list API key
Upload a video videos.insert OAuth 2.0
Update or delete your own video videos.update, videos.delete OAuth 2.0
Reply to a comment comments.insert OAuth 2.0
Set a thumbnail thumbnails.set OAuth 2.0
Read your own channel with mine=true channels.list OAuth 2.0

So: if you searched for a YouTube API key because you want a bot that uploads your videos, the key is not the thing you need. You need an OAuth client ID, a consent screen, a refresh token and, once you go past test users, Google's verification review. Creating the client ID is the same Credentials page: Create credentials > OAuth client ID, then pick the application type.

The token half of that work is the same on every network, and it is the part that keeps breaking months later. Social media access tokens covers refresh, expiry and silent disconnections across platforms.

What the daily quota buys

YouTube does not count calls, it counts units. The documentation describes the default allocation in three pools:

The unit costs that matter, straight from the quota table:

Method Cost in units What it does
videos.list 1 Read video metadata and statistics
channels.list 1 Read channel data
playlists.list 1 Read playlists
commentThreads.list 1 Read top level comments
comments.list 1 Read replies
playlistItems.insert 50 Add a video to a playlist
comments.insert 50 Post a comment or reply
thumbnails.set 50 Set a custom thumbnail
captions.insert 400 Upload a caption track

Reads are cheap, writes are not. A caption upload costs 400 units, so 25 of them exhaust the main pool on their own. And every request counts, including the ones that fail: invalid requests cost at least one unit, so a retry loop against a bad parameter burns quota just as fast as real work.

The quota numbers that surprise people

Three things catch teams out.

Search is its own pool, and it is small. A hundred search.list calls a day is nothing for a discovery feature. If you are building search over YouTube, you cache results or you apply for more quota through the extension form. Paging through results costs a call per page, so one user scrolling four pages spends four of your hundred.

Uploads are capped by count, not by units. A hundred videos.insert calls a day sounds generous until you run a multi channel operation. The cap is per project, not per channel, so ten channels share the same hundred.

Quota resets on Pacific time, not yours. The daily counter rolls over at midnight Pacific. If your scheduler fires at midnight in Paris, you are spending the previous day's allowance.

When you need more, the console's Quotas page shows usage and Google provides a quota extension form. Expect to describe your use case and to wait. The documentation also warns that the default allocation is "subject to change", which is a reason to log your unit spend rather than assume today's numbers hold forever.

Writing to YouTube and seven other networks

If YouTube is the only platform you touch, build it yourself: one OAuth client, one refresh token, done. The arithmetic changes when YouTube is one network out of several, because every platform ships a different OAuth flow, a different review and a different quota model. The social media API guide lays those differences out side by side, and social media analytics API covers why the same metric reads differently per network.

That is the gap PlugKit fills. It connects Instagram, Facebook, LinkedIn, TikTok, YouTube, X, WhatsApp and Telegram behind one REST API and one hosted MCP server at https://api.plugkit.co/mcp, handles the OAuth and the token refresh, and is $49 a month for 5 connected accounts, cancel anytime. Seven days free, with a card at sign up and nothing charged before day 7.

It does not remove YouTube's quota, and nothing can: the quota belongs to whoever owns the API project. What it removes is the per platform credential work. If you only ever needed public video metadata, a plain API key and 30 lines of code remain the right answer, and you should take that one.

FAQ

Is the YouTube API key free?

Yes. The YouTube Data API has no per call price. What you get instead is a daily quota, by default 10 000 units for general endpoints plus separate pools of 100 search calls and 100 uploads. Going beyond it means requesting an extension, not paying a bill.

Can I upload a video with just a YouTube API key?

No. Uploads go through videos.insert, and Google requires OAuth 2.0 for every insert, update and delete. The API key identifies your project, it does not authorise an action on a channel. You need an OAuth client ID, user consent and a refresh token.

How do I get a YouTube API key for free?

Create a Google Cloud project, enable YouTube Data API v3 in the API Library, open Credentials and choose Create credentials, then API key. No card is required for the Data API quota. Restrict the key to the YouTube Data API before putting it in production.

What happens when I hit the YouTube API quota?

Requests answer with a 403 and the reason quotaExceeded until the counter resets at midnight Pacific time. Nothing is charged and nothing is throttled gradually: you simply stop until the reset, which is why batching reads and caching search results matters more than optimising single calls.

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

A key identifies your project and only reads public data. OAuth credentials identify a user who has granted your app access, which is what lets you upload, edit, comment or read private channel data. Many projects need both, the key for public reads and OAuth for everything on the user's own channel.

AB
Antoine BlancoFounder of PlugKit. Runs his own Instagram, YouTube and X accounts through the API and MCP server described here.

One plug for every platform your agent touches

$49 a month for 5 connected accounts, cancel anytime. Every feature in every plan.

Get your API key →
English ▾