# Douyin Video Search API

> Search Douyin (TikTok China) videos by keyword with sort, publish-time, duration, and page filters; later pages require the previous search ID. Use it to support content discovery and trend research.

Source: https://www.sandbase.ai/model/douyin/search-video
API reference: https://www.sandbase.ai/model/douyin/search-video/docs

## Facts

- Provider: Douyin
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/douyin/search-video`
- Price: $0.02 per call
- Capabilities: api, douyin, social media
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/douyin/search-video` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `keyword` | string | yes |  |
| `sortType` | string | no | _0, _1, _2 |
| `publishTime` | string | no | _0, _1, _7, _180 |
| `duration` | string | no | _0, _1, _2, _3 |
| `page` | integer | no |  |
| `searchId` | string | no |  |

## FAQ

### How do I use the Douyin Video Search API?

Send a POST request to https://api.sandbase.ai/v1/api/douyin/search-video with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Douyin Video Search API cost?

$0.02 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Douyin Video Search API accept?

Required: keyword (string). Optional: sortType (one of _0, _1, _2), publishTime (one of _0, _1, _7, _180), duration (one of _0, _1, _2, _3), page (integer) and searchId (string). The Parameters table and the Playground on this page list every field.

### What does the Douyin Video Search API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Douyin developer account or API key?

No. Douyin Video Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Douyin API access separately.

## README

### Douyin Video Search API

Search Douyin (TikTok China) videos by keyword with sort, publish-time, duration, and page filters; later pages require the previous search ID. Use it to support content discovery and trend research.

The response is the platform's original data structure.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "douyin/search-video", "keyword": "美食"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `keyword` | string | Yes | The search keyword. |
| `sortType` | string | No | Sorting criteria for search results. |
| `publishTime` | string | No | Filter by video publish time range. |
| `duration` | string | No | Filter by video duration. |
| `page` | integer | No | Page number (starting from 1). |
| `searchId` | string | No | Search ID; required for pages > 1. Use data.business_config.next_page.search_id from the previous response, and stop paging when data.business_config.has_more is 0. |

#### Pricing

Flat price per call. Failed calls and empty results are not charged.
