SuperAPI AI Directory

xhs-search

General & other

View repository

Updated 10-15 17:21

About this skill

Execution Flow

1. Confirm Search Conditions

Extract from user input:

  • keyword(Required) — search keyword
  • filters(Optional) — filter conditions

2. Call the Search

Call search_feeds:

  • keyword(string, required)
  • filters(object, optional):
    • sort_by: General | Latest | Most liked | Most commented | Most saved
    • note_type: Unlimited | Video | Image and text
    • publish_time: Unlimited | Within one day | Within one week | Within half a year
    • search_scope: Unlimited | Viewed | Not viewed | Followed
    • location: Unlimited | Same city | Nearby

3. Display Results

Organize the search results into a list for display, each entry containing:

  • Title, author
  • Number of likes, number of comments, number of saves
  • feed_id and xsec_token(needed for subsequent operations)

The user can be prompted to:

  • View the details of a note (use xhs-explore)
  • Interact with a note (use xhs-interact)

Failure Handling

Scenario Handling
Not logged in Guide the user to log in using xhs-login
No search results Suggest adjusting the keyword or filter conditions