# Book Douban — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/book-douban/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-book-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-book-reviews \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-book-short-comments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-books-by-tag \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-monthly-hot-chart \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-new-books \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-tag-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/get-top250 \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/book-douban/search-books \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.