# Search TikTok videos by keyword

Returns public TikTok videos matching `keyword`. Order with `sort_type`, filter by `publish_time` and `region`; continue with the response `cursor` as `offset` while `has_more` is nonzero.

- Platform: TikTok V2
- Request: `GET https://api.toolzerhub.com/v2/tiktok/app/search/videos`
- Auth: `x-api-key` header
- Cost: 2 credits per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/tiktok-v2/media/search-tik-tok-videos

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `keyword` | query | yes | string | Search term matched against public videos. |
| `offset` | query | no | string | Where the page starts. 0 for page one; for later pages send the previous response's cursor when it has one. |
| `count` | query | no | string | Number of items to request per page. |
| `sort_type` | query | no | string | Result ordering value. Leave unset for the default order. |
| `publish_time` | query | no | string | Filter by publication time. Leave unset for no time filter. |
| `region` | query | no | string | Two-letter country code, for example US, that localizes the results. |

## Example request

```bash
curl "https://api.toolzerhub.com/v2/tiktok/app/search/videos?keyword=<keyword>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
