List the videos published under a TikTok challenge. Feed in the challenge ID returned by challenge-info and the endpoint hands back the item list for that hashtag, each video with its author, caption, sound and engagement counts. Count and cursor page through the tag, and the hasMore flag signals when a campaign has been read all the way to the end.
curl -X GET "https://api.primeapi.co/challenge-posts?challengeId=763263&count=5&cursor=0" \
-H "X-PrimeAPI-Key: YOUR_API_KEY"
import requests
url = "https://api.primeapi.co/challenge-posts?challengeId=763263&count=5&cursor=0"
headers = {"X-PrimeAPI-Key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
print("Credits left:", response.headers.get("X-PrimeAPI-Balance"))
{
"cursor": "5",
"extra": {
"fatal_item_ids": [],
"logid": "20250118002328BF714AA02903AF43CAF5",
"now": 1737159810000
},
"hasMore": true,
"itemList": [
{
"AIGCDescription": "",
"BAInfo": "",
"CategoryType": 120,
"adAuthorization": false,
"adLabelVersion": 0,
"aigcLabelType": 0,
"author": {
"avatarLarger": "https://p16-sign-sg.tiktokcdn.com/aweme/1080x1080/tos-alisg-avt-0068/8b658e414119e502c9066ecb97541b52.jpeg?lk3s=a5d48078&nonce=20011&refresh_token=2a3d62561b110427c4f4c7b1dcb5b1fd&x-expires=1737331200&x-signature=v7YvhFOgPH2RRllwAadNQnRMcso%3D&shp=a5d48078&shcp=b59d6b55",
"avatarMedium": "https://p16-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/8b658e414119e502c9066ecb97541b52.jpeg?lk3s=a5d48078&nonce=54775&refresh_token=b27a90505f7911ffd55bf9355dff4201&x-expires=1737331200&x-signature=Vg3QQOT0MACyJb1QKb1nhtASd2g%3D&shp=a5d48078&shcp=b59d6b55",
"avatarThumb": "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/tos-alisg-avt-0068/8b658e414119e502c9066ecb97541b52.jpeg?lk3s=a5d48078&nonce=35950&refresh_token=99431fae3f313e88503df5e837c70fd2&x-expires=1737331200&x-signature=rcrA51usvaYyDtGyR87ia9t9wDk%3D&shp=a5d48078&shcp=b59d6b55",
"commentSetting": 0,
"downloadSetting": 0,
"duetSetting": 0,
"ftc": false,
"id": "6703096552636220418",
"isADVirtual": false,
"isEmbedBanned": false,
"nickname": "V\u00e2n Cherry \ud83c\udf52",
"openFavorite": false,
"privateAccount": false,
"relation": 0,
"secUid": "MS4wLjABAAAAIdiwKinoTNH2mkD1W8y94xQXCn8QfCaEiDicNdF0RZEQMd49sGczYRtkXptX1I1y",
"secret": false,
"signature": "\ud83d\ude39\ud83d\ude39",
"stitchSetting": 0,
"ttSeller": false,
"uniqueId": "vancherry99",
"verified": false
},
"authorStats": {
"diggCount": 3086,
"followerCount": 287400,
"followingCount": 29,
"friendCount": 0,
"heart": 2100000,
"heartCount": 2100000,
"videoCount": 295
},
"collected": false,
"contents": [
... (truncated)