# Douyin General Search API

> Search Douyin (Chinese TikTok) from the app's general search tab and get videos with descriptions, authors and play, like, comment and share counts. Filter by sort, publish time, duration and content type.

Source: https://www.sandbase.ai/apis/douyin/search/general-search-v1
API reference: https://www.sandbase.ai/apis/douyin/search/general-search-v1/docs

## Facts

- Provider: Douyin
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/douyin/search/general-search-v1`
- 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/general-search-v1` 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 General Search API?

Send a POST request to https://api.sandbase.ai/v1/api/douyin/search/general-search-v1 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 General 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 General 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 General 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 General 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 General Search API

Search Douyin's general (comprehensive) tab for a keyword. Results include videos with their description, author, statistics and share URL.

#### Use cases

- Discover trending Douyin content for a keyword.
- Find creators and videos for influencer marketing.
- Monitor brand or product mentions on Douyin.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/douyin/search/general-search-v1" \
  -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., "cat" |
| `backtrace` | string | No | Backtrace identifier (empty for first request, obtained from previous response for pagination) |
| `search_id` | string | No | Search ID (empty for first request, obtained from previous response for pagination) |
| `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
{
  "cursor": 10,
  "has_more": 1,
  "search_id": "<search_id>",
  "backtrace": "<backtrace>",
  "data": [
    {
      "type": 1,
      "aweme_info": {
        "aweme_id": "7565738211130035491",
        "create_time": 1761818400,
        "duration": 94000,
        "desc": "猫咪离家出走千万不要去找它 #养猫人#猫咪#养猫日常#养猫经验分享#新手养猫#养猫百科#萌宠#养猫…",
        "author": {
          "nickname": "<user>",
          "sec_uid": "<sec_uid>"
        },
        "statistics": {
          "play_count": 0,
          "digg_count": 86129,
          "comment_count": 4957,
          "share_count": 5232,
          "collect_count": 61272
        },
        "share_url": "https://www.iesdouyin.com/share/video/7565738211130035491/?…"
      }
    }
  ]
}
```

#### Notes

- For the next page, pass back `cursor`, `search_id` and `backtrace` from the previous response.
- Filters (`sort_type`, `publish_time`, `filter_duration`, `content_type`) use string codes; `"0"` means no filter.

#### Related APIs

- [Douyin Video Search](/model/douyin/search/video-search-v2): Search Douyin videos by keyword and get 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.
