Search Suggestions
GET/v1/tiktok/search/suggestions1 credit
Returns the search suggestions TikTok offers for a term, as you type it in the search box.
01Query parameters
| Name | Type | Description |
|---|---|---|
| queryrequired | string | The search term to complete. |
02Request
curl "https://api.scrapesocial.ai/v1/tiktok/search/suggestions?query=dogs" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/tiktok/search/suggestions?query=dogs
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"suggestions": [
{
"text": "dogs barking",
"position": 0,
"language": "en",
"score": 0.36812568
},
{
"text": "dogs xxl dog bedding",
"position": 1,
"language": "en",
"score": 0.2076032
}
]
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notes
The answer is `suggestions`, a list of `text`, `position`, `language` and `score`. No suggestions is an empty list for 0 credits.
05Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.