# Kuaishou Scraper (`natanielsantos/kuaishou-scraper`) Actor

This powerful tool enables you to extract video data and comments from Kuaishou, the Chinese version of Kwai. Use it to scrape post data, like URLs, numbers of followers, likes, video, music-related data and more. Download data as a HTML, JSON, CSV, Excel, or XML doc.

- **URL**: https://apify.com/natanielsantos/kuaishou-scraper.md
- **Developed by:** [Nataniel Santos](https://apify.com/natanielsantos) (community)
- **Categories:** Social media, Videos
- **Stats:** 100 total users, 15 monthly users, 99.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### What does Kuaishou Scraper do?

Kuaishou Scraper is an Apify actor that scrapes video data from Kuaishou short video URLs. It extracts information such as video ID, caption, creation time, thumbnail URL, video URL, author metadata, and music metadata.

<table style="width:100%">
<tr>
<td colspan="4" style="padding:10px 14px;background:#4C945E;border:none;border-radius:4px 4px 0 0">
<span style="color:#FAFAF9;font-size:14px;font-weight:700;letter-spacing:0.5px">Chinese Sites Scrapers</span>
<span style="color:#D7F4DD;font-size:13px">&nbsp;&nbsp;&bull;&nbsp;&nbsp;Check out other solutions we have</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 0 4px;border-right:none;border-top:none;background:#E8F5E9;vertical-align:top;width:25%">
<span style="white-space:nowrap"><img src="https://images.apifyusercontent.com/PhjmEXEGjN-3Y37jPNEW7ZfNP9sFV0XX8QCRCdft4OQ/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vY2gyQXdBQ1pxcVRhZkE3U2ctYWN0b3ItZU9pTW9qaW5wRjBUZXhub0otVWY1SFpYRTV2Uy1kb25nY2hlZGktUGhvdG9yb29tXyUyODElMjkucG5n.webp" width="20" height="20" style="vertical-align:middle;border-radius:4px"> &nbsp;<a href="https://apify.com/natanielsantos/dongchedi-video-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Dongchedi Video Scraper</a></span><br>
<span style="color:#78716C;font-size:11px">Profiles, Search, Categories...</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;background:#D3EDD9;vertical-align:top;width:25%">
<span style="white-space:nowrap"><img src="https://images.apifyusercontent.com/1CkX0OKHExFnhUfVzSYO9HoPbIOhFfPGBWkCfpDTMMY/rs:fill:250:250/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vY2gyQXdBQ1pxcVRhZkE3U2ctYWN0b3ItSUVlOHp6ZFBxVXZEaFp1NmUtT1BhSlZ4VU5Bdi1rdWFpc2hvdS1zb2NpYWwtcHJldmlldy5wbmc.webp" width="20" height="20" style="vertical-align:middle;border-radius:4px"> &nbsp;<a href="https://apify.com/natanielsantos/kuaishou-scraper" style="color:#4C945E;text-decoration:none;font-weight:700;font-size:13px">Kuaishou Scraper</a></span><br>
<span style="color:#4C945E;font-size:11px;font-weight:600">&#10148; You are here</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;background:#E8F5E9;vertical-align:top;width:25%">
<span style="white-space:nowrap"><img src="https://images.apifyusercontent.com/lRXcxYEnxYie0Q28aR2tcvkweAwe-trhjXA_BtkYpTU/rs:fill:250:250/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vY2gyQXdBQ1pxcVRhZkE3U2ctYWN0b3Itb25xUVZyUGg1azdjOEtZMzYtNUhsMWVkZElpeC1iYWlkdS10aWViYV8lMjgxJTI5LmpwZw.webp" width="20" height="20" style="vertical-align:middle;border-radius:4px"> &nbsp;<a href="https://apify.com/natanielsantos/baidu-tieba-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Baidu Tieba Scraper</a></span><br>
<span style="color:#78716C;font-size:11px">Forums, Profiles and Search</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 4px 0;border-top:none;background:#E8F5E9;vertical-align:top;width:25%">
<span style="white-space:nowrap"><img src="https://images.apifyusercontent.com/NB3YNaLrU_yctF6_ShfXrndyfzbzbzL4B7l7yv_9WzM/rs:fill:250:250/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vdXVkUENEdFV3c05wNm45aWIvSkF1Q2Y1RTJkbjZLMnZaZXMtRG91eWluLV9fLUxvZ28ucG5n.webp" width="20" height="20" style="vertical-align:middle;border-radius:4px"> &nbsp;<a href="https://apify.com/natanielsantos/douyin-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Douyin Scraper</a></span><br>
<span style="color:#78716C;font-size:11px">Search, Profiles and Video URLs</span>
</td>
</tr>
</table>

### Features

- 🔎 Get video data from Kuaishou's website
- 💬 Extract comments from videos
- ⚡ Fast and reliable scraping
- 🧑‍💻 Perfect for non-technical users
- 🔒 No need for authentication
- 🔄 Automatically handles retries for failed requests
- 📦 Outputs data in JSON format for easy integration with other tools

### 🎯 Who Is This For?

- Content creators looking to analyze Kuaishou videos
- Marketers researching video trends on Kuaishou
- Developers needing Kuaishou video data for their applications
- Data analysts conducting social media research

### ⬇️ What You Need to Provide

You can provide the following inputs to the actor:

- 🔗 A list of Kuaishou video URLs to scrape data from.
  Example URLs:
  - https://www.kuaishou.com/short-video/3xhf4kv5ahrt8cy
  - https://www.kuaishou.com/f/XzOKg8ZBFnb2Ty
  - https://v.m.chenzhongtech.com/fw/photo/3xburnkmj3auazc
  - https://www.kuaishou.com/hashtag/体育 (Hashtag page)
  - https://www.kuaishou.com/search/video?searchKey=体育 (Search page)
- 🔍 List of Search Terms.
  Example Search Terms:
  - "sports"
  - "funny videos"
  - "music videos"
- \#️⃣ List of Hashtags.
  Example Hashtags:
  - "#体育"
  - "#拳王"
- 🎯 Maximum number of items to scrape (default: 100)
- 💬 Maximum number of comments to scrape per video (default: 0)
- 💬 Maximum number of replies to scrape per comment (default: 0)

### 📦 What You’ll Get (Output)

The actor outputs a dataset containing the following fields for each video:

- 🎥 **Video Metadata** (ID, Caption, Thumb, Create Date, Duration, etc.)
- 📊 **Video Statistics** (Like Count, Forward Count, Comment Count, View Count)
- 👤 **Author Metadata** (ID, Name, Username, Verified Status, Avatar, Followers Count, etc.)
- 🎵 **Music Metadata** (ID, Name, Artist, Audio URL, etc.)
- 🔗 **Video Download URLs** (Play URL, All Play URLs with quality types)

### 📥 Video Output Example

```json
{
    "id": "5246975106670222075",
    "text": "2022年2月20日拳击比赛：布洛克VS卡汉 #体育 #拳王 #KO",
    "createTime": 1645366735771,
    "createDate": "20/02/2022",
    "thumb": "https://p2.a.yximgs.com/upic/2022/02/20/22/BMjAyMjAyMjAyMjE2MjVfMTc0NTI5NDQzNV82ODA1MjU2MzE5OF8yXzM=_B3d4f038cae5397286f4007922a8dd821.jpg?clientCacheKey=3xhf4kv5ahrt8cy.jpg&di=c0d2ed05&bp=10000",
    "url": "https://www.kuaishou.com/short-video/5246975106670222075",
    "authorMeta": {
        "id": "1745294435",
        "name": "糙老爷们看拳",
        "username": "3x984ye63jkct29",
        "verified": false,
        "avatar": "https://p22.a.yximgs.com/uhead/AB/2021/12/17/19/BMjAyMTEyMTcxOTU1MDBfMTc0NTI5NDQzNV8yX2hkODU3XzkzMQ==_s.jpg",
        "followingCount": 63,
        "followersCount": 6154,
        "gender": "male",
        "photoCount": 866,
        "collectionCount": 9
    },
    "musicMeta": {
        "id": "8612998810",
        "name": "糙老爷们看拳的作品原声",
        "artist": "糙老爷们看拳",
        "type": 9,
        "hasCopyright": true,
        "loudness": -15,
        "isOriginal": true,
        "audioUrl": "https://hw.a.yximgs.com/bs2/ost/NjgwNTI1NjMxOThfMTc0NTI5NDQzNQ.m4a"
    },
    "duration": 332,
    "cover": "https://p2.a.yximgs.com/upic/2022/02/20/22/BMjAyMjAyMjAyMjE2MjVfMTc0NTI5NDQzNV82ODA1MjU2MzE5OF8yXzM=_B3d4f038cae5397286f4007922a8dd821.jpg?clientCacheKey=3xhf4kv5ahrt8cy.jpg&di=c0d2ed05&bp=10000",
    "width": 1270,
    "height": 720,
    "playUrl": "https://v1.kwaicdn.com/upic/2022/02/20/22/BMjAyMjAyMjAyMjE2MjVfMTc0NTI5NDQzNV82ODA1MjU2MzE5OF8yXzM=_b_Bd4734d091c465219b7172debc8193362.mp4?pkey=AAXHd86Mp3k2XQHCzyxAm9tNkY1-WNsbZvgdiXEgjUkFemfg-ikpRks2VIe2_cE7WqnynyW-CsGxf_isHsEOC6xGELUOXVEnOjFEfK81BuBqjzXONt_-nzM9CXoIiOMrfww&tag=1-1768946212-unknown-0-npnnr2vdrj-9090fffb60b17b90&clientCacheKey=3xhf4kv5ahrt8cy_b.mp4&di=c0d2ed05&bp=10000&kwai-not-alloc=35&tt=b&ss=vpm",
    "allPlayUrls": [
        {
            "url": "https://v1.kwaicdn.com/upic/2022/02/20/22/BMjAyMjAyMjAyMjE2MjVfMTc0NTI5NDQzNV82ODA1MjU2MzE5OF8yXzM=_b_Bd4734d091c465219b7172debc8193362.mp4?pkey=AAXHd86Mp3k2XQHCzyxAm9tNkY1-WNsbZvgdiXEgjUkFemfg-ikpRks2VIe2_cE7WqnynyW-CsGxf_isHsEOC6xGELUOXVEnOjFEfK81BuBqjzXONt_-nzM9CXoIiOMrfww&tag=1-1768946212-unknown-0-npnnr2vdrj-9090fffb60b17b90&clientCacheKey=3xhf4kv5ahrt8cy_b.mp4&di=c0d2ed05&bp=10000&kwai-not-alloc=35&tt=b&ss=vpm",
            "qualityType": "720p",
            "videoCodec": "avc",
            "avgBitrate": 2238
        }
    ],
    "likeCount": 117,
    "commentCount": 8,
    "viewCount": 12926,
    "hashtags": [
        "体育",
        "拳王",
        "KO"
    ]
}
```

### 💬 Comment Output Example

```json
{
    "id": "519607440291",
    "authorId": "3xcdqum28w5qmi6",
    "authorName": "🌪️JIANG",
    "content": "[笑哭][赞]",
    "avatar": "http://p23-plat.wsukwai.com/uhead/AB/2024/03/31/12/BMjAyNDAzMzExMjAyMjRfMTEwMjU4MjcwOV8xX2hkNDEzXzg3Mw==_s.jpg?x-kcdn-pid=112530",
    "timestamp": 1661147538390,
    "hasReplies": false,
    "likedCount": 0,
    "replyToCommentId": "123456789012",
    "replyToUserName": "祝我年少🈶为..",
    "replyToUserId": "3xcn97xjibjakt9",
    "videoUrl": "https://www.kuaishou.com/short-video/5257108223315218609"
}
```

### 💲How much will scraping Kuaishou cost you?

- **🎥 Videos**: **$4.00**/1,000 videos
- **💬 Comments**: **$1.50**/1,000 comments

### 🧩 Integrations and Kuaishou Scraper

This scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, [and more](https://docs.apify.com/integrations). Or you can use [webhooks](https://docs.apify.com/integrations/webhooks) to carry out an action whenever an event occurs, e.g. get a notification whenever Kuaishou Scraper successfully finishes a run.

***

### 🔌 Using Kuaishou Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the [Apify API reference](https://docs.apify.com/api/v2) docs for full details.

***

### 💬 Giving feedback

If you have any feature requests or bug reports, please create an issue on the [Issues page](https://apify.com/natanielsantos/kuaishou-scraper/issues) or contact me directly via email.

If you need a custom solution of this actor, reach out to me through my email: nathan.santos159@hotmail.com

# Actor input Schema

## `startUrls` (type: `array`):

List of Kuaishou short video URLs to scrape data from.

## `searchTerms` (type: `array`):

List of search terms to scrape videos from Kuaishou's search results.

## `hashtags` (type: `array`):

List of hashtags to scrape videos from.

## `maxCommentsPerVideo` (type: `integer`):

The maximum number of top-level comments to scrape per video.

## `maxRepliesPerComment` (type: `integer`):

The maximum number of replies to scrape per comment.

## `maxItems` (type: `integer`):

The maximum number of items to scrape per search term or hashtag.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.kuaishou.com/short-video/3xhf4kv5ahrt8cy"
  ],
  "maxCommentsPerVideo": 0,
  "maxRepliesPerComment": 0,
  "maxItems": 0
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

## `comments` (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 = {
    "startUrls": [
        "https://www.kuaishou.com/short-video/3xhf4kv5ahrt8cy"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("natanielsantos/kuaishou-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 = { "startUrls": ["https://www.kuaishou.com/short-video/3xhf4kv5ahrt8cy"] }

# Run the Actor and wait for it to finish
run = client.actor("natanielsantos/kuaishou-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 '{
  "startUrls": [
    "https://www.kuaishou.com/short-video/3xhf4kv5ahrt8cy"
  ]
}' |
apify call natanielsantos/kuaishou-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IEe8zzdPqUvDhZu6e/builds/r3Ay0vAc1gKt9n9b7/openapi.json
