end_datestringจำเป็น
End date YYYYMMDD, must align with period
https://api.sandbase.ai/v1/api/douyin/index/content-consumer-portraitReturns consumer viewer portrait data for audience members watching videos in a specified Douyin category over a given week or month.
[
{
"data": {
"BaseResp": {
"StatusCode": -1,
"StatusMessage": "end_date非当前周期最后一天"
}
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns viewer portrait data for the audience watching videos in one Douyin category over a week or a month. You send a specific tag_id and an end_date, and you can set period to week or month.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/content-consumer-portrait" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"end_date": "1735660799", "tag_id": "2027"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
end_date | string | Yes | End date YYYYMMDD, must align with period |
tag_id | string | Yes | Category ID (required, does NOT support 0=all, must pass a specific category ID) |
period | string | No | "week" (end_date must be a Sunday) or "month" (end_date must be month-end, e.g. 20260331) |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"BaseResp": {
"StatusCode": -1,
"StatusMessage": "end_date非当前周期最后一天"
}
}
| Field | Meaning |
|---|---|
BaseResp | Status block returned with the request result. |
BaseResp.StatusCode | Result code. The sample call returned -1, which marks a failed request. |
BaseResp.StatusMessage | Text reason for the result. The sample call returned a message saying end_date is not the last day of the current period. |
end_date was 1735660799, which is not a YYYYMMDD date. Send a value such as 20260331.period set to week, end_date must be a Sunday. With period set to month, end_date must be the last day of the month.tag_id must be a specific category ID. The value 0 for all categories is not accepted.$0.001 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/douyin/index/content-consumer-portrait" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tag_id": "example",
"end_date": "example"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
end_datestringจำเป็นEnd date YYYYMMDD, must align with period
tag_idstringจำเป็นCategory ID (**required, does NOT support 0=all**, must pass a specific category ID)
periodstring"week" (end_date must be a Sunday) or "month" (end_date must be month-end, e.g. 20260331)
ค่าที่เป็นไปได้: week, month
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"BaseResp": {
"StatusCode": -1,
"StatusMessage": "end_date非当前周期最后一天"
}
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/douyin/index/content-consumer-portrait โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: end_date (string) และ tag_id (string). ตัวเลือก: period (หนึ่งใน week, month). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Douyin Content Consumer Portrait ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Douyin API แยกต่างหาก