subjectIdstringобязательно
The unique ID for a movie or TV subject on Douban.
https://api.sandbase.ai/v1/api/douban/movie-commentsShort comments (one-line reviews) on a Douban movie or TV subject with rating, user and location, sorted by time or score.
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
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.
subjectId 1292052 for sentiment analysis.sort between time and new_score.location to see which Chinese regions discuss a title.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.
| Name | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | The unique ID for a movie or TV subject on Douban. |
page | integer | No | Page number for pagination. |
sort | string | No | Sort order for the result set. |
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
}
]
}
| Field | Meaning |
|---|---|
comments[] | List of short comments on the subject. Each item is one comment. |
comments[].cid | ID of the comment, returned as a string. |
comments[].content | Text of the short comment. |
comments[].rating | Rating label the user gave, such as 推荐 or 力荐. It is a text label, not a number. |
comments[].username | Display name of the user who wrote the comment. |
comments[].avatar | URL of the user's avatar image. |
comments[].location | Location shown for the user, such as a province name. |
comments[].vote_count | Number of votes the comment received. |
comments[].time | Time field of the comment. It was an empty string in the sample response. |
subjectId with Douban Recent Hot Movie or Douban Recent Hot Tv. Use Douban Subject Details for the title's own data.sort accepts time (default) or new_score. Use page to get more comments, starting at 1.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Начните разработку
Конечная точка платформенного API с единообразной аутентификацией и учётом использования.
curl -X POST "https://api.sandbase.ai/v1/api/douban/movie-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"sort": "time",
"subjectId": "1292052"
}'Укажите свой ключ SandBase API в окружении сервера. Запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера.
subjectIdstringобязательноThe unique ID for a movie or TV subject on Douban.
sortstringSort order for the result set.
По умолчанию: "time"
Возможные значения: time, new_score
pageintegerPage number for pagination.
По умолчанию: 1
Сохранённый пример ответа для этого API; при просмотре живой запрос не выполняется.
Сохранённый ответ не опубликован. Запустите API в Playground, чтобы посмотреть его ответ.
Посмотреть больше
| API | Цена | Ответ |
|---|---|---|
Douban Movie Short CommentsЭтот 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 |
Вопросы
Отправьте POST-запрос на https://api.sandbase.ai/v1/api/douban/movie-comments, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.
$0.014286 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.
Обязательные: subjectId (string). Необязательные: sort (один из time, new_score) и page (integer). В таблице Parameters и в Playground на этой странице перечислены все поля.
JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.
Нет. Douban Movie Short Comments работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Douban.