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.014286USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 2 необязательных

Песочница

Ввод
The unique ID for a movie or TV subject on Douban.
Sort order for the result set.
Page number for pagination.
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

README по API

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

Вопросы

FAQ

Как использовать API Douban Movie Short Comments?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/douban/movie-comments, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API Douban Movie Short Comments?

$0.014286 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API Douban Movie Short Comments?

Обязательные: subjectId (string). Необязательные: sort (один из time, new_score) и page (integer). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API Douban Movie Short Comments?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика Douban или API key?

Нет. Douban Movie Short Comments работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Douban.