Skip to Content

Search Playlists

Playlists matching a query, about 20 a page.

GET
/v1/youtube/search/playlists

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

query*string

What to search for.

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.searchPlaylists({ query: "coffee" });
Example Response
{  "data": [    {      "id": "PL2Fx5UhWTfRLt5lhYOSvqOhXfVNaadFiK",      "name": "Coffee林芊妤 站立式Cardio 全身燃脂運動(按難度排)",      "url": "https://www.youtube.com/playlist?list=PL2Fx5UhWTfRLt5lhYOSvqOhXfVNaadFiK",      "coverUrl": "https://i.ytimg.com/vi/Wx5pgfStY3w/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCg8u6qZ3JjpUzHiSX8_3avKCBlMA",      "posts": 16,      "ext": {        "description": null,        "views": null,        "owner": null,        "updatedText": null,        "podcast": false      }    },    {      "id": "RDCLAK5uy_kuj0ZF7ijSaRt3ZlJ3iv2YOWBjp9zyF1Q",      "name": "Coffee Shop Indie",      "url": "https://www.youtube.com/playlist?list=RDCLAK5uy_kuj0ZF7ijSaRt3ZlJ3iv2YOWBjp9zyF1Q",      "coverUrl": "https://i9.ytimg.com/s_p/RDCLAK5uy_kuj0ZF7ijSaRt3ZlJ3iv2YOWBjp9zyF1Q/maxresdefault.jpg?sqp=CPCkm9gGir7X7AMICKrikdcGEAE=&rs=AOn4CLDxTTAZ4wK29GSE81C4O8PWPiWA7w&v=1793356074",      "posts": 100,      "ext": {        "description": null,        "views": null,        "owner": null,        "updatedText": null,        "podcast": false      }    }  ],  "pagination": {    "nextCursor": "EuMHEgZjb2ZmZWUa2AdFZ0lRQTBnVWdnRWlVRXd5Um5nMVZXaFhWR1pTVEhRMWJHaFpUMU4yY1U5b1dHWldUbUZoWkVacFM0SUJLMUpFUTB4QlN6VjFlVjlyZFdvd1drWTNhV3BUWVZKME0xcHNTak5wZGpKWlQxZENhbkE1ZW5sR01WR0NBU0pRVEZORVJXZHdhV0kyWTFwUlVWbERiMnBTYmxwUmEwVkhWREZaTms1QlRXaElnZ0VpVUV3MFQzWlRVemt0ZFU0d04zcHZRbWhrV1RJM0xXbHVSa2R2VTJkeWJWY3hiSUlCRFZCTVpVOWFaRXB0U0RKSlVqQ0NBU0pRVEVaTk0zWm1XVGs1VjA1U1dHY3dZek5CV0ZKNVIxOUVOWFZ6UjFodVRX…",    "hasMore": true  }}