cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/douyin/web/webcast_id_to_room_id?webcast_id=775841227732' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/douyin/web/webcast_id_to_room_id',
params={"webcast_id": "775841227732"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"webcast_id": "775841227732"});
const response = await fetch(`https://api.keyapi.ai/v1/douyin/web/webcast_id_to_room_id?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);{
"code": 0,
"message": "success",
"data": {
"room_id": "7624919954380180276"
},
"requestId": "2c59c78f-a0fc-4adc-8201-d801a05b8412"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}Douyin Web API
webcast_id转room_id
webcast_id转room_id
GET
/
v1
/
douyin
/
web
/
webcast_id_to_room_id
cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/douyin/web/webcast_id_to_room_id?webcast_id=775841227732' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/douyin/web/webcast_id_to_room_id',
params={"webcast_id": "775841227732"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"webcast_id": "775841227732"});
const response = await fetch(`https://api.keyapi.ai/v1/douyin/web/webcast_id_to_room_id?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);{
"code": 0,
"message": "success",
"data": {
"room_id": "7624919954380180276"
},
"requestId": "2c59c78f-a0fc-4adc-8201-d801a05b8412"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}⌘I

