end_datestring必須
End date YYYYMMDD, must align with period
https://api.sandbase.ai/v1/api/douyin/index/content-creative-durationReturns the video duration distribution for a specified Douyin category. Breaks down content duration patterns across weekly or monthly periods.
[
{
"data": {
"BaseResp": {
"StatusCode": -1,
"StatusMessage": "end_date非当前周期最后一天"
}
}
}
]例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
Returns the video duration distribution for one Douyin category over a week or a month. You send a category tag_id, an end_date, and optionally a period.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/content-creative-duration" \
-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) |
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 for the call. The response you get when the request is rejected contains only this object. |
BaseResp.StatusCode | Result code. -1 means the request failed. A failed call returns no duration data. |
BaseResp.StatusMessage | Reason for the failure, in Chinese. The value end_date非当前周期最后一天 means end_date is not the last day of the period. |
end_date set to 1735660799 returned StatusCode -1. Send end_date as YYYYMMDD instead, for example 20241229.period set to week, end_date must be a Sunday. With month, it must be the last day of the month.tag_id must be a specific category ID. 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.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/content-creative-duration" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tag_id": "example",
"end_date": "example"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_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)
指定可能な値: 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 |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/douyin/index/content-creative-duration に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.001、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: end_date (string) と tag_id (string)。 任意: period(week, month のいずれか)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Douyin Content Creative Duration は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Douyin の API アクセスを別途申請する必要はありません。