Playlist Posts
A playlist's videos in order, 100 a page.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe playlist's link.
id?stringThe playlist's id, instead of url.
cursor?stringnextCursor of the previous page.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.
data*array<>pagination*import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.youtube.playlistPosts({ id: "PLXm3b2ZSqTsc" });Example Response
{ "data": [ { "id": "skdOVaiRq1c", "url": "https://www.youtube.com/watch?v=skdOVaiRq1c", "text": null, "createdAt": null, "author": { "id": "UCXuqSBlHAE6Xw-yeJA0Tunw", "username": "LinusTechTips", "displayName": "Linus Tech Tips", "avatarUrl": null, "verified": false, "url": "https://www.youtube.com/@LinusTechTips" }, "stats": { "views": 1300000, "likes": null, "comments": null, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "video", "url": null, "thumbnailUrl": "https://i.ytimg.com/vi/skdOVaiRq1c/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD53p9Eutt1Tbk_OfZSNQYUG77X5g", "width": null, "height": null, "durationSeconds": 938 } ], "hashtags": [], "mentions": [], "ext": { "kind": "video", "title": "Don’t Break Into my Grandparents House", "durationSeconds": 938, "publishedText": "7 days ago", "category": null, "keywords": [], "chapters": [], "music": [], "liveNow": false, "unlisted": false, "familySafe": null, "membersOnly": false, "channelSubscribers": null } } ], "pagination": { "nextCursor": null, "hasMore": false }}