TikTok API endpoint
Searches TikTok videos for `keyword`. `cursor` defaults to 0 and `count` defaults to 20, capped at 50. The response has the matching video items, a `cursor` and `has_more` for paging. An empty, blocked or malformed result from TikTok returns an upstream error.
/tiktok/searchQuery parameters:
keyword: required. Search keyword. Example: dance.cursor: optional. Pagination cursor. Default: 0.count: optional. Result count, clamped to 50. Default: 20.Notable response behavior:
TikTokAPIHost points to a compatible signer.| Field | Filled in, of 20 checked | Values in the sample |
|---|---|---|
| common | 20 | |
| item | 20 | |
| type | 20 | 1 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| x-api-key (header) | string | Yes | API key required | ||
| keyword | string | Yes | Search keyword | dance | |
| cursor | integer | No | Pagination cursor | ||
| count | integer | No | Result count, clamped to 50 |
curl -X GET "https://api.crawlora.net/api/v1/tiktok/search?keyword=dance&count=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"type": 1,
"data": [
{
"item": {
"id": "7627480436649757959"
}
}
],
"cursor": 20,
"has_more": 1,
"status_code": 0
}
}Request schema
No body schema
Response schema
#/definitions/tiktok.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | tiktok.SearchResp | No | ||||
| data.cursor | integer | No | Cursor to pass in the next request to get the next page of results. | |||
| data.data | array | No | Search results, one entry per matching video, as TikTok returns them. | |||
| data.extra | unknown | No | Response metadata from TikTok, such as the request log id. | |||
| data.feedback_type | string | No | Feedback type label that TikTok returns with the search results. | |||
| data.has_more | integer | No | Whether more results remain after this page, as a number (`1` for yes). | |||
| data.input_keyword | string | No | Search keyword that was run. | |||
| data.itemList | array | No | Matching videos, as TikTok returns them. Often `null` when results are in `data`. | |||
| data.log_pb | object | No | Request tracking information from TikTok, holding the `impr_id` impression id. | |||
| data.log_pb.impr_id | string | No | ||||
| data.qc | string | No | Query token that TikTok returns with the search results. | |||
| data.rid | string | No | Request id that TikTok returns with the search results. | |||
| data.status_code | integer | No | TikTok status code for the request. `0` on a successful response. | |||
| data.status_msg | string | No | Status message that goes with the status code. | |||
| data.type | integer | No | Result type code that TikTok returns with the search results. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Invalid input | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/tiktok/search?keyword=dance&count=10" \
-H "x-api-key: $CRAWLORA_API_KEY"