Execution Flow
1. Confirm Search Conditions
Extract from user input:
keyword(Required) — search keywordfilters(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 savednote_type: Unlimited | Video | Image and textpublish_time: Unlimited | Within one day | Within one week | Within half a yearsearch_scope: Unlimited | Viewed | Not viewed | Followedlocation: 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_idandxsec_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 |