Results of TikTok's "Top" search tab for a keyword: videos and photo carousels with captions and engagement counts.
2 credits/ call
Never more than 3 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/tiktok.search_top" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"dogs"}'{
"output": {
"found": true,
"data": {
"hasMore": "<boolean | null>",
"nextCursor": "<string | null>",
"items": [
{
"durationSeconds": "<number | null>",
"likes": "<integer | null>",
"comments": "<integer | null>",
"authorVerified": "<boolean | null>", …
}
]
}
},
"credits": 2
}Input and output
5 fields
dogs.31 fields
Good to know
Flat price per page.
Only post cards are returned (user/sound/hashtag cards of the mixed tab are dropped).
Pass nextCursor to continue.
Zero hits return found: false. A miss is an answer, not an error.
The same key and credits work for every API.