# Search videos

Returns videos matching a keyword, with sort, recency, duration and content-type filters.

- Platform: Douyin V2
- Request: `GET https://api.toolzerhub.com/v2/douyin/search/videos`
- Auth: `x-api-key` header
- Cost: 15 credits per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/douyin-v2/search/search-douyin-videos

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `keyword` | query | yes | string | Search term. |
| `cursor` | query | no | integer | Continuation cursor from the previous response (cursor/max_cursor). Omit or 0 for the first page. Default: 0. |
| `sort_type` | query | no | enum: 0, 1, 2 | 0 comprehensive, 1 most liked, 2 most recent. Default: 0. |
| `publish_time` | query | no | enum: 0, 1, 7, 180 | Age of the post in days: 0 any time, 1 last day, 7 last week, 180 last six months. Default: 0. |
| `filter_duration` | query | no | enum: 0, 0-1, 1-5, 5-10000 | Video length in minutes: 0 any, 0-1 under a minute, 1-5, 5-10000 over five minutes. Default: 0. |
| `content_type` | query | no | enum: 0, 1, 2, 3 | 0 any, 1 video, 2 image/text, 3 article. Default: 0. |
| `search_id` | query | no | string | Continuation token echoed from the previous search response. Send it together with cursor to page; omit for the first page. |

## Example request

```bash
curl "https://api.toolzerhub.com/v2/douyin/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.
