user_agentstringจำเป็น
User browser agent
https://api.sandbase.ai/v1/api/douyin/web/web-guest-cookieReturns a guest cookie for Douyin Web based on a specified browser user agent string. This cookie helps establish identity for browsing web endpoints.
[
{
"data": {
"Cookie": "odin_tt=d43d11a83ae416dc24a943b0590685a40cd2215d95763ada9689c37fee664891;passport_fe_beating_status=false;sid_guard=4256de2eeab4caca559f3327d127e94a%7C1790689960%7C21600%7CTue%2C+29-Sep-2026+19%3A52%3A40+GMT;uid_tt=5e4470bd96ae87638b79abf3bfaad940;uid_tt_ss=5e4470bd96ae87638b79abf3bfaad940;sid_tt=4256de2eeab4caca559f3327d127e94a;sessionid=4256de2eeab4caca559f3327d127e94a;sessionid_ss=4256de2eeab4caca559f3327d127e94a;session_tlb_tag=sttt%7C13%7CQlbeLuq0yspVnzMn0SfpSv________-s6_eMkZxNIGcQfHYE8y13-cKLbr8SN4z0IiRGNsqzIeY%3D;is_staff_user=false;sid_ucp_v1=1.0.0-KDJkOGIyM2RhMTc1MzgyMjc5NGM5MmIyODdl…",
"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"
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns a guest cookie string for Douyin Web, built for the browser user agent you send. The only input is user_agent, and the response echoes that user agent back with the cookie.
Cookie header to attach to other Douyin Web requests that need a browser identity.curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/web-guest-cookie" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
user_agent | string | Yes | User browser agent |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"Cookie": "__ac_non…",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)…"
}
| Field | Meaning |
|---|---|
Cookie | A single cookie header string made of name=value pairs separated by semicolons. The sample contains pairs named __ac_nonce, __ac_signature, __ac_referer and web_sign_token. Send the whole string as the Cookie header in Douyin Web requests. |
User-Agent | The user agent string the cookie was issued for. It matches the user_agent you sent. Use the same value as the User-Agent header in later requests. |
user_agent, such as a current Chrome string. Reuse the same string in later requests that use this cookie.Cookie value is long and the sample here is cut short. Store the full string as returned.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/web-guest-cookie" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"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"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
user_agentstringจำเป็นUser browser agent
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"Cookie": "odin_tt=d43d11a83ae416dc24a943b0590685a40cd2215d95763ada9689c37fee664891;passport_fe_beating_status=false;sid_guard=4256de2eeab4caca559f3327d127e94a%7C1790689960%7C21600%7CTue%2C+29-Sep-2026+19%3A52%3A40+GMT;uid_tt=5e4470bd96ae87638b79abf3bfaad940;uid_tt_ss=5e4470bd96ae87638b79abf3bfaad940;sid_tt=4256de2eeab4caca559f3327d127e94a;sessionid=4256de2eeab4caca559f3327d127e94a;sessionid_ss=4256de2eeab4caca559f3327d127e94a;session_tlb_tag=sttt%7C13%7CQlbeLuq0yspVnzMn0SfpSv________-s6_eMkZxNIGcQfHYE8y13-cKLbr8SN4z0IiRGNsqzIeY%3D;is_staff_user=false;sid_ucp_v1=1.0.0-KDJkOGIyM2RhMTc1MzgyMjc5NGM5MmIyODdl…",
"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"
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Douyin Web Guest CookieAPI นี้ Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.001 ต่อการเรียก | JSON |
Douyin | $0.03 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/douyin/web/web-guest-cookie โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: user_agent (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Douyin Web Guest Cookie ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Douyin API แยกต่างหาก