@ikenxuan/amagi
API 参考

抖音 API

抖音平台 API 参考文档

抖音 API

抖音平台的所有 API 方法参考。

Fetcher 方法

fetchVideoWork

获取视频作品数据。

const  = await ...({
  : '1234567890123456789',
  : 'strict'
})
参数类型必填说明
aweme_idstring作品 ID
typeMode'strict' | 'loose'类型模式

fetchImageAlbumWork

获取图集作品数据。

const  = await ...({
  : '1234567890123456789'
})

fetchSlidesWork

获取合辑作品数据。

const  = await ...({
  : '1234567890123456789'
})

fetchTextWork

获取文字作品数据。

const  = await ...({
  : '1234567890123456789'
})

parseWork

聚合解析作品(自动识别视频/图集/合辑)。

const  = await ...({
  : '1234567890123456789'
})

推荐使用 parseWork 方法,它会自动识别作品类型并返回相应数据。


fetchWorkComments

获取作品评论数据。

const  = await ...({
  : '1234567890123456789',
  : 20,
  : 0
})
参数类型必填说明
aweme_idstring作品 ID
numbernumber获取数量
cursornumber分页游标

fetchCommentReplies

获取指定评论的回复数据。

const  = await ...({
  : '1234567890123456789',
  : '7123456789012345678',
  : 20,
  : 0
})
参数类型必填说明
aweme_idstring作品 ID
comment_idstring评论 ID
numbernumber获取数量
cursornumber分页游标

fetchUserProfile

获取用户主页数据。

const  = await ...({
  : 'MS4wLjABAAAAxxxxxxxx'
})

fetchUserVideoList

获取用户主页视频列表。

const  = await ...({
  : 'MS4wLjABAAAAxxxxxxxx'
})
参数类型必填说明
sec_uidstring用户 sec_uid

searchContent

搜索内容。

// 综合搜索
const  = await ...({
  : '关键词',
  : 'general',
  : 20
})

// 用户搜索
const  = await ...({
  : '关键词',
  : 'user'
})

// 视频搜索
const  = await ...({
  : '关键词',
  : 'video'
})
参数类型必填说明
querystring搜索关键词
type'general' | 'user' | 'video'搜索类型
numbernumber获取数量
search_idstring搜索 ID(分页用)

fetchSuggestWords

获取热点词/搜索建议。

const  = await ...({
  : '关键词'
})
参数类型必填说明
querystring搜索关键词

fetchMusicInfo

获取音乐数据。

const  = await ...({
  : '7123456789012345678'
})

fetchLiveRoomInfo

获取直播间信息。

const  = await ...({
  : '7123456789',
  : 'xxx'
})
参数类型必填说明
room_idstring直播间 ID
web_ridstring直播间真实房间号

fetchDanmakuList

获取弹幕数据。

const  = await ...({
  : '1234567890123456789',
  : 60000,
  : 0,
  : 60000
})
参数类型必填说明
aweme_idstring作品 ID
durationnumber视频时长(毫秒)
start_timenumber开始时间(毫秒)
end_timenumber结束时间(毫秒)

requestLoginQrcode

申请登录二维码。

const  = await ...({
  : 'verify_xxx'
})
参数类型必填说明
verify_fpstringfp 指纹

fetchEmojiList

获取 Emoji 列表。

const  = await ...({})

fetchDynamicEmojiList

获取动态表情列表。

const  = await ...({})

On this page