# Douban Search API (douban.search)

- Canonical page: [https://everyinfra.com/en/douban-api/search](https://everyinfra.com/en/douban-api/search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "douban", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 50 per call
- Mode: sync; add "mode": "async" for slow tasks

Douban Search finds films, books and music on Douban by `keyword` and returns each subject's title, type, year, link, cover, Douban rating with its scale and number of raters, and the credits that fit the type: director and `cast` for films, author for books, artist for music. Use it to see how a title is received on Douban, to find the Douban page for a film, book or album you track, or to build title lists for market research before a release.

Limit results with `type`: `movie`, `book`, `music` or `all`. Douban rates on a 10-point scale, so convert with `rating_scale` before you compare with five-star platforms, and weigh each score by `rating_count`. `keyword` matches subject names and topics, not the text of reviews or group posts; reviews are read per subject.

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=douban&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies the title or topic search query to discover Douban media items across movies, books, and music. Does not perform full-text searching inside long reviews or group topics. |
| search_type | enum: all / book / movie / music | no | not declared | Filters item category discovery using all (default), movie, book, or music. When type is provided simultaneously, type takes precedence; unrecognized values fall back to all. |
| type | enum: all / book / movie / music | no | not declared | Overrides search_type to filter item discovery by category (all, movie, book, or music). Filters catalog entry types only and does not select between reviews (long reviews) and comments (short comments), which are governed by action type. |
| limit | integer (1–50) | no | 20 | The most rows to return in this call, an integer from 1 to 50. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| subject_type | platform-native meaning |
| year | platform-native meaning |
| director | platform-native meaning |
| cast | platform-native meaning |
| author | platform-native meaning |
| artist | platform-native meaning |
| rating | Rating. **The scale varies by platform**: rating_scale on the same row gives the maximum (usually 5; Booking, Douban, iQIYI and NAVER use 10). Convert with rating_scale before comparing across platforms, or the comparison can come out backwards. |
| rating_scale | Maximum of rating in the same row: 5 for five-star scales, 10 for ten-point scales. Present only when the row has a rating. |
| rating_count | Number of people who rated. null means not disclosed, not 0. |
| cover_url | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "douban",
  "action": "search",
  "params": {
    "keyword": "星际穿越"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "douban",
        "action": "search",
        "params": {
            "keyword": "星际穿越",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-07T14:47:42Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "douban",
  "action": "search",
  "results": [
    {
      "id": "1889243",
      "url": "https://movie.douban.com/subject/1889243/",
      "title": "星际穿越",
      "subject_type": "movie",
      "year": "2014",
      "director": "克里斯托弗·诺兰",
      "cast": [
        "马修·麦康纳",
        "安妮·海瑟薇",
        "杰西卡·查斯坦"
      ],
      "rating": 9.4,
      "rating_count": 2238616,
      "cover_url": "https://img3.doubanio.com/view/photo/m_ratio_poster/public/p2614988097.jpg",
      "platform": "douban",
      "rating_scale": 10
    },
    {
      "id": "35239063",
      "url": "https://movie.douban.com/subject/35239063/",
      "title": "星际穿越2：虫洞",
      "subject_type": "movie",
      "year": "2016",
      "director": "Danil Andreev",
      "rating_count": 0,
      "cover_url": "https://img3.doubanio.com/view/photo/m_ratio_poster/public/p2624299677.jpg",
      "platform": "douban"
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### How do I search only films or only books?

Set `type` to `movie`, `book` or `music`, or leave it at `all`. `search_type` takes the same values; when both are present `type` wins, and values outside that list fail parameter validation with a 422 error before the search runs. The filter applies to subjects, not to reviews or comments.

### Is a Douban rating out of 5 or 10?

Out of 10, as `rating_scale` on each row confirms. Divide by `rating_scale` and multiply by your target scale before you compare with five-star platforms, and check `rating_count`: a score from a handful of raters can swing widely.

### How do I read the reviews of a result?

Douban Reviews reads long reviews and Douban Comments reads short ones; both take a subject page link, a /subject/<ID>/ address on movie.douban.com, book.douban.com or music.douban.com. The `url` of a search result points to the subject's page on Douban.

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=douban
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
