根据用户的需求,智能选择并调用对应的抖音数据 API 接口。
https://api.xsdata.topx-api-keyXS_API_KEY 读取,如果未设置则向用户询问根据用户意图,选择最合适的接口执行。如果用户意图不明确,询问用户需要查询什么数据。
POST /api/v1/goa/douyin/fetch-user-video-listsec_user_id 或 share_text(二选一)count(默认10)、 max_cursor(翻页游标)、 filter_typereference/user-video-list.mdPOST /api/v1/goa/douyin/fetch-user-datasec_user_id 或 share_text(二选一)reference/user-data.mdPOST /api/v1/goa/douyin/fetch-video-detailaweme_id 或 share_text(二选一)reference/video-detail.mdPOST /api/v1/goa/douyin/fetch-video-commentaweme_id 或 share_text(二选一)count(默认10)、 cursor(翻页游标)reference/video-comment.mdGET /api/v1/douyin/search-userkeyword(搜索关键词)page(页码)、 userType(用户类型)raw_data 是 JSON 字符串,需要二次解析reference/search-user.mdGET /api/v1/douyin/search-videokeyword(搜索关键词)page、 searchId(翻页)、 sortType(排序: _0 综合/ _1 最多点赞/ _2 最新)、 publishTime(时间筛选: _0 不限/ _1 一天内/ _7 一周内)、 duration(时长筛选: _0 不限/ _10 0-10s/ _30 10-30s/ _60 30-60s/ _300 1-5min)reference/search-video.mdPOST /api/v1/goa/douyin/fetch-video-statisticsaweme_id 或 share_text(二选一)digg_count(点赞)、 download_count(下载)、 play_count(播放)、 share_count(分享)reference/video-statistics.mdPOST 接口:
bash
curl -s --location 'https://api.xsdata.top<endpoint>' \
--header 'x-api-key: <api_key>' \
--header 'Content-Type: application/json' \
--data '<json_body>'
GET 接口:
bash
curl -s --location 'https://api.xsdata.top<endpoint>?<query_params>' \
--header 'x-api-key: <api_key>' \
--header 'Content-Type: application/json'
https://v.douyin.com/xxx),将其作为 share_text 参数aweme_id(纯数字ID),用于视频相关接口sec_user_id(以 MS4wLjAB 开头的长字符串),用于用户相关接口sec_uid 后再调用用户相关接口XS_API_KEY 或询问用户)XS_API_KEY 以便后续使用