Skip to content

xhs_get_operation_logs

查询操作日志。

参数

参数类型必填说明
accountstring账号名称或 ID
actionstring按操作类型过滤
limitnumber返回数量(默认 50,最大 500)
offsetnumber跳过前 N 条记录

操作类型

类型说明
search搜索
get_note获取笔记
user_profile获取用户资料
list_feeds获取推荐
like点赞
unlike取消点赞
favorite收藏
unfavorite取消收藏
comment评论
reply回复
publish_content发布图文
publish_video发布视频
download_images下载图片
download_video下载视频

返回值

json
{
  "logs": [
    {
      "id": 1234,
      "accountId": "uuid",
      "action": "search",
      "targetId": null,
      "params": { "keyword": "美食" },
      "result": { "count": 20 },
      "success": true,
      "error": null,
      "durationMs": 3500,
      "createdAt": "2024-01-15T12:30:00Z"
    }
  ],
  "total": 150,
  "hasMore": true
}

示例

获取所有日志

xhs_get_operation_logs({
  account: "主账号",
  limit: 100
})

按类型过滤

xhs_get_operation_logs({
  account: "主账号",
  action: "like"
})

分页查询

xhs_get_operation_logs({
  account: "主账号",
  limit: 50,
  offset: 50
})

使用场景

  • 查看操作历史
  • 调试失败的操作
  • 审计账号活动

Released under the MIT License.