urlstringwymagane
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
}
}
]Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
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.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
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"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
urlstringwymaganeDouyin link
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
[
{
"data": {
"code": 0,
"data": [
{
"short_url": "https://example",
"status": "success",
"target": "https://example"
}
],
"message": "success",
"now": 1787219156
}
}
]Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Douyin | $0.001 za wywołanie | JSON |
Douyin | $0.001 za wywołanie | JSON |
Douyin | $0.001 za wywołanie | JSON |
Douyin | $0.001 za wywołanie | JSON |
Douyin | $0.001 za wywołanie | JSON |
Douyin | $0.001 za wywołanie | JSON |
Przewodniki:Best Douyin API in 2026: Pricing Compared
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/douyin/app-v3/generate-short-url z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: url (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. Douyin Short Link Generator działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Douyin.