# Xigua Video Search API

> Search Xigua Video (ByteDance long-form video) by keyword: titles, creators, duration, publish time and comment counts, with sort and duration filters.

Source: https://www.sandbase.ai/model/xigua/app-v2/search-video
API reference: https://www.sandbase.ai/model/xigua/app-v2/search-video/docs

## Facts

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

## Call it

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

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `keyword` | string | yes |  |
| `max_duration` | integer | no |  |
| `min_duration` | integer | no |  |
| `offset` | integer | no |  |
| `order_type` | string | no |  |

## FAQ

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

Send a POST request to https://api.sandbase.ai/v1/api/xigua/app-v2/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 Xigua Video 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 Xigua Video Search API accept?

Required: keyword (string). Optional: max_duration (integer), min_duration (integer), offset (integer) and order_type (string). The Parameters table and the Playground on this page list every field.

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

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

## README

### Xigua Video Search API

Search Xigua Video for a keyword and get matching videos. Filter by duration and paginate with `offset`.

#### Use cases

- Research long-form video content in China.
- Find creators for a topic.
- Monitor brand mentions in video.

#### Request

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

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `keyword` | string | Yes | Keyword |
| `offset` | integer | No | Offset, pass 0 for the first request, pass the offset returned by the previous request for subsequent requests |
| `order_type` | string | No | Order type, empty for default sorting, the following are optional sorting methods. |
| `max_duration` | integer | No | Maximum duration, default empty, in seconds. |
| `min_duration` | integer | No | Minimum duration, default empty, in seconds. |

#### Example response

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

```json
{
  "offset": 10,
  "results": [
    {
      "data": {
        "group_id": "7306123103342592551",
        "title": "Open AI 宫斗大戏始末，一场人工智能向人类发起的挑衅！",
        "publish_time": 1701089344,
        "video_duration": 793,
        "comment_count": 20,
        "source": "<user>"
      }
    }
  ]
}
```

#### Related APIs

- [Get single video data](/model/xigua/app-v2/one-video): Get single video data (less information, does not include title and other information, but includes information about related videos).
- [Get single video play URL](/model/xigua/app-v2/one-video-play-url): App V2 One Video Play Url provides a focused capability for applications, automation, and data workflows.
- [Personal information](/model/xigua/app-v2/user-info): Personal information.
