Skip to Content

Profile Posts

A channel's videos, 30 a page.

GET
/v1/youtube/profile/posts

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

handle?string

The channel's handle, with or without @.

channelId?string

The channel's id, instead of handle.

url?string

The channel's link, instead of either.

sort?string

latest (the default), popular or oldest.

Value in"latest""popular""oldest"
cursor?string

nextCursor of the previous page.

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

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.youtube.profilePosts({ handle: "LinusTechTips" });
Example Response
{  "data": [    {      "id": "qiLUvCt3k6g",      "url": "https://www.youtube.com/watch?v=qiLUvCt3k6g",      "text": null,      "createdAt": null,      "author": {        "id": "UCXuqSBlHAE6Xw-yeJA0Tunw",        "username": "LinusTechTips",        "displayName": null,        "avatarUrl": null,        "verified": false,        "url": "https://www.youtube.com/@LinusTechTips"      },      "stats": {        "views": null,        "likes": null,        "comments": null,        "shares": null,        "saves": null,        "engagementRate": null      },      "media": [        {          "kind": "video",          "url": null,          "thumbnailUrl": "https://i.ytimg.com/vi/qiLUvCt3k6g/hq720.jpg?sqp=-oaymwEgCNAFEJQDSFXyq4qpAxIIARUAAIhCGAFwAcABBrgC8xg=&rs=AOn4CLDyg9jZ3BhuZ79l1lOJnHNdn-lBCg",          "width": null,          "height": null,          "durationSeconds": 4182        }      ],      "hashtags": [],      "mentions": [],      "ext": {        "kind": "video",        "title": "Linus is 3 hours late for WAN - Why is WAN Late Episode 28",        "durationSeconds": 4182,        "publishedText": "1 day ago",        "category": null,        "keywords": [],        "chapters": [],        "music": [],        "liveNow": false,        "unlisted": false,        "familySafe": null,        "membersOnly": true,        "channelSubscribers": null      }    },    {      "id": "dXo5AvXG8Ds",      "url": "https://www.youtube.com/watch?v=dXo5AvXG8Ds",      "text": null,      "createdAt": null,      "author": {        "id": "UCXuqSBlHAE6Xw-yeJA0Tunw",        "username": "LinusTechTips",        "displayName": null,        "avatarUrl": null,        "verified": false,        "url": "https://www.youtube.com/@LinusTechTips"      },      "stats": {        "views": null,        "likes": null,        "comments": null,        "shares": null,        "saves": null,        "engagementRate": null      },      "media": [        {          "kind": "video",          "url": null,          "thumbnailUrl": "https://i.ytimg.com/vi/dXo5AvXG8Ds/hq720.jpg?sqp=-oaymwEgCNAFEJQDSFXyq4qpAxIIARUAAIhCGAFwAcABBrgC8xg=&rs=AOn4CLAUb8fYnhWq_m-Dd_gEMTPmVQXyGA",          "width": null,          "height": null,          "durationSeconds": 2112        }      ],      "hashtags": [],      "mentions": [],      "ext": {        "kind": "video",        "title": "Extras - AMD Upgrade Luke",        "durationSeconds": 2112,        "publishedText": "1 day ago",        "category": null,        "keywords": [],        "chapters": [],        "music": [],        "liveNow": false,        "unlisted": false,        "familySafe": null,        "membersOnly": true,        "channelSubscribers": null      }    }  ],  "pagination": {    "nextCursor": "4qmFsgK9ChIYVUNYdXFTQmxIQUU2WHcteWVKQTBUdW53GqAKOGdiUEJ4ck1CM3JKQnpyR0J3b2tObVF5WkRCaFptUXRNREF3TUMweVpXWm1MVGc1TWpRdE9UZzVPR1ppWWpjNU1tVTFFcHNIUVdOV09GWmtXRVppUkdSUU1rMVVSVE5WVHpGVFl6WlFOSEp0UVRGZlMxcG9Ra3BNUzFOVk9UUktabTV2YlRSTE1XaFNUSFV6WjBKVk5sWm9kWGRLZDBSeFEyeFNSMVZ2YzNWZlR5MVRjamh0VDJka2NYUm5jREpGUW5CVE9WRjNOekJtYVhsRVYyVjJOMjlEY1hOaU5sUmZhV3BVUzI5a1dIZExPRFZ5U0U1WFVtcFFXbXhXVFVKWU1rNUpkRXRV…",    "hasMore": true  }}