获取游客 Cookie/Get the guest Cookie
Changed on[中文]
用途:
- 获取 TikTok Web的游客Cookie
- 可以用于爬取 TikTok Web 的数据,如用户作品、合辑作品等。
- 可以固定身份避免部分接口重复数据。
- 请注意:游客Cookie无法爬取所有数据,有一定的限制。
- 可以配合开源项目使用此接口实现TikTok Web的数据爬取。
参数:
- user_agent: 用户浏览器代理
返回:
- 游客Cookie
[English]
Purpose:
- Get the guest Cookie of TikTok Web
- Can be used to crawl data of TikTok 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 TikTok Web using this interface.
Parameters:
- user_agent: User browser agent
Return:
- Guest Cookie
[示例/Example]
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"
[响应/Response]:
{
"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": "ttwid=1%7Ck5lqyYxAq2wSmaEculMCk31ur4lkvy3DVwn6Phf45GQ%7C1759321284%7C6bac9a25e1f6b512aecad91a37167ad753b47f2306ffe0d70695001d6b4dd793;tt_csrf_token=tueWm0Fw-jL4Ie3Iu2z755XYPzAphhgJmHDA;tt_chain_token=drrbnMAs2A13tME+L6XbsA==",
"Referer": "https://www.tiktok.com/explore"
}
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
用户浏览器代理/User browser agent
Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
the
response's property default value changed fromThis request will be cached. You can access the cached result directly using the URL belowvalid for 24 hours. Accessing the cache will not incur additional charges.toThis response is cached and accessible via the URL below for 24 hours at no extra cost. The cache is for request tracing only — it doesn't affect the API's data freshness and won't be returned through the API again.for the status - info
the
response's property default value changed from本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。to本次响应已缓存,可通过下方 URL 直接查看,有效期 24 小时,访问缓存链接无额外费用。缓存仅用于请求溯源,不影响接口数据的时效性,也不会再次通过接口返回。for the status
- info