Panduan

How to Auto-Post YouTube Shorts via API

YouTube Shorts generate billions of views daily, but publishing them through YouTube Studio is tedious, especially if you manage multiple channels or want to cross-post to TikTok and Reels. With the Upload-Post social media API, you can upload and schedule YouTube Shorts with a single API call. No OAuth headaches, no quota juggling.

Mengapa mengotomatiskan unggahan YouTube Shorts

YouTube Shorts are the fastest way to grow a channel right now. The algorithm pushes short vertical content aggressively, and creators who post Shorts consistently see subscriber growth that would take months with long-form videos alone.

The problem is the upload process. YouTube Studio requires you to log in, fill out metadata fields, set visibility, add tags, and hit publish. Multiply that by five Shorts per week across two channels, and you are spending hours on repetitive busywork.

YouTube\'s official Data API (v3) is an option, but it comes with significant friction. You need to create a Google Cloud project, configure OAuth 2.0 consent screens, handle token refreshes, and manage a daily upload quota that resets unpredictably. For most developers, it is more infrastructure than the task warrants.

Upload-Post wraps all of that into a single POST request. You send your video, set the metadata, and the API handles authentication, format validation, and delivery to YouTube. The same request can also publish to TikTok and Reels Instagram simultaneously.

Unggah YouTube Short melalui API

The upload endpoint accepts a multipart form with your video file and metadata. For a video to be treated as a YouTube Short, it must be vertical (9:16 aspect ratio) and under 60 seconds. Here is a cURL example:

curl -X POST https://api.upload-post.com/api/upload \
  -H "Otorisasi: Apikey your-api-key-here" \
  -F "[email protected]" \
  -F "user=mybrand" \
  -F "title=This cooking hack saves 20 minutes every night #shorts #cooking" \
  -F "platform[]=youtube" \
  -F "youtube_description=Quick kitchen tip that changed my meal prep routine. Full recipe on my channel." \
  -F "youtube_tags=cooking,kitchen hack,meal prep,shorts" \
  -F "youtube_visibility=public"

When the upload succeeds, the API returns a response with the job details:

{
  "success": true,
  "job_id": "yt_short_abc123",
  "platform": "youtube",
  "status": "processing"
}

The video field accepts a local file path (with @ prefix in cURL) or a public URL. The title field maps to the YouTube video title. Including #shorts in the title is not strictly required for Shorts detection (YouTube uses aspect ratio and duration), but it can help with discoverability.

Parameter khusus YouTube

Beyond the standard video, title, user, and platform[] fields, the API exposes several YouTube-specific options:

Parameter Nilai-nilai Deskripsi
youtube_description string The video description shown below the player. Supports links and line breaks. If omitted, the main title is used.
youtube_tags comma-separated string Tags for YouTube search and discovery. Example: "cooking,recipe,shorts". YouTube allows up to 500 characters total.
youtube_visibility "public", "private", "unlisted" Mengontrol siapa yang dapat melihat video. Secara default diatur ke "publik" jika diabaikan.
youtube_shorts true / false Paksa video untuk diperlakukan sebagai Short, meskipun tidak memenuhi kriteria deteksi otomatis. Berguna untuk kasus-kasus khusus seperti video persegi (1:1).
youtube_category_id integer ID kategori YouTube. Nilai umum: 22 (Orang & Blog), 24 (Hiburan), 26 (Cara & Gaya), 28 (Sains & Teknologi).
youtube_playlist_id string Secara otomatis tambahkan video yang diunggah ke daftar putar tertentu. Kirim ID daftar putar dari saluran YouTube Anda.
youtube_made_for_kids true / false COPPA compliance flag. Set to true if the content is directed at children. This disables comments and personalized ads on the video.

The youtube_shorts flag is particularly useful when you want to guarantee Short treatment. Normally, YouTube detects Shorts based on aspect ratio and duration, but if your video is exactly at the boundary (e.g., square format, or very close to 60 seconds), explicitly setting youtube_shorts=true removes ambiguity.

Jadwalkan Shorts untuk waktu yang optimal

Posting at the right time matters. YouTube Shorts get the most initial traction during the first few hours after publishing, so timing your upload to coincide with your audience\'s active hours gives the algorithm a stronger signal.

