Skip to content

xhs_get_operation_logs

Query operation logs.

Parameters

ParameterTypeRequiredDescription
accountstringYesAccount name or ID
actionstringNoFilter by action type
limitnumberNoResult count (default 50, max 500)
offsetnumberNoSkip first N records

Action Types

TypeDescription
searchSearch
get_noteGet note
user_profileGet user profile
list_feedsGet feeds
likeLike
unlikeUnlike
favoriteFavorite
unfavoriteUnfavorite
commentComment
replyReply
publish_contentPublish image note
publish_videoPublish video note
download_imagesDownload images
download_videoDownload video

Response

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

Example

Get all logs

xhs_get_operation_logs({
  account: "main",
  limit: 100
})

Filter by type

xhs_get_operation_logs({
  account: "main",
  action: "like"
})

Pagination

xhs_get_operation_logs({
  account: "main",
  limit: 50,
  offset: 50
})

Use Cases

  • View operation history
  • Debug failed operations
  • Audit account activity

Released under the MIT License.