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.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
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.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform 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 key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ 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 CommentsAPI นี้ 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 key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.014286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: subjectId (string). ตัวเลือก: sort (หนึ่งใน time, new_score) และ page (integer). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Douban Movie Short Comments ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Douban API แยกต่างหาก