# Douban Movie & Book Scraper (`certified_astronomy_6vi/douban-movie-book-scraper`) Actor

Scrape public Douban movie and book data: rating, rating count, genres, directors, authors, cast, summary, tags, cover. No login.

- **URL**: https://apify.com/certified_astronomy_6vi/douban-movie-book-scraper.md
- **Developed by:** [H](https://apify.com/certified_astronomy_6vi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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 & Douban API — Movies, TV, Books, Ratings (豆瓣电影 / 图书)

**The simplest Douban API alternative.** Douban closed its official public API years ago. This Douban scraper gives you clean JSON for any public **Douban movie, TV show or book**: title, original title, year, **Douban rating (豆瓣评分) & vote count**, genres, directors, cast, authors, countries, tags, summary, cover and URL.

- 🔎 Search by keyword (Chinese or English: `三体`, `Interstellar`) or paste subject URLs / IDs
- 🔓 No login, no cookies, no account needed
- 🛡️ Public subject data only — no user profiles, no personal data
- 📦 Export JSON, CSV, Excel, or call via API / Python / Node.js
- 💲 Pay per result: **$3 per 1,000 subjects**

### Use cases

- **Chinese film & book market research** — compare Douban ratings with IMDb / Goodreads
- **Enrich a movie or book database** with Douban scores and tags
- **Recommendation systems & data science** — genre/tag/rating datasets on Chinese media
- **LLM / RAG datasets** about Chinese movies, dramas and literature
- **IP / adaptation scouting** — find highly-rated novels and dramas

### Input

| Field | Description | Example |
|---|---|---|
| `keywords` | Search terms (Chinese or English) | `["肖申克", "三体"]` |
| `startUrls` | Subject URLs or numeric IDs | `["https://movie.douban.com/subject/1292052/"]` |
| `type` | `movie` (incl. TV) or `book` | `"movie"` |
| `maxItems` | Max subjects to output (default 20) | `50` |
| `delaySecs` | Polite delay between requests (default 2) | `2` |

```json
{ "keywords": ["三体"], "type": "book", "maxItems": 10 }
```

### Output example

```json
{"id":"1292052","type":"movie","title":"肖申克的救赎","originalTitle":"The Shawshank Redemption","year":"1994","rating":9.7,"ratingCount":3354005,"genres":["剧情","犯罪"],"directors":["弗兰克·德拉邦特"],"cast":["蒂姆·罗宾斯","摩根·弗里曼"],"countries":["美国"],"tags":["犯罪","越狱","励志","信念"],"url":"https://movie.douban.com/subject/1292052/","cover":"https://img3.doubanio.com/view/photo/m_ratio_poster/public/p2934829882.jpg"}
```

### Call it from code

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("certified_astronomy_6vi/douban-movie-book-scraper").call(
    run_input={"keywords": ["Interstellar"], "type": "movie", "maxItems": 5})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["rating"], item["ratingCount"])
```

### FAQ

**Is there an official Douban API?** Not publicly any more — the official API was shut down for new developers. This actor is a maintained alternative for public data.
**Do I need a Douban account or cookies?** No.
**Does it scrape reviews or user data?** No. Only public subject (item) pages, no personal information.
**Is it legal?** It only reads publicly visible pages at a polite rate. You are responsible for how you use the data; check Douban's terms for your use case.
**How fast is it?** About one subject every ~2 s by default (rate-limited on purpose to be reliable).
**Something broke?** Open an issue on the Issues tab — fixes are usually same-week.

### 中文说明

豆瓣电影 / 电视剧 / 图书公开数据抓取（豆瓣 API 替代）。支持关键词搜索或条目链接/ID，输出片名、原名、年份、豆瓣评分、评分人数、类型、导演、演员、作者、标签、简介、封面。无需登录，不抓取任何用户个人信息。按结果计费：每 1000 条 $3。

# Actor input Schema

## `keywords` (type: `array`):

Keywords (Chinese or English), e.g. 肖申克, 三体

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

e.g. https://movie.douban.com/subject/1292052/ or 1292052

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

Subject type

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

Maximum subjects to output

## `delaySecs` (type: `number`):

Polite rate limit

## Actor input object example

```json
{
  "keywords": [
    "肖申克"
  ],
  "type": "movie",
  "maxItems": 20,
  "delaySecs": 2
}
```

# Actor output Schema

## `results` (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 = {
    "keywords": [
        "肖申克"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("certified_astronomy_6vi/douban-movie-book-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 = { "keywords": ["肖申克"] }

# Run the Actor and wait for it to finish
run = client.actor("certified_astronomy_6vi/douban-movie-book-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 '{
  "keywords": [
    "肖申克"
  ]
}' |
apify call certified_astronomy_6vi/douban-movie-book-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,certified_astronomy_6vi/douban-movie-book-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/hOAPRQexMt3FVUSrh/builds/9Z7i8a2P8eabfKLhh/openapi.json
