API Reference

YouTube API

YouTube's Data API has a 10,000-unit daily quota, resumable upload sessions, and complex OAuth scopes. Zernio gives you one endpoint for videos, Shorts, and channel management with no quota headaches.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect YouTube accounts.
  3. 3.
    Start Posting
    Make API calls to post content to YouTube.
Upload a YouTube video
JavaScript
const response = await fetch('https://zernio.com/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Learn how to build a REST API from scratch...',
    mediaItems: [{ type: 'video', url: 'https://example.com/tutorial.mp4' }],
    platforms: [{
      platform: 'youtube',
      accountId: 'acc_abc123',
      platformSpecificData: {
        title: 'REST API Tutorial for Beginners',
        visibility: 'public'
      }
    }],
    tags: ['api', 'tutorial', 'programming'],
    publishNow: true
  })
});

const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'

YouTube Endpoints

POST/v1/posts

Upload or schedule a YouTube video or Short

GET/v1/posts/{id}

Get status and details of a YouTube upload

DELETE/v1/posts/{id}

Cancel a scheduled YouTube upload

GET/v1/profiles

List all connected YouTube channels

Media Requirements

TypeFormatMax SizeNotes
VideoMP4, MOV, AVI, WMV256 GBUp to 12 hours duration
ShortsMP4, MOV256 GBUp to 60 sec, 9:16 aspect
ThumbnailJPEG, PNG2 MB1280x720 recommended
TitleText100 charsRequired for videos

Zernio automatically transcodes and optimizes media for YouTube's requirements.

API Limits

YouTube's Data API has quota limits that reset daily. Zernio manages your quota usage and queues uploads to avoid hitting limits.

Zernio handles all rate limiting automatically. We queue and retry requests as needed.

Features

  • Upload long-form videos and Shorts
  • Schedule video premieres
  • Custom thumbnails support
  • Tags, descriptions, and playlists
  • Privacy settings (public/unlisted/private)
  • Multi-channel management
  • Webhook notifications for processing status

Response Example

Response
JSON
{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "content": "Learn how to build a REST API from scratch...",
    "platforms": [{
      "platform": "youtube",
      "accountId": { "_id": "acc_abc123", "username": "YourChannel" },
      "status": "published",
      "platformPostId": "dQw4w9WgXcQ",
      "platformPostUrl": "https://youtube.com/watch?v=dQw4w9WgXcQ"
    }],
    "createdAt": "2025-01-10T10:30:00Z"
  },
  "message": "Post published successfully"
}

Start building with YouTube API

Free tier available · No credit card required · 99.97% uptime

SOC 2 CompliantGDPR Compliant