Skip to Content

YouTube API

26 endpoints for channels, videos and transcripts.

Every YouTube endpoint, by group. Each is a GET under /v1/youtube.

Quick Reference

PropertyValue
Base path/v1/youtube
Endpoints26
CreditsSee Below
GuideYouTube

Accounts

Posts

Discovery

Batch

Example Request

Every YouTube endpoint is called this way: its path, and what to read as query parameters.

import { SocialAPI } from "@socialapihq/sdk";

const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });

const { data } = await client.youtube.profile({ handle: "LinusTechTips" });
Response
{
  "data": {
    "id": "UCXuqSBlHAE6Xw-yeJA0Tunw",
    "username": "LinusTechTips",
    "displayName": "Linus Tech Tips",
    "bio": "Linus Tech Tips is a passionate team of \"professionally curious\" experts in consumer technology and video production who aim to educate and entertain.\n\nSponsorship Inquiries: partnerships@linusmediagroup.com",
    "avatarUrl": "https://yt3.googleusercontent.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s160-c-k-c0x00ffffff-no-rj",
    "url": "https://www.youtube.com/@LinusTechTips",
    "verified": true,
    "private": false,
    "followers": 16900000,
    "following": null,
    "likes": null,
    "posts": 8011,
    "externalUrl": "https://www.lttstore.com/",
    "createdAt": "2008-11-24T00:00:00.000Z",
    "ext": {
      "views": 10045352646,
      "country": "Canada",
      "bannerUrl": "https://yt3.googleusercontent.com/U_7GWetO6k4sq3pAkbFEIIWzZLKcIJlGJqNz6NQAhgqF6DVD5pllwWF6trSUWEIRn4MkhNlhy9Y=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
      "links": [
        {
          "title": "lttstore.com",
          "url": "https://www.lttstore.com/"
        },
        {
          "title": "Floatplane",
          "url": "https://www.floatplane.com/ltt"
        },
        {
          "title": "Labs",
          "url": "https://www.lttlabs.com/"
        }
      ],
      "subscribersText": "16.9M subscribers"
    }
  }
}

Errors

A call that fails costs nothing. See Errors for every code.