抖音关键词搜索,视频详情api

张开发
2026/7/1 17:15:50 15 分钟阅读
抖音关键词搜索,视频详情api
一、关键词搜索视频v2 版接口地址plaintextGET https://open.douyin.com/dy_open_api/v2/search/video/权限Scope:aweme.dy.video_search_v2需申请「抖音视频垂搜」权限抖音开放平台请求头httpaccess-token: {你的client_token} content-type: application/json必选参数Querykeyword: 搜索关键词如 美食教程count: 每页数量建议 10-20device_id: 设备 ID非字节租户可传随机数cursor: 分页游标首次传 0抖音开放平台可选筛选sort_type: 0 综合1 最多点赞2 最新发布publish_time: 0 不限11 天77 天180 半年filter_duration: 时长筛选01 分钟内1~55~10000抖音开放平台响应关键字段json{ err_no: 0, err_msg: success, data: { cursor: 10, has_more: true, video_list: [ { item_id: 7471252140422401337, // 视频ID用于详情 title: 美食教程#家常菜, cover: 封面图URL, create_time: 1739536450, nickname: 作者昵称, statistics: { digg_count: 9254 }, link: https://www.douyin.com/video/7471252140422401337 } ] } } {insert\_element\_3\_} --- ### 二、视频详情官方标准接口 #### 1. 查询特定视频数据用户授权版 **接口地址**POST /api/apps/v1/video/query/plaintext**用途**获取**实时**播放、点赞、评论、分享等统计 **请求** http Authorization: Bearer {access_token} Content-Type: application/json { open_id: 用户open_id, item_ids: [7471252140422401337] // 从搜索接口拿到的item_id }2. 视频详情页跳转链接无授权版接口地址plaintextPOST https://open.douyin.com/api/douyin/v1/schema/get_item_info/用途获取可直接跳转 / 扫码的 Schema 链接抖音开放平台请求json{ item_id: 7471252140422401337, expire_at: 1744016400 // 过期时间戳 } {insert\_element\_5\_} **响应** json { err_no: 0, data: { schema: snssdk1128://openplatform/share?share_typeh5item_id7471252140422401337 } } {insert\_element\_6\_} --- ### 三、接入流程最简步骤 1. **申请权限** - 抖音开放平台 → 应用 → 能力管理 → 申请「**抖音视频垂搜**」{insert\_element\_7\_} 2. **获取 token**POST https://open.douyin.com/oauth/client_token/plaintext参数client_key, client_secret{insert\_element\_8\_} 3. **关键词搜索** → 拿到 item_id 4. **查详情/统计** → 用 item_id 调用详情接口 --- ### 四、常见错误 - 28001003: access-token 无效/过期 → 重新获取{insert\_element\_9\_} - 28001018: 应用**未开通**对应接口权限 → 控制台申请{insert\_element\_10\_} - 28003017: 调用额度用尽 → 联系平台提升配额{insert\_element\_11\_} --- 要不要我帮你整理一份可直接运行的 **Python 调用示例**包含关键词搜索 详情查询

更多文章