To schedule a Short, add scheduled_date (ISO-8601 format) and timezone (IANA format) to your request:

curl -X POST https://api.upload-post.com/api/upload \
  -H "Otorisasi: Apikey your-api-key-here" \
  -F "[email protected]" \
  -F "user=mybrand" \
  -F "title=5 AM routine that actually works #shorts #productivity" \
  -F "platform[]=youtube" \
  -F "youtube_visibility=public" \
  -F "scheduled_date=2025-09-15T08:00:00Z" \
  -F "timezone=America/New_York"

For hands-free scheduling, use the queue system instead. Configure your preferred posting slots once, then add content with add_to_queue=true. The API automatically assigns each video to the next available slot. This is ideal for batch workflows where you upload a week of content in one session. See the complete scheduling guide for queue configuration details.

Best posting times for YouTube Shorts vary by niche, but general patterns show strong performance between 7 AM and 9 AM local time (morning scroll), 12 PM to 2 PM (lunch breaks), and 7 PM to 10 PM (evening wind-down). Use the social media holiday calendar to align your Shorts with trending dates and events.

Saling pos Shorts ke TikTok dan Reels

A vertical video under 60 seconds works on YouTube Shorts, TikTok, and Instagram Reels. Instead of uploading the same file three times through three different interfaces, send it once and let the API distribute it:

curl -X POST https://api.upload-post.com/api/upload \
  -H "Otorisasi: Apikey your-api-key-here" \
  -F "[email protected]" \
  -F "user=mybrand" \
  -F "title=Wait for it... #shorts" \
  -F "tiktok_title=Wait for it... #fyp #viral" \
  -F "instagram_title=Wait for it... Full video on YouTube (link in bio)" \
  -F "platform[]=youtube" \
  -F "platform[]=tiktok" \
  -F "platform[]=instagram" \
  -F "media_type=REELS" \
  -F "youtube_visibility=public" \
  -F "privacy_level=PUBLIC" \
  -F "add_to_queue=true"

Notice a few things: media_type=REELS tells Instagram to publish as a Reel (not a feed post). Each platform gets its own caption via tiktok_title and instagram_title, while the main title goes to YouTube. The add_to_queue=true flag schedules all three according to your queue settings.

For a deeper look at multi-platform workflows, see the cross-posting guide. If you are repurposing longer YouTube videos into Shorts, the repurposing guide covers the full clip-and-distribute pipeline.

Unggah Shorts secara batch dengan Python

When you have a folder full of Shorts ready to go, the SDK Python makes batch uploading straightforward. Install the SDK first:

pip install upload-post

Then loop through your videos and schedule each one at staggered intervals:

import os
import glob
from datetime import datetime, timedelta
from upload_post import UploadPostClient

client = UploadPostClient(api_key="your-api-key-here")

video_folder = "/path/to/youtube-shorts"
videos = sorted(glob.glob(os.path.join(video_folder, "*.mp4")))

# Start scheduling from tomorrow at 8 AM Eastern
base_time = (datetime.now() + timedelta(days=1)).replace(
    hour=8, minute=0, second=0, microsecond=0
)

print(f"Found {len(videos)} Shorts to schedule")

for i, video_path in enumerate(videos):
    publish_time = base_time + timedelta(hours=3 * i)  # Every 3 hours
    filename = os.path.basename(video_path)
    title = filename.replace(".mp4", "").replace("-", " ").replace("_", " ")

    try:
        response = client.upload_video(
            video_path=video_path,
            title=f"{title} #shorts",
            user="mybrand",
            platforms=["youtube"],
            scheduled_date=publish_time.isoformat(),
            timezone="America/New_York",
            youtube_visibility="public",
            youtube_tags="shorts,daily",
            youtube_shorts=True,
            async_upload=True
        )
        job_id = response.get("job_id", "pending")
        print(f"[{i+1}/{len(videos)}] Scheduled {filename} for {publish_time} (Job: {job_id})")
    except Exception as e:
        print(f"[{i+1}/{len(videos)}] Failed: {filename} - {e}")

print("Semua Shorts dijadwalkan!")

This script spaces each Short three hours apart, giving each one time to gain initial traction before the next one goes live. Adjust the timedelta to match your preferred cadence. You can also pass platforms=["youtube", "tiktok", "instagram"] to cross-post every Short automatically.

