subjectIdstringrequerido
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.
Su salida aparecerá aquí
Complete las entradas y luego haga clic en Ejecutar.
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.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
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"
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
subjectIdstringrequeridoThe unique ID for a movie or TV subject on Douban.
sortstringSort order for the result set.
Valor predeterminado: "time"
Valores posibles: time, new_score
pageintegerPage number for pagination.
Valor predeterminado: 1
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
No se ha publicado ninguna respuesta guardada. Ejecute la API en Playground para inspeccionar su respuesta.
Explorar más
| API | Precio | Respuesta |
|---|---|---|
Douban Movie Short CommentsEsta API Douban | $0.014286 por llamada | JSON |
Douban | $0.014286 por llamada | JSON |
Douban | $0.014286 por llamada | JSON |
Douban | $0.014286 por llamada | JSON |
Douban | $0.014286 por llamada | JSON |
Douban | $0.014286 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/douban/movie-comments con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
$0.014286 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: subjectId (string). Opcionales: sort (una de time, new_score) y page (integer). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. Douban Movie Short Comments funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de Douban por separado.