Post Related
The videos YouTube suggests beside one, about 20 a page.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe video's link.
id?stringThe video'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.postRelated({ url: "https://www.youtube.com/watch?v=Ip5EiqbuBpE" });Example Response
{ "data": [ { "id": "Yb9r-EMxrbw", "url": "https://www.youtube.com/watch?v=Yb9r-EMxrbw", "text": null, "createdAt": null, "author": { "id": "UCH_7doiCkWeq0v3ycWE5lDw", "username": "any_austin", "displayName": "Any Austin", "avatarUrl": null, "verified": false, "url": "https://www.youtube.com/@any_austin" }, "stats": { "views": null, "likes": null, "comments": null, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "video", "url": null, "thumbnailUrl": "https://i.ytimg.com/vi/Yb9r-EMxrbw/hqdefault_custom_2.jpg?sqp=CPCkm9gG-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAUWL53cSLK1iQAHwsjdmwx1fGL2Q", "width": null, "height": null, "durationSeconds": 920 } ], "hashtags": [], "mentions": [], "ext": { "kind": "video", "title": "Grand Theft Auto VI is Full of Things You’d Never Notice", "durationSeconds": 920, "publishedText": "19h ago", "category": null, "keywords": [], "chapters": [], "music": [], "liveNow": false, "unlisted": false, "familySafe": null, "membersOnly": false, "channelSubscribers": null } }, { "id": "cc5C8hRblBY", "url": "https://www.youtube.com/watch?v=cc5C8hRblBY", "text": null, "createdAt": null, "author": { "id": "UCBJycsmduvYEL83R_U4JriQ", "username": "mkbhd", "displayName": "Marques Brownlee", "avatarUrl": null, "verified": false, "url": "https://www.youtube.com/@mkbhd" }, "stats": { "views": null, "likes": null, "comments": null, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "video", "url": null, "thumbnailUrl": "https://i.ytimg.com/vi/cc5C8hRblBY/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBpvxa62pJALVQ27VncG_7iYcVZCA", "width": null, "height": null, "durationSeconds": 1296 } ], "hashtags": [], "mentions": [], "ext": { "kind": "video", "title": "I'm Starting Over", "durationSeconds": 1296, "publishedText": "1d ago", "category": null, "keywords": [], "chapters": [], "music": [], "liveNow": false, "unlisted": false, "familySafe": null, "membersOnly": false, "channelSubscribers": null } } ], "pagination": { "nextCursor": "CBQSDRILSXA1RWlxYnVCcEUYACrkFDJzNkw2d3pFRHdyQkR3b0Q4ajRBQ2czQ1Bnb0l2TnZHbVlUXzJ0OWhDZ1B5UGdBS0RjSS1DZ2lXcU82aW9kNlE1M0VLQV9JLUFBb053ajRLQ0xUZjdQZjNtUG5SS3dvRDhqNEFDZzdDUGdzSS1mYXdxLXJpM3VtUUFRb0Q4ajRBQ2czQ1Bnb0lnSi1yaloyaG9mMUNDZ1B5UGdBS0RzSS1Dd2pZaDQ3dWpfSEcxN2NCQ2dQeVBnQUtEc0ktQ3dqTzNNR2xqSkQ2bkx3QkNnUHlQZ0FLRGNJLUNnamxxOS1TdjhyQTNRZ0tBX0ktQUFvTndqNEtDTVdBMC1Da3JQSG5JUW9EOGo0QUNnN0NQZ3NJc0pDeHlf…", "hasMore": true }}