@ikenxuan/amagi
API 参考

快手 API

快手平台 API 参考文档

快手 API

快手平台的所有 API 方法参考。

Fetcher 方法

fetchVideoWork

获取单个视频作品数据。

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

fetchWorkComments

获取作品评论数据。

const  = await ...({
  : '3xqxxxxxx'
})
参数类型必填说明
photoIdstring作品 ID

fetchUserProfile

获取用户主页聚合数据。

const  = await ...({
  : 'KPL704668133',
  : 'strict'
})
参数类型必填说明
principalIdstring用户主页 principalId
typeMode'strict' | 'loose'类型模式

fetchUserWorkList

获取用户公开视频列表。

const  = await ...({
  : 'KPL704668133',
  : 12,
  : '',
  : 'strict'
})
参数类型必填说明
principalIdstring用户主页 principalId
countnumber每页数量,默认 12
pcursorstring分页游标,首屏可传空串
typeMode'strict' | 'loose'类型模式

fetchLiveRoomInfo

获取直播间聚合数据。

const  = await ...({
  : 'KPL704668133',
  : 'strict'
})
参数类型必填说明
principalIdstring直播间 principalId
typeMode'strict' | 'loose'类型模式

fetchEmojiList

获取 Emoji 列表。

const  = await ...({})

使用示例

获取视频信息

const  = ({
  : {
    : '',
    : '',
    : 'did=xxx; ...',
    : ''
  }
})

const  = await ...({
  : '3xqxxxxxx'
})

if (.) {
  .(.)
}

工具集

URL 拼接器

import {  } from '@ikenxuan/amagi'

// 获取结构化请求描述对象
const  = ..({
  : '3xqxxxxxx'
})

live_api 签名

import {  } from '@ikenxuan/amagi'

const  = ..({
  : 'KPL704668133'
})

const  = ..(
  ,
  'kwfv1=your_cookie_value'
)

注意事项

快手接口需要有效的 Cookie,部分接口可能需要登录状态才能获取完整数据。

  • 快手的 photoId 可以从分享链接中提取
  • 快手的 principalId 可以从用户主页或直播间 URL 末段提取
  • 评论数据可能需要登录 Cookie 才能获取
  • 建议设置合理的请求间隔,避免触发风控

On this page