抖音
抖音视频搜索 API
按关键词搜索视频。每次请求消耗 10 积分。
POST/api/v1/douyin/search/videos
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonkeywordstringrequired搜索关键词,1-200 个字符。
Example: 美食
offsetinteger上一次响应返回的分页偏移量(offset)
pageinteger页码,从 1 开始,范围 1-200。
cursorinteger上一次响应返回的分页游标(cursor)
search_idstring上一次响应返回的搜索 id,用于分页
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
result = client.douyin.request("/api/v1/douyin/search/videos", {"keyword": "美食"})
print(result)Response
"search_id": "2026090103463307211D63191784294174",
"offset": 10,
"cursor": 10,
"backtrace": "w8KOvPTzjA32DWEYf/cuFV7ZLZm2+yr8PxDj5Bb5vbow/4Z2+QjZy2/IQ4VISxDR0WWF8NMviCh5y7VwPMwMZA==",
"has_more": true
},
"response_time": 4340
}