Skip to Content

Post

One video or Short with its views, likes and chapters.

GET
/v1/youtube/post

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

url?string

The video's link (https://www.youtube.com/watch?v=dQw4w9WgXcQ, a Short's or a youtu.be one).

id?string

The video's id, instead of url.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

One item, as every single-item endpoint answers: { "data": … }.

data*

A video, a Short, a live stream or a community post.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.youtube.post({ url: "https://www.youtube.com/watch?v=Ip5EiqbuBpE" });
Example Response
{  "data": {    "id": "Ip5EiqbuBpE",    "url": "https://www.youtube.com/watch?v=Ip5EiqbuBpE",    "text": "Buy the brand new Tech Sling and earphone pouch and get a $30 LTT Gift card!\n\nUS: https://www.lttstore.com/products/tech-sling-earphone-pouch-free-30-gift-card-bundle\nGlobal: https://global.lttstore.com/products/tech-sling-earphone-pouch-30-gift-card-bundle\n\nApple Macs are very powerful machines. But not all developers port their games over to MacOS. That's why we tried out FX Steam Launcher, a pr…",    "createdAt": "2026-11-23T17:00:11.000Z",    "author": {      "id": "UCXuqSBlHAE6Xw-yeJA0Tunw",      "username": "LinusTechTips",      "displayName": "Linus Tech Tips",      "avatarUrl": "https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s176-c-k-c0x00ffffff-no-rj",      "verified": true,      "url": "https://www.youtube.com/@LinusTechTips"    },    "stats": {      "views": 2100423,      "likes": 24789,      "comments": 1300,      "shares": null,      "saves": null,      "engagementRate": 0.0124    },    "media": [      {        "kind": "video",        "url": null,        "thumbnailUrl": "https://i.ytimg.com/vi_webp/Ip5EiqbuBpE/maxresdefault.webp",        "width": null,        "height": null,        "durationSeconds": 1149      }    ],    "hashtags": [],    "mentions": [],    "ext": {      "kind": "video",      "title": "Mac Gaming is Solved But Not By Apple",      "durationSeconds": 1149,      "publishedText": null,      "category": "Science & Technology",      "keywords": [        "FX Steam Launcher",        "SteamOS on Mac",        "play Steam games on Mac"      ],      "chapters": [        {          "title": "Why we lyin",          "startSeconds": 0        },        {          "title": "Is this new tech?",          "startSeconds": 84        },        {          "title": "ITS WORKING!!!",          "startSeconds": 170        }      ],      "music": [],      "liveNow": false,      "unlisted": false,      "familySafe": true,      "membersOnly": false,      "channelSubscribers": "16.9M subscribers"    }  }}