end_datestringbắt buộc
End date (**must be a Sunday**), format YYYYMMDD
https://api.sandbase.ai/v1/api/douyin/index/relation-wordReturns search and content relation word graphs and rankings for a keyword. Query by target keyword, platform selection, and weekly date intervals.
[
{
"data": {
"BaseResp": {
"StatusCode": 0,
"StatusMessage": ""
}
}
}
]Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
This API returns search and content relation word graphs and rankings on Douyin or Toutiao for a keyword. It needs a keyword, a start_date and an end_date. app_name is optional and selects the platform.
人工智能 in a given week.aweme) and Toutiao (toutiao).curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/relation-word" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"end_date": "1735660799", "keyword": "人工智能", "start_date": "1730044800"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
end_date | string | Yes | End date (must be a Sunday), format YYYYMMDD |
keyword | string | Yes | The keyword to analyze |
start_date | string | Yes | Start date (recommend Monday), format YYYYMMDD |
app_name | string | No | Platform, aweme=Douyin, toutiao=Toutiao |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"BaseResp": {
"StatusCode": 500,
"StatusMessage": "日期格式需满足%Y%m%d,且关联分析终止日期为周日"
}
}
| Field | Meaning |
|---|---|
BaseResp | Status wrapper that the response returns. Check it first to see whether the call worked. |
BaseResp.StatusCode | Numeric result code. 500 means the request failed, as in the sample response. |
BaseResp.StatusMessage | Text reason for the result. The sample says the date must be in %Y%m%d format and the end date must be a Sunday. |
1735660799 for start_date and end_date, and the API rejected them. Send dates as YYYYMMDD, for example 20241229.end_date must be a Sunday. Use a Monday for start_date so the range covers whole weeks.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/relation-word" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "example",
"end_date": "example",
"start_date": "example"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
end_datestringbắt buộcEnd date (**must be a Sunday**), format YYYYMMDD
keywordstringbắt buộcThe keyword to analyze
start_datestringbắt buộcStart date (recommend Monday), format YYYYMMDD
app_namestringPlatform, aweme=Douyin, toutiao=Toutiao
Giá trị có thể dùng: aweme, toutiao
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
[
{
"data": {
"BaseResp": {
"StatusCode": 0,
"StatusMessage": ""
}
}
}
]Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/douyin/index/relation-word với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: end_date (string), keyword (string) và start_date (string). Tùy chọn: app_name (một trong số aweme, toutiao). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Douyin Relation Word Analysis chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Douyin.