Taskwind
Start free trial

YouTube API key: how to get one, what it can do, and the 2026 quota

By Natnael Girma · Published · Checked

To get a YouTube API key, open the Google Cloud console, create a project, enable YouTube Data API v3, then go to APIs & Services > Credentials > Create credentials > API key. The console now makes you pick at least one API restriction before it creates the key, so choose YouTube Data API v3. The key is free, and it reads public data: search results, video and channel details, playlists and public comments. It can't upload videos or act on a channel. Those need OAuth 2.0, where the channel owner signs in and grants your app access.

If you only want to post videos to YouTube from an AI assistant or a script, you may not need a Google Cloud project at all. With Taskwind, you sign in with Google once, and Claude, ChatGPT or the Taskwind REST API uploads to your channel. Details are further down.

Everything below comes from Google's own documentation, checked on December 2, 2026. Google changed the quota rules twice in the last year, so many guides that still say "an upload costs 1,600 units" are out of date.

How to get a YouTube API key, step by step

  1. Create a project. In the Google Cloud console, open the project picker at the top and click New project. Give it a name and click Create.
  2. Enable the API. Go to APIs & Services > Library, search for YouTube Data API v3, open it and click Enable. Google's getting started guide asks you to check that it now appears under Enabled APIs.
  3. Create the key. Go to APIs & Services > Credentials, click Create credentials and choose API key.
  4. Pick a restriction. According to Google's API keys page, "you must add at least one API restriction to create an API key" in the console. Select YouTube Data API v3 and click Create.
  5. Copy the key from the "API key created" dialog and store it somewhere safe, such as an environment variable or a secrets manager.

Test it with a public request:

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

You should get back the video's title, channel and view count as JSON.

Restrict the key

Google says plainly that "unrestricted API keys are insecure" and recommends both kinds of restriction. Open the key on the Credentials page and click Restrict key:

Restriction Options Use it when
API restrictions Limit the key to YouTube Data API v3 Always
Application restrictions: websites Allowed HTTP referrers, such as https://example.com/* The key runs in a browser
Application restrictions: IP addresses Your server's IP addresses The key runs on a server
Application restrictions: Android or iOS apps Package name and SHA-1 fingerprint, or bundle ID The key ships in a mobile app

You can set only one type of application restriction per key. Google's best practices also say not to commit keys to code repositories, to rotate them, and to delete keys you no longer use.

API key or OAuth: what each one can do

Google's authentication guide draws the line clearly. Use an API key "for requests that only retrieve public data, such as public video metadata or search results." Anything that inserts, updates or deletes something has to use OAuth 2.0.

Task API key OAuth 2.0
Search YouTube (search.list) Yes Yes
Read public video, channel and playlist details Yes Yes
Read public comments Yes Yes
Read your own channel with mine=true No Yes
Upload a video (videos.insert) No Yes, with a scope such as youtube.upload
Update titles, descriptions or thumbnails No Yes
Post or reply to comments No Yes
Manage playlists No Yes

So if a tutorial tells you to "add your API key" to upload videos, it's wrong. For uploads, you create an OAuth client ID on the same Credentials page, set up the OAuth consent screen, and have the channel owner sign in. Your app then gets an access token and a refresh token for that channel.

The YouTube API quota in 2026

The YouTube Data API is free to use, and access is limited by quota rather than billed. Google's quota cost page now gives every project three separate daily allowances:

Bucket Default per day What counts
Search queries 100 search.list calls Searches only
Video uploads 100 videos.insert calls Uploads only
Everything else 10,000 units All other methods

Quotas reset at midnight Pacific Time.

What each call costs

From Google's quota table, for methods in the 10,000-unit bucket:

Method Units
Most list calls: videos.list, channels.list, playlistItems.list, commentThreads.list 1
liveChatMessages.list 5
videos.update, videos.delete, videos.rate 50
thumbnails.set 50
commentThreads.insert, comments.insert 50
playlists.insert, playlistItems.insert 50
captions.list 50
captions.insert 400

With 10,000 units, you can make about 10,000 videos.list calls a day, or about 200 title updates.

What changed, and why old guides are wrong

Google's revision history lists three recent changes:

If you read that the default quota allows only six uploads a day, or that your uploads will stay private until Google audits you, that advice predates these changes.

Your channel also has its own daily upload limit, separate from your project's quota. Hitting it returns an uploadLimitExceeded error even if your project has quota left.

How to get more quota

To go above the defaults, fill in the YouTube API Services Audit and Quota Extension Form. Google's audit guide says you must first pass a compliance audit against the YouTube API Services Terms of Service. If you passed one in the last 12 months, use the same form. You don't need an audit to upload public or unlisted videos within the default quota.

Common YouTube API errors

Error What it means Fix
quotaExceeded (403) The project used its daily quota Wait for the midnight Pacific reset, cut wasteful calls, or request more
forbidden (403) The request isn't authorized for this action Use OAuth for anything beyond public reads
insufficientPermissions (403) The OAuth token lacks the needed scope Ask the user to sign in again with the right scope
authorizationRequired (401) You used mine=true or similar with only a key Switch to OAuth
uploadLimitExceeded (400) The channel hit its own upload limit Wait, or upload from another channel
"API key not valid" The key is mistyped, deleted or from another project Copy the key again from Credentials
"API has not been used in project… or it is disabled" YouTube Data API v3 isn't enabled for the key's project Enable it under APIs & Services > Library
Requests blocked from your site or server The referrer or IP doesn't match the key's application restriction Add the right referrer or IP to the key

The first five are listed on YouTube's errors page. The last three are general Google Cloud errors, and their exact wording can vary.

Upload to YouTube without building the OAuth flow

For reading public data, an API key is all you need. Uploading is where the work starts: an OAuth consent screen, a client ID, token refresh, resumable uploads, and the same job again for every other network you post to.

Taskwind has done that part. You connect your channel once with Google's own sign-in, which asks for permission to upload videos and read your channel. Then:

What Taskwind doesn't do on YouTube yet: it doesn't edit videos already on your channel, and it doesn't read or answer YouTube comments. For analytics or search data, you still want your own API key. Plans are $49 a month for 5 accounts or $97 for 30, after a 7-day free trial (pricing).

More: YouTube upload API, ChatGPT YouTube automation and the YouTube MCP server.

Questions

Is the YouTube API key free?

Yes. Google doesn't charge for the YouTube Data API. You're limited by quota: 10,000 units a day for most methods, plus 100 searches and 100 uploads, and extra quota goes through an audit, not a payment.

Can I upload videos with just an API key?

No. Uploading uses videos.insert, which needs OAuth 2.0 with a scope such as youtube.upload. The channel owner has to sign in and grant your app access.

How many videos can I upload per day with the YouTube API?

By default, 100 videos.insert calls a day per project, in their own quota bucket since June 2026. Each channel also has its own upload limit, which can stop you sooner.

Are videos uploaded through the API still set to private?

Not anymore. Google lifted that rule on November 2, 2026. Videos from unverified projects are no longer forced to private, and uploads default to public unless you set a privacy status or the channel's own settings default to private.

When does the YouTube API quota reset?

At midnight Pacific Time, every day.

How do I keep my YouTube API key safe?

Restrict it to YouTube Data API v3 and to your website, server IP or app. Keep it out of your code repository, rotate it, and delete keys you don't use.