cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/douyin/web/fetch_douyin_web_guest_cookie?user_agent=Mozilla/5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/90.0.4430.212%20Safari/537.36' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/douyin/web/fetch_douyin_web_guest_cookie',
params={"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"});
const response = await fetch(`https://api.keyapi.ai/v1/douyin/web/fetch_douyin_web_guest_cookie?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);{
"code": 0,
"message": "success",
"data": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
"Cookie": "odin_tt=641ad4ddcb23674f21815a1b01ce32bc3d6766028d067c45b27ba3e4c2a59f16;passport_fe_beating_status=false;sid_guard=9724037396b3d5fe08a3920a48c624fa%7C1787542760%7C21600%7CMon%2C+24-Aug-2026+09%3A39%3A20+GMT;uid_tt=a833d55047de4b43e6c8a907db00fcd9;uid_tt_ss=a833d55047de4b43e6c8a907db00fcd9;sid_tt=9724037396b3d5fe08a3920a48c624fa;sessionid=9724037396b3d5fe08a3920a48c624fa;sessionid_ss=9724037396b3d5fe08a3920a48c624fa;session_tlb_tag=sttt%7C8%7ClyQDc5az1f4Io5IKSMYk-v________-5bA1EZKd6VOhUCCyzyEX8Z6tlTENcxsy0SsPZ8kaSs_c%3D;is_staff_user=false;sid_ucp_v1=1.0.0-KDEwZTJlZDk1NTVlMjdjZDczZTY2NjA2ZWY4YWZmMThhNGVhOGViYTcKCBDo-a7UBhgNGgJscSIgOTcyNDAzNzM5NmIzZDVmZTA4YTM5MjBhNDhjNjI0ZmE;ssid_ucp_v1=1.0.0-KDEwZTJlZDk1NTVlMjdjZDczZTY2NjA2ZWY4YWZmMThhNGVhOGViYTcKCBDo-a7UBhgNGgJscSIgOTcyNDAzNzM5NmIzZDVmZTA4YTM5MjBhNDhjNjI0ZmE;passport_assist_user=;ttwid=1%7CUl3kVnv_7i_jaq3-K5r03Yrfg0dhA4cPSFnWT-2uDuw%7C1787542761%7C9c340f5636b04f41402e35d58adf6e1e41ce6dacc2a47e661e60f7db6d1fb304;"
},
"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
Get the guest Cookie of Douyin Web
Get the guest Cookie of Douyin Web
- Can be used to crawl data of Douyin Web, such as user videos, mix videos, etc.
- Can fix identity to avoid duplicate data for some interfaces.
- Please note: Guest Cookie cannot crawl all data, there are certain restrictions.
- Can be used with open source projects to implement data crawling of Douyin Web using this interface.
GET
/
v1
/
douyin
/
web
/
fetch_douyin_web_guest_cookie
cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/douyin/web/fetch_douyin_web_guest_cookie?user_agent=Mozilla/5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/90.0.4430.212%20Safari/537.36' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/douyin/web/fetch_douyin_web_guest_cookie',
params={"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"});
const response = await fetch(`https://api.keyapi.ai/v1/douyin/web/fetch_douyin_web_guest_cookie?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);{
"code": 0,
"message": "success",
"data": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
"Cookie": "odin_tt=641ad4ddcb23674f21815a1b01ce32bc3d6766028d067c45b27ba3e4c2a59f16;passport_fe_beating_status=false;sid_guard=9724037396b3d5fe08a3920a48c624fa%7C1787542760%7C21600%7CMon%2C+24-Aug-2026+09%3A39%3A20+GMT;uid_tt=a833d55047de4b43e6c8a907db00fcd9;uid_tt_ss=a833d55047de4b43e6c8a907db00fcd9;sid_tt=9724037396b3d5fe08a3920a48c624fa;sessionid=9724037396b3d5fe08a3920a48c624fa;sessionid_ss=9724037396b3d5fe08a3920a48c624fa;session_tlb_tag=sttt%7C8%7ClyQDc5az1f4Io5IKSMYk-v________-5bA1EZKd6VOhUCCyzyEX8Z6tlTENcxsy0SsPZ8kaSs_c%3D;is_staff_user=false;sid_ucp_v1=1.0.0-KDEwZTJlZDk1NTVlMjdjZDczZTY2NjA2ZWY4YWZmMThhNGVhOGViYTcKCBDo-a7UBhgNGgJscSIgOTcyNDAzNzM5NmIzZDVmZTA4YTM5MjBhNDhjNjI0ZmE;ssid_ucp_v1=1.0.0-KDEwZTJlZDk1NTVlMjdjZDczZTY2NjA2ZWY4YWZmMThhNGVhOGViYTcKCBDo-a7UBhgNGgJscSIgOTcyNDAzNzM5NmIzZDVmZTA4YTM5MjBhNDhjNjI0ZmE;passport_assist_user=;ttwid=1%7CUl3kVnv_7i_jaq3-K5r03Yrfg0dhA4cPSFnWT-2uDuw%7C1787542761%7C9c340f5636b04f41402e35d58adf6e1e41ce6dacc2a47e661e60f7db6d1fb304;"
},
"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"
}🪙2 creditper request
Copy for AI
🤖 Why Code When AI Can Do It For You?
Stop writing code like it’s 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.
Query Parameters
User browser agent
Example:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
Response
Request successful
The response is of type object.

