webcast_idstringwymagane
Webcast id
https://api.sandbase.ai/v1/api/douyin/web/webcast-id-2-room-idConverts a Douyin webcast ID into its corresponding room ID. Submit a webcast ID to retrieve the matching livestream room identifier for Douyin web workflows.
[
{
"data": {
"room_id": "Error webcast_id"
}
}
]Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
This API converts a Douyin webcast ID into the livestream room ID that matches it. It needs one input, webcast_id, and returns a single room_id value.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/webcast-id-2-room-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"webcast_id": "775841227732"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
webcast_id | string | Yes | Webcast id |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"room_id": "7624919954380180276"
}
| Field | Meaning |
|---|---|
room_id | The livestream room ID that matches the submitted webcast_id. This is the only field in the response. |
room_id | The value is a string of digits, such as 7624919954380180276. Keep it as a string so tools do not round the long number. |
room_id | Use this value as the room identifier in other Douyin live APIs that ask for a room ID. |
webcast_id as a string. The example value is 775841227732.room_id.$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/web/webcast-id-2-room-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webcast_id": "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.
webcast_idstringwymaganeWebcast id
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
[
{
"data": {
"room_id": "Error webcast_id"
}
}
]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.03 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/web/webcast-id-2-room-id 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: webcast_id (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 Webcast ID to Room ID 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.