API key: supported public reads
Read information available to a public request, such as a known public video's title. A key identifies the project; it does not sign in as a channel owner.
Google's public-key and OAuth exampleYouTube API guide
Does YouTube have an API? Yes. Use the YouTube Data API to read video and channel data or upload videos, the Analytics API for targeted performance reports, and the Reporting API for bulk reports. Public-data requests can use an API key; uploading or reading a channel owner's analytics requires their authorization. Start with the job, not the credential.
A dashboard, an uploader and a data export need different starting points. Use this table to pick the smallest API that does your job.
| Your task | Use this API | First decision |
|---|---|---|
| Read a video's title, public statistics or channel details | YouTube Data API | Use a public-data request with an API key. If you already know the video ID, use videos.list instead of searching for it again. |
| Upload or manage a channel's videos | YouTube Data API | Use owner-authorized OAuth and the required scope. An API key cannot grant permission to upload to someone's channel. |
| Answer a channel-performance question | YouTube Analytics API | Request an authorized report for the owner, with the needed date range, metrics and dimensions. Public view counts are not a substitute for owner analytics. |
| Import bulk performance data into your own system | YouTube Reporting API | Create an authorized reporting job, then download the generated reports. Your application handles the bulk files and any further aggregation. |
Just embedding a video player? Start with the IFrame Player API, not an upload or analytics integration. Analytics and Reporting both require the relevant owner's authorization; their available reports are not identical. Compare the reporting APIs.
Read information available to a public request, such as a known public video's title. A key identifies the project; it does not sign in as a channel owner.
Google's public-key and OAuth exampleUse the owner's authorization for uploads and private data. Request the scope your action needs and confirm the intended channel before writing anything.
Choose the authorization flowKeep keys appropriately restricted for your deployment and keep OAuth secrets out of public code and agent prompts. For an ordinary channel-owner workflow, do not substitute a service account for the owner's OAuth flow. Content-partner arrangements have separate requirements.
Read the title of a public video whose ID you already know. That checks project access without uploading anything or asking for channel-management permission.
Create or select your Google API project and enable the YouTube Data API. Keep the project and credential together; a key from a different project does not fix an API that is disabled.
For this first public-video lookup, use an API key. For uploads or private account data, configure OAuth and let the owner authorize the required scopes. Never ask for the owner's Google password or put OAuth secrets in a public page.
Use videos.list with the video ID and part=snippet. Request only the response fields you need. The example below returns the matching item or null when that ID is not returned; it does not search, upload or change a video.
Confirm that the returned ID matches the requested video. Treat an empty result as unavailable to this request, not as proof that the video never existed. Preserve API errors, check project quota, and move to an owner-authorized flow only when the task needs it.
Run this in your server-side application with its own key and the video ID from your chosen YouTube URL. Call readPublicVideo(videoId, apiKey). The function returns the matching video object or null, and throws on an API error. It makes no publishing request. The example was checked with mock responses, not your credentials or a live API call.
async function readPublicVideo(videoId, apiKey, fetcher = fetch) {
if (typeof videoId !== "string" || !videoId.trim()
|| typeof apiKey !== "string" || !apiKey.trim()) {
throw new Error("A video ID and API key are required");
}
const url = new URL("https://www.googleapis.com/youtube/v3/videos");
url.searchParams.set("part", "snippet");
url.searchParams.set("id", videoId);
url.searchParams.set("fields", "items(id,snippet(title))");
url.searchParams.set("key", apiKey);
const response = await fetcher(url);
const data = await response.json();
if (!response.ok) {
throw new Error(data?.error?.message ?? "YouTube request failed");
}
if (!Array.isArray(data?.items)) {
throw new Error("Unexpected YouTube response");
}
return data.items.find(item => item?.id === videoId) ?? null;
}A result exposes snippet.title; null means the request did not return that ID. Do not turn that into a made-up title or zero-valued analytics. See videos.list parameters.
part chooses resource sections; fields trims the response. A smaller payload is not a promise of lower quota cost. Google's request and partial-response guide.
You can upload through the Data API, but upload completion, processing and public visibility are different outcomes. Check each before announcing a release.
Authorize the intended channel and review the finished file, title, description, audience and required disclosures. Set the intended privacy explicitly. A successful OAuth consent screen is not permission to publish content the owner has not approved.
Use videos.insert with the appropriate authorization and metadata. For resumable uploads, save the session URL and follow the documented resume procedure after an interruption. Keep the returned video ID; do not start a duplicate upload just because a response was lost.
Read the uploaded video with owner authorization. processingDetails.processingStatus describes processing; status.privacyStatus describes visibility. Successfully processed does not mean public, and neither field alone guarantees Shorts classification.
Inspect errors, rejection reasons and actual visibility. YouTube's videos.insert policy restricts affected unverified API projects to private uploads until a compliance audit. Check whether that restriction applies to your project instead of assuming a requested public setting will take effect.
Follow videos.insert and its project restriction, the resumable-upload procedure and the video status reference. Owner-only processing details are not available through the public-key example above.
No. Google's OAuth guidance describes verification requirements for public applications using certain user-data scopes. The YouTube upload restriction and quota/compliance process are separate checks. An approved consent flow does not automatically remove an upload restriction or grant more quota. Follow the eligibility conditions for your actual project; don't assume every project has the same restriction.
Upload the video, then check whether it meets YouTube's applicable Shorts rules. A successful upload is not a Shorts-classification receipt.
Check Shorts length and shape, prepare the title and description, or follow the scheduling guide. Keep the creative work and rights review separate from the API connection.
Quota cost measures API usage, not a dollar charge. Google documents project allocations and method-specific usage. Check your project's current limits instead of designing around a copied quota number.
This page does not quote an unverified price or promise free, unlimited access. Budget separately for running your application and any hosted service. A Postdom subscription is not a Google quota allocation.
Choose Postdom when an agent should submit a finished short-form video, respect human-owned approval and follow the result. Use Google's APIs directly when your job needs their broader data or reporting features.
Postdom supports TikTok, Instagram Reels, YouTube Shorts, LinkedIn, Facebook Reels, X, Snapchat Spotlight, Threads, Bluesky. It publishes supplied videos; it does not generate them or expose the entire YouTube API catalog.
A human connects the intended channel. The agent submits an accepted finished-video URL or already-stored media handle, keeps the returned post ID and follows it. A request awaiting approval is not authorized publication; scheduled and publishing are not completed outcomes. Even a published private upload is not publicly released.
YouTube's Data API documentation describes project quota and a compliance-review process for requesting more. Quota cost is not a dollar price. This page does not quote an unverified price or promise unlimited use. Check the current official allocation and terms, and budget separately for hosting, development or a third-party subscription.
Use an API key for supported public-data requests. Use owner-authorized OAuth for uploading, private account data or owner analytics. The credential you need follows the endpoint and the data, not whether the code runs on a server. A key cannot grant channel-owner permission.
You can upload videos through the YouTube Data API. Whether a video is classified as a Short depends on YouTube's applicable shape, duration, upload-date and channel rules. Upload success, public visibility and Shorts classification are separate checks. Use the linked Shorts requirements before publishing.
Check both the privacy setting sent by your client and any project restriction. YouTube's videos.insert policy makes uploads from affected unverified API projects private until a compliance audit. Postdom's released MCP helper also deliberately requests private visibility. Neither OAuth consent nor a completed upload proves public publication.
Public Data API statistics and owner analytics are different. Analytics and Reporting API requests require authorization from the channel or content owner whose data is requested. Their available reports and fields differ; do not assume a public API key reveals another channel's private performance or revenue data.
For an ordinary channel-owner upload, do not use a service account as a replacement for that owner's YouTube account. Use the appropriate owner-authorized OAuth flow. Content-partner systems have separate authorization patterns; running an agent or server unattended does not remove the actual owner's authorization requirement.
No. Postdom publishes finished videos you supply to TikTok, Instagram Reels, YouTube Shorts, LinkedIn, Facebook Reels, X, Snapchat Spotlight, Threads and Bluesky. It does not generate video or provide the whole Data, Analytics and Reporting API catalog. Its released MCP YouTube helper requests private visibility, marks the video as not made for kids and sets the synthetic-media disclosure to true; use it only when those settings are truthful and appropriate.
Official links describe documented behavior. No account authorization, real upload or live API test is claimed on this page. The Shorts field's verification date is not a page-modification date.