# TikTok Search API

> Search TikTok by keyword across videos and users (Top tab). Returns videos with descriptions, authors and play, like, comment and share counts, with sort and publish-time filters.

Source: https://www.sandbase.ai/apis/tiktok/app-v3/general-search-result
API reference: https://www.sandbase.ai/apis/tiktok/app-v3/general-search-result/docs

## Facts

- Provider: TikTok
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, tiktok
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `keyword` | string | yes |  |
| `count` | integer | no |  |
| `offset` | integer | no |  |
| `publish_time` | integer | no |  |
| `sort_type` | integer | no |  |

## FAQ

### How do I use the TikTok Search API?

Send a POST request to https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result 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 TikTok Search API cost?

$0.0015 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 TikTok Search API accept?

Required: keyword (string). Optional: count (integer), offset (integer), publish_time (integer) and sort_type (integer). The Parameters table and the Playground on this page list every field.

### What does the TikTok 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 TikTok developer account or API key?

No. TikTok 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 TikTok API access separately.

## README

### TikTok Search API

Search TikTok's Top results for a keyword. Results include videos with statistics and matching user cards. Sort by relevance or likes and filter by publish date.

#### Use cases

- Discover trending TikTok content for a keyword.
- Find creators for influencer campaigns.
- Monitor brand or product mentions on TikTok.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "openai", "count": 5}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `keyword` | string | Yes | Keyword |
| `count` | integer | No | Number |
| `offset` | integer | No | Offset |
| `sort_type` | integer | No | 0-Relatedness, 1-Most likes |
| `publish_time` | integer | No | 0-Unlimited, 1-Last day, 7-Last week, 30-Last month, 90-Last three months, 180-Last half year |

#### Example response

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

```json
{
  "has_more": 1,
  "cursor": 5,
  "data": [
    {
      "type": 1,
      "aweme_info": {
        "aweme_id": "7692955431185992991",
        "create_time": 1791155775,
        "desc": "OpenAI Codex is getting an upgrade or a full rese…",
        "author": {
          "nickname": "<user>",
          "sec_uid": "<sec_uid>"
        },
        "statistics": {
          "play_count": 54972,
          "digg_count": 1735,
          "comment_count": 148,
          "share_count": 496,
          "collect_count": 312
        }
      }
    }
  ]
}
```

#### Notes

- `sort_type`: 0 relevance, 1 most likes. `publish_time`: 0, 1, 7, 30, 90 or 180 days.
- Paginate with `offset`.

#### Related APIs

- [TikTok LIVE Status](/model/tiktok/app-v3/check-live-room-online): Check whether a TikTok LIVE room is currently live by room ID.
- [TikTok Creator Search Insights](/model/tiktok/app-v3/creator-search-insights): Get TikTok Creator Search Insights: trending search queries with popularity scores, trend history and video counts, including content-gap topics, by category a…
- [TikTok Creator Search Insights Detail](/model/tiktok/app-v3/creator-search-insights-detail): Get detailed statistics for a TikTok Creator Search Insights query: popularity over time and audience breakdown by age, gender and country.
