# ⚡ Kuaishou Scraper (`ethereal_wool/kuaishou-scraper`) Actor

Extract Kuaishou data — likes, views, author, and more. Scrape by keyword, URL or ID. Export to JSON, CSV & Excel, use the API, schedule runs and integrate. No code required.

- **URL**: https://apify.com/ethereal\_wool/kuaishou-scraper.md
- **Developed by:** [Jackie Chen](https://apify.com/ethereal_wool) (community)
- **Categories:** Social media, Videos
- **Stats:** 9 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Kuaishou (快手) Scraper

![kuaishou-scraper](https://api.apify.com/v2/key-value-stores/48FFrfZnw5XqzUC1C/records/kuaishou-scraper__hero)

Scrape **Kuaishou (快手)** videos by keyword search and by user profile, and pull
top-level comments for any video — captions, like / view / comment / share /
collect counts, cover image, video URLs, timestamps and author info — as clean,
flat JSON, one item per record.

> **Unofficial.** Not affiliated with, authorized, or endorsed by Kuaishou /
> Kwai. This is an independent tool that retrieves publicly available data via a
> third-party API. Use it in compliance with Kuaishou's terms and applicable law;
> you are responsible for how you use the data.

### What it does

Three independent modes — supply any combination of inputs:

| Mode | Input | Output |
|------|-------|--------|
| **Keyword search** | `searchKeywords` | Videos matching each keyword (paginated) |
| **User videos** | `userIds` | Videos posted by each Kuaishou user |
| **Video comments** | `videoIds` | Top-level comments for each video (one item per comment) |

For search and user modes you can also set `includeComments: true` to attach each
video's top-level comments inline.

### Input

```json
{
  "searchKeywords": ["美食"],
  "userIds": [],
  "videoIds": [],
  "maxItems": 50,
  "sortType": "all",
  "includeComments": false,
  "maxCommentsPerVideo": 30
}
```

- **searchKeywords** – Keywords to search (Chinese keywords return the most
  results). Each is searched and paginated independently.
- **userIds** – Kuaishou numeric user IDs (the `user_id`, e.g. `95559331`).
- **videoIds** – Kuaishou video IDs (`photo_id`, e.g. `5230649612694363602`) to
  scrape comments for.
- **maxItems** – Max total items across all sources (default 50).
- **sortType** – `all` (comprehensive), `hot`, or `latest`.
- **includeComments** / **maxCommentsPerVideo** – Optionally attach comments to
  each scraped video.

A bare run (no inputs) defaults to searching `美食`, so it always returns data.

### Output

Video item (search / user modes):

```json
{
  "photoId": "5230649612694363602",
  "url": "https://www.kuaishou.com/short-video/5230649612694363602",
  "caption": "今日份：爆辣曹氏 #曹氏 #爱美食爱生活",
  "duration": 312366,
  "likeCount": 53089,
  "commentCount": 8820,
  "viewCount": 3434425,
  "shareCount": 15465,
  "collectCount": 3982,
  "coverUrl": "http://ws2.a.kwimgs.com/...",
  "videoUrls": ["http://v1.kwaicdn.com/..."],
  "time": "2024-01-17 19:35:45",
  "timestamp": 1705491345228,
  "author": {
    "userId": "95559331",
    "name": "罗曼迪啊-(美食分享)",
    "kwaiId": "weiwei513-",
    "avatarUrl": "http://p22.a.yximgs.com/..."
  },
  "source": "search:美食"
}
```

Comment item (videoIds mode):

```json
{
  "commentId": "844158982710",
  "photoId": "5230649612694363602",
  "content": "不懂就问，麻辣烫，麻辣香锅，冒菜，曹氏，这四种有啥区别吗",
  "likedCount": 36,
  "subCommentCount": 3,
  "authorId": "2901102496",
  "authorName": "^//.",
  "authorArea": "Guangxi",
  "time": "2024-06-16 21:38:43",
  "source": "comments:5230649612694363602"
}
```

### Notes

- Powered by a fast, direct HTTP API — no headless browser, no login, no cookies.
- Requests are retried with backoff on transient Cloudflare / rate-limit errors.
- Results reflect what the upstream API returns and may vary over time.

***

### Why this Actor

- **Direct API, no headless browser** — fast, stable runs with nothing to babysit.
- **No login, no cookies** — we never touch your accounts, so there's no ban risk.
- **Fresh, real-time data** — every run reads the source live, not a stale cache.
- **Pay per result** — you're billed only for the rows actually delivered.
- **Structured JSON** — export to CSV, Excel, or JSON, or pull straight from the API / MCP.

### Use cases

- Pull structured content + engagement for analytics dashboards.
- Track a creator's or topic's output and performance over time.
- Build training/research datasets of posts and metadata.
- Power competitor and trend monitoring.

### FAQ

**Do I need an account, cookies, or to log in anywhere?**
No. The Actor talks to a fast, direct HTTP API server-side — you just provide inputs and run it.

**How am I billed?**
Pay-per-result: a fixed price per row returned, with no separate platform/compute charge. Caps like `maxItems` keep spend predictable.

**Can I run it on a schedule or call it from my app?**
Yes — use Apify Schedules, the REST API, the JavaScript / Python clients, or the MCP server. See the **API** tab.

**Is this affiliated with Kuaishou (快手)?**
No. It's an independent tool that collects publicly available data. Use it in line with the platform's terms and applicable law.

### More scrapers by us

Browse the full fleet → **https://apify.com/ethereal\_wool**

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords to search Kuaishou videos for. Each keyword is searched and paginated independently. Chinese keywords return the most results.

## `userIds` (type: `array`):

Kuaishou numeric user IDs (the user\_id from a profile, e.g. 95559331) whose posted videos you want to scrape.

## `videoIds` (type: `array`):

Kuaishou video IDs (photo\_id, e.g. 5230649612694363602) to scrape top-level comments for. Each comment becomes one dataset item.

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

Maximum total number of items (videos or comments) to scrape across all keywords, users and videos.

## `sortType` (type: `string`):

How to sort keyword-search results (applies when using comprehensive search).

## `includeComments` (type: `boolean`):

Also fetch top-level comments for each scraped video. Slower and uses more API calls.

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

Maximum top-level comments to fetch per video when 'Include comments' is enabled, or per video ID in the comments mode.

## `downloadVideos` (type: `boolean`):

Download each video's MP4 into the key-value store and add a `downloads.videoFile` link to the item. Billed as a separate pay-per-event add-on.

## `downloadCovers` (type: `boolean`):

Download each video's cover/thumbnail image into the key-value store (`downloads.coverFile`).

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

Optional. Route the upstream API calls through an Apify Proxy to vary the source IP. Usually not needed.

## Actor input object example

```json
{
  "searchKeywords": [
    "美食"
  ],
  "userIds": [],
  "videoIds": [],
  "maxItems": 50,
  "sortType": "all",
  "includeComments": false,
  "maxCommentsPerVideo": 30,
  "downloadVideos": false,
  "downloadCovers": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "searchKeywords": [
        "美食"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ethereal_wool/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 = { "searchKeywords": ["美食"] }

# Run the Actor and wait for it to finish
run = client.actor("ethereal_wool/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 '{
  "searchKeywords": [
    "美食"
  ]
}' |
apify call ethereal_wool/kuaishou-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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