Skip to Content

Collection Posts

The posts of a public saved collection, 30 a page.

GET
/v1/tiktok/collection/posts

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

url?string

The public saved collection's link (https://www.tiktok.com/@user/collection/<name>-7311…).

id?string

The collection's id, instead of url.

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.tiktok.collectionPosts({ id: "7394627756635573022" });
Example Response
{  "data": [    {      "id": "7399631056783035690",      "url": "https://www.tiktok.com/@nojo18/video/7399631056783035690",      "text": null,      "createdAt": "2024-08-05T12:27:54.000Z",      "author": {        "id": "6791598551904076805",        "username": "nojo18",        "displayName": "Noah Lyles",        "avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/16b25128fbffca038bc04db11c0fd800~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=3fd09f88&x-expires=1795730400&x-signature=b0YBYWFFQFpBeomvowb0mzqX%2Fxs%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my",        "verified": true,        "url": "https://www.tiktok.com/@nojo18"      },      "stats": {        "views": 3400000,        "likes": 500900,        "comments": 3095,        "shares": 22600,        "saves": 39038,        "engagementRate": 0.1549      },      "media": [        {          "kind": "video",          "url": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-ve-37c799-sg/oUkVwAAXMSQY8EEmusFfDBgIfxk1VtIbRGDnEE/?a=1988&bti=ODszNWYuMDE6&&bt=1152&ft=-Csk_mK9PD12Nb4GgY-UxxjvXY6e3wv25LcAp&mime_type=video_mp4&rc=ZWg0NTtoZWRpZWY2aWdnaUBpanlydm05cmtmdDMzZzczNEBiYF5eYWBhXy0xMmJfNS4wYSNqLWdqMmQ0XmxgLS1kMS9zcw%3D%3D&expire=1795731896&l=202611250624084F9A79E535EE0A17665E&ply_type=2&policy=2&signature=d2da5ff995ae12a5f33f222a2105560f&tk=tt_chain_token&btag=e00088000",          "thumbnailUrl": "https://p16-common-sign.tiktokcdn.com/tos-useast5-p-0068-tx/oYQIDWNuYCYeHwMTg8ffGkBAQLFT0YdJD7qAjS~tplv-tiktokx-origin.image?dr=14575&x-expires=1795730400&x-signature=Qf3SB2JVZVlg2ftMSoVgwsu78f0%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=my",          "width": 768,          "height": 576,          "durationSeconds": 48        }      ],      "hashtags": [],      "mentions": [],      "ext": {        "authorSecUid": "MS4wLjABAAAAH10iXqncdQ9WqgUozawE5UFvRGS_WuS7bqXNwCmYyURFVweqtROjIPuZOB6ctng1",        "sound": {          "id": "7399631020024285998",          "title": "original sound",          "artist": "Noah Lyles",          "original": true        },        "durationSeconds": 48,        "reposts": null,        "pinned": false,        "ad": false,        "playlistId": null,        "region": null,        "language": null,        "screenText": [],        "subtitles": [          {            "language": "eng-US",            "format": "webvtt",            "source": "ASR"          }        ]      }    },    {      "id": "7399613114368396574",      "url": "https://www.tiktok.com/@nikita.ducarroz/video/7399613114368396574",      "text": "Until next time! 🫢🏻 #olympics #paris2024 #olympicgames #bmx #OlympicVillage",      "createdAt": "2024-08-05T11:18:48.000Z",      "author": {        "id": "6765667025392108550",        "username": "nikita.ducarroz",        "displayName": "Nikita Ducarroz",        "avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/034acdd1b4d32f87ed37bf9b8ea48185~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=429b63b5&x-expires=1795730400&x-signature=y599xBYm5lv6TGKP2LL4B6uUGUQ%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my",        "verified": false,        "url": "https://www.tiktok.com/@nikita.ducarroz"      },      "stats": {        "views": 152800,        "likes": 15700,        "comments": 148,        "shares": 91,        "saves": 540,        "engagementRate": 0.1043      },      "media": [        {          "kind": "video",          "url": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-ve-37c799-sg/oYCtpyIAqTAiZiFt2rIU3WfOCnBQiACE1QSz8w/?a=1988&bti=ODszNWYuMDE6&&bt=1605&ft=-Csk_mK9PD12Nb4GgY-UxxjvXY6e3wv25LcAp&mime_type=video_mp4&rc=NWZnNzU3ZmQ7Z2Q0aWczO0Bpam5xNnE5cnNldDMzaTczNEA2LWFhMDMtNmExXi4yXjNiYSNgXmlyMmRjNGxgLS1kMTJzcw%3D%3D&expire=1795731858&l=202611250624084F9A79E535EE0A17665E&ply_type=2&policy=2&signature=b97f2699a83db7e2036232d79b0b3a1a&tk=tt_chain_token&btag=e000b0000",          "thumbnailUrl": "https://p16-common-sign.tiktokcdn.com/tos-useast8-p-0068-tx2/54ce5365fc8e49c19d91dd07815cd894_1722856730~tplv-tiktokx-origin.image?dr=14575&x-expires=1795730400&x-signature=54j6HimOikZc4YfK0OdCl7yH%2FJQ%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=my",          "width": 576,          "height": 1024,          "durationSeconds": 10        }      ],      "hashtags": [        "olympics",        "paris2024",        "olympicgames"      ],      "mentions": [],      "ext": {        "authorSecUid": "MS4wLjABAAAAV8vrjebD8zqVNPqUJg4slIdqErA77t-Hi-CTHphLQVHp7MhvcHvASPOJ-JZ03Bd3",        "sound": {          "id": "6714159100260813573",          "title": "sad SpongeBob music",          "artist": "michael",          "original": true        },        "durationSeconds": 10,        "reposts": null,        "pinned": false,        "ad": false,        "playlistId": "7399001233681550126",        "region": null,        "language": "en",        "screenText": [          "Unfortunately I have left the Olympic Villa."        ],        "subtitles": []      }    }  ],  "pagination": {    "nextCursor": "30",    "hasMore": true  }}