# Douban Scraper (`flarewow/douban-scraper`) Actor

Scrape Douban (豆瓣) movies, TV, books and music: ratings, 1–5 star distribution, short comments (短评) and long reviews with full text. Search and Top 250 charts. No login.

- **URL**: https://apify.com/flarewow/douban-scraper.md
- **Developed by:** [FlareWOW](https://apify.com/flarewow) (community)
- **Categories:** Social media, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 subjects

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Douban Scraper – movies, TV, books, music, short comments and reviews (豆瓣)

**Douban Scraper** extracts public data from [Douban (豆瓣)](https://www.douban.com), China's largest rating and review community: titles with ratings and the full 1–5 star distribution, **short comments (短评) for movies, TV series, books and music**, long reviews (影评 / 书评) with full text, search results and official Douban charts such as Movie Top 250. No login, no cookies, no browser.

### Who is it for?

- **Market & audience research** – see how Chinese audiences rate a film, series, book or album before a launch or localisation.
- **Sentiment analysis & NLP** – thousands of real Chinese short comments with star ratings, ready for training or evaluating models.
- **Media, publishers & distributors** – track ratings, “want to watch” counts and chart positions (Top 250, now showing, hot TV).
- **Data journalism & academia** – reproducible datasets of Douban ratings and reviews.

### What you get

| Record | What is inside |
|---|---|
| `subject` | Title, original title, year, Douban rating (0–10), number of ratings, **rating distribution in % for 5★…1★**, genre ranks (“better than 99% of crime films”), genres, countries, languages, directors, cast, authors, publisher, pages, price, duration, episodes, tags, synopsis, cover, comment / review counts, “done / wish / doing” counts, chart rank |
| `comment` | Short comment text, star rating (1–5), status (watched / want / watching), helpful votes, date |
| `review` | Review title, abstract, full text (optional), star rating, helpful votes, replies, reshares, date, URL |

**Privacy by design:** the actor never stores user names, user IDs, avatars or IP locations of commenters – only the content and the rating.

### How to use it

1. Add one or more **Douban subject URLs** (e.g. `https://movie.douban.com/subject/1292052/`, `https://book.douban.com/subject/2567698/`), and/or **search queries** (Chinese or English), and/or pick **Douban charts**.
2. Choose whether you want **short comments** and/or **long reviews** and how many per title.
3. Click **Start**. Results appear in the **Overview** table and can be downloaded as JSON, CSV, Excel or HTML.

#### Input example

```json
{
  "subjectUrls": ["https://book.douban.com/subject/2567698/"],
  "charts": ["movie_top250"],
  "maxChartItems": 10,
  "includeComments": true,
  "maxCommentsPerSubject": 30,
  "includeReviews": true,
  "maxReviewsPerSubject": 5,
  "fullReviewText": true
}
```

#### Output example (real data, shortened)

```json
{
  "recordType": "subject",
  "subjectType": "book",
  "id": "2567698",
  "title": "三体",
  "url": "https://book.douban.com/subject/2567698/",
  "rating": 8.9,
  "ratingMax": 10,
  "ratingCount": 519002,
  "ratingDistributionPercent": { "5": 62.6, "4": 29.7, "3": 6.5, "2": 0.8, "1": 0.5 },
  "authors": ["刘慈欣"],
  "press": ["重庆出版社"],
  "publishDate": "2008-1",
  "pages": "302",
  "commentCount": 125084,
  "reviewCount": 4809,
  "doneCount": 648078,
  "wishCount": 176269
}
```

```json
{
  "recordType": "comment",
  "subjectType": "book",
  "subjectId": "2567698",
  "subjectTitle": "三体",
  "commentId": "425448896",
  "text": "一直认为写作是件很耗费体力与脑力的事情，特别是从新构架一个新的世界，一个文明……",
  "rating": 5,
  "ratingMax": 5,
  "status": "done",
  "votes": 13055,
  "createdAt": "2011-08-14 14:27:05"
}
```

```json
{
  "recordType": "review",
  "subjectId": "2567698",
  "reviewId": "1342728",
  "title": "《三体》：当代史的科幻书写",
  "fullText": "评论刘慈欣的《三体》是件困难的事情……",
  "rating": 4,
  "usefulCount": 1794,
  "commentsCount": 268,
  "createdAt": "2008-04-03 03:20:04",
  "url": "https://book.douban.com/review/1342728/"
}
```

#### Available charts

`movie_top250`, `movie_showing` (in cinemas), `movie_real_time_hotest`, `movie_weekly_best`, `tv_hot`, `tv_real_time_hotest`, `tv_chinese_best_weekly`, `book_top250`, `book_bestseller`, `music_single`.

#### Use it from code

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("flarewow/douban-scraper").call(run_input={
    "subjectUrls": ["https://movie.douban.com/subject/1292052/"],
    "maxCommentsPerSubject": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["recordType"], item.get("title") or item.get("text"))
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('flarewow/douban-scraper').call({ searchQueries: ['流浪地球'], maxSearchResults: 3 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

### Pricing (pay per result)

| Event | Price |
|---|---|
| Subject (title with ratings & metadata) | $3 per 1,000 |
| Short comment | $2 per 1,000 |
| Long review (incl. full text) | $10 per 1,000 |

You only pay for records saved to the dataset. Use **Max cost per run** in the run options to cap spending.

### Limitations & FAQ

- **How many comments can I get?** Douban shows up to about **150 most helpful short comments** and about **50 long reviews** per title to visitors without login. Newest-first order and deeper pages require a Douban account, which this actor does not use.
- **Some titles fail with “restricted”.** A small number of titles are hidden by Douban for visitors without login; they are listed in the `ERRORS` record of the run's key-value store.
- **Search** uses Douban's own search, which is fuzzy – a nonsense query may still return the closest titles.
- **Empty runs fail on purpose.** If no data can be returned (for example Douban blocks the requests), the run ends as FAILED with an explanation, so you are not charged for nothing. Try again later or switch the proxy to RESIDENTIAL.

### Integrations

Works with the Apify API, webhooks, schedules and integrations such as **n8n, Make, Zapier, Google Sheets** and the **Apify MCP server** for AI agents.

### Responsible use

The actor collects only publicly visible content and does not store personal data of commenters. Respect Douban's terms and local law (e.g. GDPR / PIPL) when you process or publish the data.

***

### 中文说明

**豆瓣爬虫**：抓取豆瓣电影、电视剧、图书、音乐的公开数据——评分、评分人数、**1–5 星评分分布**、类型排名、导演/演员/作者/出版社等信息，以及\*\*短评（电影、电视剧、图书、音乐均支持）\*\*和长评（影评/书评，可含全文）。支持按链接、关键词搜索和豆瓣榜单（电影 Top250、正在热映、热门剧集、图书畅销榜等）抓取。无需登录。

- 隐私保护：不保存评论者的昵称、用户 ID、头像和 IP 属地，只保存内容和评分。
- 限制：未登录状态下，每个条目最多约 150 条热门短评、约 50 篇长评；“最新”排序需要登录，暂不支持。
- 价格：条目 $3/千条，短评 $2/千条，长评 $10/千条，只按实际结果收费。

# Actor input Schema

## `subjectUrls` (type: `array`):

Movie, TV, book or music pages on Douban, e.g. https://movie.douban.com/subject/1292052/ or https://book.douban.com/subject/2567698/. You can also write movie:1292052, tv:35588177, book:2567698 or music:26812952.

## `searchQueries` (type: `array`):

Keywords to search on Douban (Chinese or English titles work). Each result is scraped as a subject.

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

Which Douban section the search queries look in. 'Movies & TV' returns both films and series.

## `maxSearchResults` (type: `integer`):

How many subjects to take from each search query.

## `charts` (type: `array`):

Scrape subjects from official Douban charts, e.g. Movie Top 250, movies now showing, hot TV series or book bestsellers. Each subject gets its chart rank.

## `maxChartItems` (type: `integer`):

How many subjects to take from each chart (from rank 1).

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

Also save short user comments with star ratings for each subject. Works for movies, TV, books and music. No user names or IDs are stored.

## `maxCommentsPerSubject` (type: `integer`):

Most helpful short comments first. Douban shows up to about 150 per subject to visitors without login.

## `includeReviews` (type: `boolean`):

Also save long-form reviews (title, rating, helpful votes and full text).

## `maxReviewsPerSubject` (type: `integer`):

Most helpful reviews first. Douban returns up to about 50 per subject without login.

## `fullReviewText` (type: `boolean`):

Download the full text of each long review (one extra request per review). If off, only the abstract is saved.

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

Apify Proxy (datacenter) works for Douban in our tests. Switch to RESIDENTIAL only if you see blocks.

## Actor input object example

```json
{
  "subjectUrls": [
    "https://movie.douban.com/subject/1292052/"
  ],
  "searchQueries": [],
  "searchType": "movie",
  "maxSearchResults": 10,
  "charts": [],
  "maxChartItems": 20,
  "includeComments": true,
  "maxCommentsPerSubject": 20,
  "includeReviews": false,
  "maxReviewsPerSubject": 10,
  "fullReviewText": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `errors` (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 = {
    "subjectUrls": [
        "https://movie.douban.com/subject/1292052/"
    ],
    "searchQueries": [],
    "searchType": "movie",
    "maxSearchResults": 10,
    "charts": [],
    "maxChartItems": 20,
    "includeComments": true,
    "maxCommentsPerSubject": 20,
    "includeReviews": false,
    "maxReviewsPerSubject": 10,
    "fullReviewText": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("flarewow/douban-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 = {
    "subjectUrls": ["https://movie.douban.com/subject/1292052/"],
    "searchQueries": [],
    "searchType": "movie",
    "maxSearchResults": 10,
    "charts": [],
    "maxChartItems": 20,
    "includeComments": True,
    "maxCommentsPerSubject": 20,
    "includeReviews": False,
    "maxReviewsPerSubject": 10,
    "fullReviewText": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("flarewow/douban-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "subjectUrls": [
    "https://movie.douban.com/subject/1292052/"
  ],
  "searchQueries": [],
  "searchType": "movie",
  "maxSearchResults": 10,
  "charts": [],
  "maxChartItems": 20,
  "includeComments": true,
  "maxCommentsPerSubject": 20,
  "includeReviews": false,
  "maxReviewsPerSubject": 10,
  "fullReviewText": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call flarewow/douban-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flarewow/douban-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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