apublished

Uploading through the YouTube API

Google's YouTube Data API uploads with videos.insert, a resumable upload of up to 256 GB. It is free, but until your Google Cloud project is verified, every video it uploads is locked to private. Plan for OAuth verification, a daily quota per project, and a second scope to change a video after upload.

Google's API: the parts that matter

Private until verified

From Google's reference: "All videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode." This is the first wall every developer hits. Your code works, the upload succeeds, and nobody can watch the video.

Getting out of it means OAuth verification for a sensitive scope, which takes a few business days, and a separate compliance audit if you need more quota.

Scopes: upload is not enough

youtube.upload covers videos.insert and thumbnails.set. It does not cover videos.update, which is how you change privacy, title or description later, nor posting a comment. With upload alone, the failure lands in the worst place: the upload succeeds and the next call returns "Request had insufficient authentication scopes", leaving a private video you cannot publish.

apublished requests youtube.upload plus youtube.force-ssl, the narrowest scope that covers both gaps. It is sensitive but not restricted, so it does not trigger Google's third-party security assessment. Restricted scopes such as Gmail or Drive would.

For statistics, youtube.readonly and yt-analytics.readonly are separate again.

Tokens

Google issues one long-lived refresh token and one-hour access tokens. Three surprises from building on it:

Quota

apublished's code works with a cap of 100 videos.insert calls per day per Cloud project, counted across all your users, plus 10,000 units a day for every other call. For one channel, ample. For a product with many users, this is the hardest limit you will face.

A certification sentence

YouTube's Terms of Service require a fixed sentence at your upload or schedule confirmation step, in your product's language. It applies to anything built on the API.

Fields and limits

FieldLimit (as of November 2026)
VideoUp to 256 GB or 12 hours; MP4, MOV, WebM, AVI
Title100 characters
Description5,000 bytes, not characters
ThumbnailJPEG or PNG, up to 50 MB via thumbnails.set
Made for kidsMust be declared for every video
Privacypublic, unlisted, private

Length also depends on the channel: unverified channels upload up to 15 minutes. Sizes: YouTube video size and YouTube thumbnail size.

Is there a YouTube Shorts API?

No. A Short is an ordinary videos.insert upload. YouTube categorizes videos uploaded since 15 October 2024 as Shorts when they are vertical or square and up to three minutes long. Shorts are capped at 1080p. One rule worth coding for: a Short over one minute with an active Content ID claim is blocked worldwide. Details: YouTube Shorts length.

Direct, or through a publishing API

YouTube Data APIPublishing API
Google verificationYoursDone by the provider
QuotaYour project'sThe provider's
Resumable upload codeYoursHandled
CostFreeSubscription
TikTok, Instagram, FacebookEach a new integrationSame request

For a YouTube-only tool you control end to end, go direct. For posting to YouTube as one channel among several, a provider saves the verification and the quota math.

The same upload through apublished

Validate first. It changes nothing and returns each violation with the actual and the allowed value:

curl -X POST https://apublished.com/v1/posts:validate \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{
    "body": { "items": [{ "text": "Hello" }] },
    "targets": [{ "channelId": "…", "settings": { } }]
  }'

For YouTube, settings holds title, privacyStatus, madeForKids, and optionally categoryId, tags and license. madeForKids has no default on purpose: it is a legal declaration under COPPA, and the API will not make it for your user. The video goes up first through POST /v1/media (a presigned upload) or POST /v1/media:from-url, then is referenced by its asset id. Videos are never transcoded: a file YouTube would refuse is refused up front, with a reason.

Scheduled videos are uploaded private ahead of time and switched to their final privacy at the set moment. After publishing, title, description, tags, thumbnail and privacy can still be changed. Views, likes, comments, shares, watch time and average view are collected per video.

apublished is a Swiss product billed in Swiss francs, from CHF 19 a month, API on every plan, 7-day free trial, no free plan. Other APIs that cover YouTube include Ayrshare, Upload-Post and Zernio (docs read 11 November 2026); see the social media API comparison. For automation without code, see YouTube uploads with n8n.

FAQ

Why are my API uploads private? Your Cloud project is unverified. Google locks those uploads to private.

How many videos can I upload per day? It depends on your project's quota. apublished's code plans for 100 uploads per project per day.

Can I schedule with the YouTube API? Upload as private, then change privacy at the right time with videos.update. That needs the extra scope.

Do I need a separate API for Shorts? No. Upload a vertical or square video of three minutes or less.

Sources

Published November 18, 2026

Read next