Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Douban Movie Short Comments

API 文档
https://api.sandbase.ai/v1/api/douban/movie-comments

Short comments (one-line reviews) on a Douban movie or TV subject with rating, user and location, sorted by time or score.

价格
$0.014286美元 / 次调用
方法
POST
响应
JSON
参数
1 个必填 · 2 个可选

Playground

输入
The unique ID for a movie or TV subject on Douban.
Sort order for the result set.
Page number for pagination.
输出就绪

您的输出将显示在这里

完成输入,然后点击运行。

API README

Douban Movie Short Comments API

Returns short one-line comments for a Douban movie or TV subject. Each comment includes the text, the user's rating label, the user name and a location. The API needs the Douban subjectId.

Use cases

  • Collect audience reactions to a film such as the one with subjectId 1292052 for sentiment analysis.
  • Compare the newest comments against the top-scored comments by switching sort between time and new_score.
  • Count how many commenters give each rating label to gauge how a title is received.
  • Group comments by location to see which Chinese regions discuss a title.

Request

curl -X POST "https://api.sandbase.ai/v1/api/douban/movie-comments" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subjectId": "1292052"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
subjectIdstringYesThe unique ID for a movie or TV subject on Douban.
pageintegerNoPage number for pagination.
sortstringNoSort order for the result set.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "comments": [
    {
      "avatar": "https://img3.doubanio.com/icon/u210199036-3.webp",
      "cid": "4980937286",
      "content": "牢狱困得住躯体,困不住希望。安迪以漫长时光守住内心,告诉我们自由从不在高墙之外,而永不熄灭的信念本身就是救赎。",
      "location": "安徽",
      "rating": "推荐",
      "time": "",
      "username": "大喊一声啦啦啦",
      "vote_count": 0
    }
  ]
}

Response fields

FieldMeaning
comments[]List of short comments on the subject. Each item is one comment.
comments[].cidID of the comment, returned as a string.
comments[].contentText of the short comment.
comments[].ratingRating label the user gave, such as 推荐 or 力荐. It is a text label, not a number.
comments[].usernameDisplay name of the user who wrote the comment.
comments[].avatarURL of the user's avatar image.
comments[].locationLocation shown for the user, such as a province name.
comments[].vote_countNumber of votes the comment received.
comments[].timeTime field of the comment. It was an empty string in the sample response.

Notes

Pricing

$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相关 APIs

全部 APIs
API价格响应
Douban$0.014286 每次调用JSON
Douban$0.014286 每次调用JSON
Douban$0.014286 每次调用JSON
Douban$0.014286 每次调用JSON
Douban$0.014286 每次调用JSON
Douban$0.014286 每次调用JSON

问题

常见问题

如何使用 Douban Movie Short Comments API?

向 https://api.sandbase.ai/v1/api/douban/movie-comments 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Douban Movie Short Comments API 的价格是多少?

每次调用 $0.014286,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Douban Movie Short Comments API 接受哪些参数?

必填:subjectId (string)。 可选:sort(time, new_score 之一) 和 page (integer)。 Parameters 表和本页的 Playground 列出了每个字段。

Douban Movie Short Comments API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Douban 开发者账户或 API key 吗?

不需要。Douban Movie Short Comments 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Douban API 访问权限。