For bulk video operations at scale, the bulk upload guide covers advanced patterns like parallel uploads, retry logic, and webhook-based status tracking.

Automasi tanpa kode dengan n8n

If you prefer visual workflows over writing code, n8n is a solid choice. A common setup is to watch a Google Drive folder for new videos and auto-post them as YouTube Shorts whenever a file appears.

The workflow has three nodes:

  1. Pemicu Google Drive: terpicu saat file MP4 baru ditambahkan ke folder "Shorts".
  2. Permintaan HTTP: sends a multipart/form-data POST to https://api.upload-post.com/api/upload with the video, title derived from the filename, platform[]=youtube, and add_to_queue=true.
  3. Notifikasi Slack/Email: mengkonfirmasi unggahan berhasil atau memberi tahu Anda jika gagal.

We have ready-made templates that cover YouTube Shorts workflows:

Browse all available n8n templates for more ideas. You can also build similar automations with Make.com.

Persyaratan YouTube Shorts

Before uploading, make sure your videos meet YouTube\'s specifications for Shorts. Uploading a file that does not meet these requirements will result in a failed upload or the video being treated as a regular (non-Short) upload.

Persyaratan Spesifikasi
Maks durasi 60 seconds
Rasio aspek 9:16 (vertical). Square (1:1) also works but vertical is recommended.
Resolusi yang direkomendasikan 1080x1920 pixels
Format yang didukung MP4, MOV, WebM
Maks ukuran file 256 GB (YouTube limit), though shorter Shorts are typically under 50 MB
Codec H.264 disarankan. H.265 (HEVC) didukung.
Laju bingkai 30 or 60 fps recommended

If your source videos are in landscape format, the API FFmpeg can crop and resize them to vertical in the cloud before publishing. This is especially useful when repurposing long-form videos into Shorts.

Pertanyaan yang sering diajukan

Bisakah saya mengunggah video YouTube biasa (format panjang) juga?

Yes. The same POST /api/upload endpoint handles both Shorts and regular videos. The difference is automatic: videos under 60 seconds in vertical format are treated as Shorts, while everything else is published as a standard YouTube video. You can also use the youtube_shorts=true parameter to force Short treatment, or omit it to let YouTube decide based on the file dimensions and duration.

Apakah ini bekerja dengan beberapa saluran YouTube?

Yes. Each connected YouTube channel is represented by a different user value in your Upload-Post account. You connect channels through the dashboard, and then specify which channel to post to by passing the corresponding user parameter. You can upload the same Short to multiple channels by making separate requests with different user values.

Bagaimana dengan monetisasi di Shorts?

Upload-Post does not affect your monetization status. Videos uploaded through the API are treated identically to videos uploaded through YouTube Studio. If your channel is in the YouTube Partner Program, Shorts will be eligible for the Shorts revenue sharing program just like any other Short. The youtube_made_for_kids flag is relevant here: setting it to true disables personalized ads, which affects revenue.

Apa perbedaan antara Shorts, Reels, dan TikTok?

All three are short vertical video formats, but they have different constraints. YouTube Shorts max out at 60 seconds, Instagram Reels can be up to 15 minutes, and TikTok allows up to 10 minutes. For cross-posting, keep your videos under 60 seconds so they qualify as Shorts on YouTube. Captions also differ: TikTok favors trending hashtags and informal tone, while YouTube Shorts benefit from searchable titles and keyword-rich descriptions. Use platform-specific title fields (tiktok_title, instagram_title) to tailor each caption. See the Panduan Penjadwalan TikTok for TikTok-specific tips.

Apakah ada paket gratis?

Yes. Upload-Post includes a free plan with 10 uploads per month, and all features (scheduling, queue, cross-posting, YouTube-specific parameters) are available on every plan including the free one. No credit card is required to get started. If you need more volume, paid plans scale affordably. Compared to tools like Hootsuite or Buffer, the API-first approach gives you far more flexibility at a lower cost.

Mulai memposting otomatis YouTube Shorts hari ini

Upload, schedule, and cross-post Shorts to YouTube, TikTok, and Instagram with a single API call. Siapkan queue and let the system handle the rest.

Tidak perlu kartu kredit. Termasuk 10 unggahan gratis.