# Book Douban — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Discover and search millions of books from Douban's database, access detailed metadata including ratings, reviews, and short comments, and explore curated collections like top 250 books, new releases, and monthly trending titles. Browse books by category tags and find exactly what you're looking for with powerful search and filtering capabilities.

**Category:** Reviews & Ratings | **Website:** [book.douban.com/](https://book.douban.com/) | **Docs:** [parse.bot/marketplace/34ff9e06-5817-4f9f-9489-bb2f9fd4b841/book-douban-com-api](https://parse.bot/marketplace/34ff9e06-5817-4f9f-9489-bb2f9fd4b841/book-douban-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_book_detail

Fetch full metadata for a single book by its Douban subject ID. Returns title, rating, publication metadata, introduction, author intro, and tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Douban book subject ID (numeric string, e.g. '1007305'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_book_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_book_reviews

Fetch long-form book reviews for a book. Returns a list of reviews with user, rating, title, content excerpt, and date.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Douban book subject ID (numeric string, e.g. '1007305'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_book_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_book_short_comments

Fetch short user comments for a book. Returns a list of brief comments with user, rating, timestamp, content, and vote count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Douban book subject ID (numeric string, e.g. '1007305'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_book_short_comments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_books_by_tag

Fetch a paginated list of books for a given tag. Returns books with title, rating, publication info, and reader count. Paginated via offset; each page returns up to 20 books.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sort` | string | No | Sort order. Accepted values: 'T' (popular), 'R' (recent), 'S' (top rated). |
| `start` | integer | No | Pagination offset (number of items to skip). |
| `tag` | string | Yes | Tag name to browse (e.g. '小说', '文学', '历史'). Browse available tags via get_tag_list endpoint. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_books_by_tag \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sort":"<string>","start":"<integer>","tag":"<string>"}'
```

### get_monthly_hot_chart

Fetch the monthly hot books chart. Returns trending books of the current month with title, publication info, and rating.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_monthly_hot_chart \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_new_books

Fetch the latest new books express listing. Returns recently published books with title, publication info, and rating.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_new_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_tag_list

Fetch the tag cloud organized by category. Returns categories such as 文学, 流行, 文化, 生活, 经管, 科技, each with a list of tags and their book counts.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_tag_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_top250

Fetch the Douban Books Top 250 list. Returns 25 books per page with title, rating, publication info, and a one-line quote. Paginated by offset (0, 25, 50, ... up to 225).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `start` | integer | No | Pagination offset (0, 25, 50, ... up to 225). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/get_top250 \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"start":"<integer>"}'
```

### search_books

Search books by keyword using Douban's suggestion API. Returns a list of matching book entries with basic info including title, author, year, and cover image.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'Python', '三体'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-book-douban-com-api-34ff9e06/search_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
