API Reference

YouTube API

Upload videos, Shorts, and manage YouTube channels with a single API call.

Quick Start

Get started in 3 steps

1

Get API Key

Sign up for free and get your API key in seconds.

2

Connect Account

Use our OAuth flow to connect YouTube accounts.

3

Start Posting

Make API calls to post content to YouTube.

Upload a YouTube video
JavaScript
const response = await fetch('https://getlate.dev/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'

Endpoints

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 Specs

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

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

Rate Limits

API Limits

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

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

Capabilities

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

Response Example

Response
200 OK
{
  "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

Skip the YouTube Data API complexity. Late handles OAuth, video processing, and quota limits so you can ship faster.

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