# Xigua Video Scraper 西瓜视频: Keyword & Hashtag, Stats & MP4 Links (`getascraper/xigua-video-search-scraper`) Actor

Search Xigua (西瓜视频) by keyword or hashtag. Extracts play counts, like counts, author profiles, cover images, and MP4 download links. Up to 1,000 results per search. 西瓜视频爬虫 / 西瓜视频下载.

- **URL**: https://apify.com/getascraper/xigua-video-search-scraper.md
- **Developed by:** [GetAScraper](https://apify.com/getascraper) (community)
- **Categories:** Social media, Videos, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.49 / 1,000 video results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Xigua video search scraper: keyword search for Chinese video data

Get Xigua (西瓜视频) video results by keyword or hashtag, with play counts, likes, author profiles, and cover images, ready for your spreadsheet in minutes.

### What does this actor do?

Xigua Video is one of China's largest long-form video platforms with over 300 million users, operated by ByteDance. This actor searches it by keyword or hashtag and returns a structured dataset of matching videos, including engagement metrics, author details, and direct video URLs.

Each run delivers:

- Video titles, categories, durations, and publish dates
- Play counts, like counts, share counts, and comment counts
- Author name, follower count, avatar URL, and channel description
- Direct video page URL and high-resolution cover image URL
- Optional deep detail extraction for playback stream links (fetchVideoDetails)

### Who uses this actor?

- **I am a brand intelligence analyst** monitoring how Chinese consumers discuss travel, food, and tech categories on Xigua so I can compile quarterly trend reports for my marketing leadership.
- **I am a content strategist at a media agency** tracking which video topics dominate Xigua search results in target niches so I can identify content gaps and inform our brand's cross-market editorial calendar.
- **I am an influencer marketing manager** gathering follower counts and video engagement data for Xigua creators in specific categories so I can benchmark brand deal rates in the Chinese market before approaching partners.
- **I am an e-commerce seller** identifying which product demonstration and unboxing videos are gaining traction on Xigua so I can time my inventory orders before demand spikes reach Western platforms.

### Data table

| Field | Type | Description |
|-------|------|-------------|
| `entityType` | string | Always `video`. |
| `query` | string | The search keyword used to find this result. |
| `searchType` | string | `keyword` or `hashtag`, depending on input. |
| `groupId` | string | Unique video identifier on the platform. |
| `title` | string | Video title with emphasis formatting removed. |
| `abstract` | string | Short video summary or description text. |
| `videoDurationSecs` | number | Video length in seconds. |
| `publishTimeIso` | string | Publish date and time in ISO 8601 format. |
| `videoUrl` | string | Direct URL to the video page on Xigua. |
| `playCount` | number | Total play count reported by the platform. |
| `commentCount` | number | Total comment count reported by the platform. |
| `diggCount` | number | Like count (digg) for the video. Null if not available. |
| `shareCount` | number | Share count for the video. Null if not available. |
| `buryCount` | number | Dislike count for the video. Null if not available. |
| `isOriginal` | boolean | Whether the video is marked as original content. Null if not reported. |
| `authorName` | string | Creator's display name or channel name. |
| `authorId` | string | Unique numerical user ID of the creator. |
| `authorAvatar` | string | URL to the creator's profile avatar image. |
| `authorFollowers` | number | Creator's follower count. Null if not available. |
| `authorDescription` | string | Creator's channel bio or signature text. |
| `coverUrl` | string | URL to the high-resolution video cover image. |
| `videoCategoryName` | string | Category name assigned to the video on Xigua. |
| `playback` | object | Playback stream metadata including variants. Populated when fetchVideoDetails is enabled. |
| `scrapedAt` | string | Timestamp when this record was extracted, in ISO 8601 format. |

#### Sample output record

```json
{
  "entityType": "video",
  "query": "旅行",
  "searchType": "keyword",
  "groupId": "7341892340123456789",
  "title": "一个人的西藏之旅：14天骑行全程真实记录",
  "abstract": "一个人的西藏之旅：14天骑行全程真实记录",
  "videoDurationSecs": 1847,
  "publishTimeIso": "2026-04-15T08:23:00.000Z",
  "videoUrl": "https://www.ixigua.com/7341892340123456789",
  "playCount": 4280000,
  "commentCount": 12300,
  "diggCount": 89400,
  "shareCount": 23100,
  "buryCount": 142,
  "isOriginal": true,
  "authorName": "骑行达人阿峰",
  "authorId": "5693412870",
  "authorAvatar": "https://p3.ixigua.com/tos-cn-avt-0015/6930884702659584.image",
  "authorFollowers": 280000,
  "authorDescription": "环游中国摩托骑行博主",
  "coverUrl": "https://p3.ixigua.com/tos-cn-i-qvj2lq49k0/cover_7341892340123456789_large.jpg",
  "videoCategoryName": "旅行",
  "scrapedAt": "2026-06-29T14:45:12.000Z"
}
````

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `queries` | array | Yes | Keywords or hashtags to search. Each entry runs as a separate, independent search (e.g. `旅行`, `美食`, `#搞笑`). |
| `searchType` | enum | No | How queries are interpreted: `auto` detects # prefix, `keyword` forces keyword mode, `hashtag` forces hashtag mode. |
| `maxResultsPerQuery` | integer | No | Maximum videos to retrieve per keyword. Accepts values from 1 to 1,000. |
| `sortBy` | enum | No | Result ordering: `relevance` (default), `newest` for most recently published, or `mostPlayed` for highest play count. |
| `duration` | enum | No | Filter by video length: `any`, `under3m`, `3to5m`, `5to10m`, `10to30m`, `30to60m`, or `over60m`. |
| `fetchVideoDetails` | boolean | No | When enabled, visits each video page to extract MP4 stream URLs and richer engagement data. Increases cost per result. Disabled by default. |
| `proxyConfiguration` | proxy | Yes | Proxy settings. A mainland China residential proxy is pre-selected and required to access regional content. |

### Pricing

This actor uses pay-per-result pricing. You are charged only when a video record is successfully delivered to your dataset. Empty runs and failed requests cost nothing. There are no monthly subscriptions, platform fees, or minimum commitments.

### FAQ

**Can I search Xigua without a Chinese account or VPN?**
Yes. The actor handles regional access through its built-in proxy settings. No account, login, or personal VPN is required.

**How many results can I get per keyword?**
Up to 1,000 videos per keyword. Use `maxResultsPerQuery` to set the exact limit per run.

**Does the actor return video download links?**
By default it returns the canonical video page URL for each result. Enable `fetchVideoDetails` in the input to attempt extraction of direct playback stream URLs. Availability depends on the video's settings on Xigua.

**Can I search hashtag pages, not just keyword searches?**
Yes. Prefix any query with # (e.g. `#旅行`) or set `searchType` to `hashtag` to switch to hashtag search mode.

# Actor input Schema

## `queries` (type: `array`):

One keyword or hashtag per line. Add a # prefix for hashtag searches, for example: #旅行 or #美食.

## `searchType` (type: `string`):

Controls how your keywords are treated. Auto detects the # prefix for you.

## `sortBy` (type: `string`):

Ranking order applied to the search results.

## `duration` (type: `string`):

Only return videos within this length range. Leave on Any length to collect all results.

## `proxyConfiguration` (type: `object`):

Routes your searches through mainland China so Xigua accepts the connection. Leave this as the default.

## `fetchVideoDetails` (type: `boolean`):

Visit each video page to extract direct MP4 download URLs. This increases the cost per result. Leave off unless you specifically need the download links.

## `maxResultsPerQuery` (type: `integer`):

Maximum number of videos to collect for each keyword. You are charged only for videos successfully delivered.

## Actor input object example

```json
{
  "queries": [
    "旅行"
  ],
  "searchType": "auto",
  "sortBy": "relevance",
  "duration": "any",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CN"
  },
  "fetchVideoDetails": false,
  "maxResultsPerQuery": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "旅行"
    ],
    "searchType": "auto",
    "sortBy": "relevance",
    "duration": "any",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "CN"
    },
    "fetchVideoDetails": false,
    "maxResultsPerQuery": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("getascraper/xigua-video-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": ["旅行"],
    "searchType": "auto",
    "sortBy": "relevance",
    "duration": "any",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "CN",
    },
    "fetchVideoDetails": False,
    "maxResultsPerQuery": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("getascraper/xigua-video-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "旅行"
  ],
  "searchType": "auto",
  "sortBy": "relevance",
  "duration": "any",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CN"
  },
  "fetchVideoDetails": false,
  "maxResultsPerQuery": 20
}' |
apify call getascraper/xigua-video-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=getascraper/xigua-video-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Xigua Video Scraper 西瓜视频: Keyword & Hashtag, Stats & MP4 Links",
        "description": "Search Xigua (西瓜视频) by keyword or hashtag. Extracts play counts, like counts, author profiles, cover images, and MP4 download links. Up to 1,000 results per search. 西瓜视频爬虫 / 西瓜视频下载.",
        "version": "1.0",
        "x-build-id": "djtEdxy2m5tAjzgSW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/getascraper~xigua-video-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-getascraper-xigua-video-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/getascraper~xigua-video-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-getascraper-xigua-video-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/getascraper~xigua-video-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-getascraper-xigua-video-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries",
                    "proxyConfiguration"
                ],
                "properties": {
                    "queries": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "One keyword or hashtag per line. Add a # prefix for hashtag searches, for example: #旅行 or #美食.",
                        "default": [
                            "旅行"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchType": {
                        "title": "Search Mode",
                        "enum": [
                            "auto",
                            "keyword",
                            "hashtag"
                        ],
                        "type": "string",
                        "description": "Controls how your keywords are treated. Auto detects the # prefix for you.",
                        "default": "auto"
                    },
                    "sortBy": {
                        "title": "Sort Videos By",
                        "enum": [
                            "relevance",
                            "newest",
                            "mostPlayed"
                        ],
                        "type": "string",
                        "description": "Ranking order applied to the search results.",
                        "default": "relevance"
                    },
                    "duration": {
                        "title": "Video Length",
                        "enum": [
                            "any",
                            "under3m",
                            "3to5m",
                            "5to10m",
                            "10to30m",
                            "30to60m",
                            "over60m"
                        ],
                        "type": "string",
                        "description": "Only return videos within this length range. Leave on Any length to collect all results.",
                        "default": "any"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Settings",
                        "type": "object",
                        "description": "Routes your searches through mainland China so Xigua accepts the connection. Leave this as the default.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "CN"
                        }
                    },
                    "fetchVideoDetails": {
                        "title": "Fetch Video Download Links",
                        "type": "boolean",
                        "description": "Visit each video page to extract direct MP4 download URLs. This increases the cost per result. Leave off unless you specifically need the download links.",
                        "default": false
                    },
                    "maxResultsPerQuery": {
                        "title": "Results per Keyword",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of videos to collect for each keyword. You are charged only for videos successfully delivered.",
                        "default": 20
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
