YouTube

How to get a YouTube API key (2026)

How to get a YouTube API key in 2026: create it in Google Cloud, enable the YouTube Data API, the 10,000-unit daily quota, and when a Social Fetch key fits.

Social FetchUpdated

People who search for a "YouTube API key" usually want one of two things. One is Google's own credential for the YouTube Data API, created in the Google Cloud console in a few minutes. The other is a way to pull public channels, videos, comments and transcripts into a script without counting quota units. Both are covered here, with Google's steps as of November 2026.

The short answer: create a Google Cloud project, enable the YouTube Data API v3, then go to Credentials, click Create credentials and choose API key. No approval is needed for the default quota. A Social Fetch key is a separate credential for Social Fetch's own YouTube routes.

Two different things called a YouTube API key

YouTube Data API v3Social Fetch YouTube routes
What you getA Google Cloud API key; an OAuth client ID for user actionsOne sfk_… key
How you get itCreate it in the Google Cloud consoleCreate it on the API Keys page
Uploads, playlists, managing a channelYes, with OAuthNo
Public channels, videos, commentsYesYes
Transcripts of any public videocaptions.download needs OAuth and permission to edit the videoYes, by video URL
LimitsDaily quota units per projectCredits and available service capacity

Background reading: Does YouTube have an API?, Social Fetch vs the YouTube Data API and the YouTube platform page.

How to get an official YouTube API key

Google's getting started guide lists three requirements: a Google account, a Google Cloud project, and the YouTube Data API enabled for that project. As of November 2026 the steps are:

  1. Sign in to the Google Cloud console with a Google account.
  2. Create a project from the project picker at the top of the console, or pick an existing one.
  3. Enable the API. Open the API Library, search for YouTube Data API v3 and click Enable. Check it appears on the Enabled APIs page.
  4. Create the key. Open the Credentials page, click Create credentials and choose API key. Google's API key documentation says the console asks for at least one restriction before it creates the key. The API key created dialog shows the key string; copy it then.
  5. Restrict it. Click the key's name on Credentials. Under API restrictions, click Restrict key and select the YouTube Data API v3. Under Application restrictions, choose one type (websites, IP addresses, Android apps or iOS apps) that matches where the key runs. Click Save.

Then pass the key as the key parameter. This call reads a public channel's statistics and costs 1 quota unit:

Request
bash

An unrestricted key works for every API enabled on its project. Keep it on your server or restrict it to your site's referrer, and never commit it to a public repository.

YouTube API key vs OAuth client ID

The Google Cloud console offers more than one kind of credential, and YouTube tutorials mix them up:

  • An API key identifies your project. Google's guide says some list methods accept requests without user authorisation, and those return only public data. That covers most read-only research: channels, videos, playlists, comment threads and search.
  • An OAuth 2.0 client ID (with a client secret for web apps) lets your app act for a YouTube user who signs in and consents. Google's guide says insert, update and delete operations always need user authorisation. Reading a user's private data needs it too.

If a request fails with 403 and a quotaExceeded reason, you have used the day's quota. A 403 with forbidden or an access error on a write call usually means you sent an API key where OAuth is required.

Is the YouTube API free?

Google's YouTube Data API pages measure use in quota units rather than a price per request, and the quota and compliance audits page does not mention a fee for extra quota. The cost is the limit: once the day's quota is gone, requests fail until it resets.

To go past the default, Google says you must first pass an audit that shows your project complies with the YouTube API Services Terms of Service, submitted through the YouTube API Services Audit and Quota Extension Form. A member of YouTube's API Services team then contacts you. Plan for that review if your product needs more than the default.

YouTube API quota

Google's quota cost page sets the default allocation as of November 2026:

  • 10,000 units per day combined for most endpoints;
  • a separate bucket of 100 search.list calls per day;
  • a separate bucket of 100 videos.insert calls per day.

Most read requests (videos.list, channels.list, commentThreads.list) cost 1 unit each. Search is the tight one: at 100 calls per day, a keyword monitor that pages through results can exhaust it within minutes. Google notes the default allocation is subject to change, so check the linked page before sizing a workload.

Social Fetch's YouTube routes have no daily quota. Requests spend credits, and when capacity is full a request may return 503 temporarily_unavailable with a Retry-After header, which isn't charged. See Credits and Errors.

Get a Social Fetch key for public YouTube data

Social Fetch's YouTube routes accept a Social Fetch key, so you don't need a Google Cloud project, an API key or quota units. They return public data as JSON. The key does not grant any permission under YouTube's terms; check those for your use.

  1. Create a free account or sign in.
  2. Open API Keys, type a name for the key and click Create key.
  3. Copy the key from the Save your API key window. It starts with sfk_ and is shown only once.
  4. Try a channel lookup in the Playground: enter a handle such as MrBeast in handle, then click Send. The Playground uses your signed-in workspace and spends its credits; you do not paste a key.
  5. Store the key in an environment variable named SOCIALFETCH_API_KEY and call the same route from your own code. Keep it on your server, out of public repositories and browser code.
Request
bash

Each endpoint page shows what a lookup costs, and successful responses say what they cost in meta.creditsCharged. Lookups that fail (502 lookup_failed, 503 temporarily_unavailable) are free. Plans and credit packs are on Pricing.

The YouTube routes most people start with:

  • Channel: a channel by handle, ID or URL, with subscriber and video counts.
  • Video: one video's details and statistics.
  • Transcript: the transcript of a public video by URL. The Data API's captions.download needs OAuth, permission to edit the video and 200 quota units per call.
  • Comments: a video's public comments, paged.

The full list is on the YouTube platform page and in the YouTube API reference. These routes read public data only; they don't upload, edit or reach private or unlisted content that needs a sign-in.

Which key do you need?

Get a Google API key and OAuth client when you're building something that acts on YouTube: uploads, playlist management, a tool creators sign in to, or anything that reads a channel owner's private analytics. Google's quota is generous for those jobs.

Use a Social Fetch key when the job is reading public data at volume: search-heavy monitoring that would burn through 100 search.list calls a day, transcripts across many channels, or one integration that also covers TikTok, Instagram and Reddit. For transcripts in particular, see How to get YouTube and TikTok transcripts. The same split applies on other networks; the Reddit API key guide walks through it for Reddit.

FAQ

How do I get a YouTube API key?

Sign in to the Google Cloud console with a Google account, create a project, enable the YouTube Data API v3 in the API Library, then go to Credentials, click Create credentials and choose API key. Restrict the key to the YouTube Data API before you use it. There is no approval step for the default quota.

Is the YouTube Data API free?

Google's YouTube Data API documentation sets limits in quota units rather than a price per request. As of November 2026 a new project gets 10,000 units per day for most endpoints, plus separate buckets of 100 search.list calls and 100 videos.insert calls per day. More quota needs a compliance audit through Google's quota extension form.

How much quota does a YouTube API call use?

Most read requests, such as videos.list, channels.list and commentThreads.list, cost 1 unit. As of November 2026 search.list has its own bucket of 100 calls per day, so heavy keyword search runs out first.

What is the difference between a YouTube API key and an OAuth client ID?

An API key identifies your project and is enough for list methods that return public data. An OAuth 2.0 client ID is needed when your app acts for a YouTube user, for example uploading, updating or deleting, or reading private data. Insert, update and delete calls always need OAuth.

Do I need a Google Cloud project to use Social Fetch for YouTube?

No. Social Fetch's YouTube routes take a Social Fetch key (it starts with sfk_) in the x-api-key header. They return public channels, videos, transcripts and comments, spend credits instead of YouTube quota units, and cannot upload or manage a channel.

Share this article