urlstring必須
Douyin link
https://api.sandbase.ai/v1/api/douyin/app-v3/generate-short-urlConverts a standard Douyin web link into a shortened Douyin URL. Returns the shortened link string and operation status for the provided URL.
[
{
"data": {
"code": 0,
"data": [
{
"short_url": "https://example",
"status": "success",
"target": "https://example"
}
],
"message": "success",
"now": 1787219156
}
}
]例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
Converts a standard Douyin web link into a short v.douyin.com URL. It needs one input, url, which is the full Douyin link to shorten. The response returns the short link, the original target and an operation status.
target by reading it back from the response.curl -X POST "https://api.sandbase.ai/v1/api/douyin/app-v3/generate-short-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.douyin.com/video/7691553968815623478"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Douyin link |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": [
{
"short_url": "https://v.douyin.com/cuksjs-5j5k/",
"status": "success",
"target": "https://www.douyin.com/video/7691553968815623478"
}
],
"message": "success",
"now": 1793691092
}
| Field | Meaning |
|---|---|
data[].short_url | The shortened Douyin link. It uses the https://v.douyin.com/ domain. |
data[].target | The full Douyin link the short URL points to. It matches the url you sent. |
data[].status | Result of the shortening step for this link. The value is success when a short link was created. |
code / message | Overall request result. code is 0 and message is success when the call worked. |
now | A numeric timestamp returned with the response. It looks like a Unix time in seconds. |
url, for example a https://www.douyin.com/video/<id> link.data. Read the first item for the short link.$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/app-v3/generate-short-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "example"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
urlstring必須Douyin link
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
[
{
"data": {
"code": 0,
"data": [
{
"short_url": "https://example",
"status": "success",
"target": "https://example"
}
],
"message": "success",
"now": 1787219156
}
}
]さらに探索
| 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/app-v3/generate-short-url に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.001、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: url (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Douyin Short Link Generator は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Douyin の API アクセスを別途申請する必要はありません。