# Douyin Video Search API

> Search Douyin videos by keyword and get descriptions, authors and play, like, comment and share counts. Filter by sort order, publish time, duration and content type, with cursor pagination.

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

## Facts

- Provider: Douyin
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/douyin/search/video-search-v2`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, douyin
- 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-search-v2` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `backtrace` | string | no |  |
| `content_type` | string | no |  |
| `cursor` | integer | no |  |
| `filter_duration` | string | no |  |
| `keyword` | string | no |  |
| `publish_time` | string | no |  |
| `search_id` | string | no |  |
| `sort_type` | 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-search-v2 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.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

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

No parameters are required. Optional: backtrace (string), content_type (string), cursor (integer), filter_duration (string), keyword (string) and publish_time (string) and 2 more. 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). The README on this page includes a sample response.

### 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's video tab for a keyword. Each result includes the video description, author and statistics.

#### Use cases

- Find videos about a product or topic.
- Discover creators for influencer campaigns.
- Track video volume and engagement for a keyword.

#### Request

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

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `cursor` | integer | No | Pagination cursor (0 for the first page, use the last response cursor for subsequent pages) |
| `keyword` | string | No | Search keyword, e.g., "robot" |
| `backtrace` | string | No | Backtrace identifier used for pagination(obtained from the last response) |
| `search_id` | string | No | Search ID used for pagination(obtained from the last response) |
| `sort_type` | string | No | Sorting method |
| `content_type` | string | No | Content type filter |
| `publish_time` | string | No | Publish time filter |
| `filter_duration` | string | No | Video duration filter |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "business_data": [
    {
      "type": 1,
      "data": {
        "aweme_info": {
          "aweme_id": "7581331706625500153",
          "create_time": 1765166347,
          "duration": 289767,
          "desc": "科普分享一些猫的种类，你看你认识几种！#盘点#科普#分享#猫",
          "author": {
            "nickname": "<user>",
            "sec_uid": "<sec_uid>"
          },
          "statistics": {
            "play_count": 0,
            "digg_count": 55214,
            "comment_count": 3720,
            "share_count": 10943,
            "collect_count": 21141
          },
          "share_url": "https://www.iesdouyin.com/share/video/7581331706625500153/?…"
        }
      }
    }
  ],
  "business_config": {
    "has_more": 1,
    "next_page": {
      "cursor": 10,
      "search_id": "<search_id>"
    }
  }
}
```

#### Notes

- For the next page, pass back `cursor`, `search_id` and `backtrace` from the previous response.

#### Related APIs

- [Douyin General Search](/model/douyin/search/general-search-v1): Search Douyin (Chinese TikTok) from the app's general search tab and get videos with descriptions, authors and play, like, comment and share counts.
- [Fetch hashtag search V1](/model/douyin/search/challenge-search-v1): Fetch hashtag/challenge search results from Douyin App.
- [Fetch hashtag search V2](/model/douyin/search/challenge-search-v2): Fetch hashtag/challenge search results from Douyin App using V2 API.
