threads_top_posts
Find popular Threads posts by keyword or topic tag over a date window, each with top replies, ranked by likes, comments, or shares.
Instructions
Find the most popular Threads posts for a keyword and/or topic over a date window, each with its own most popular replies, in one call.
"Popular" is rank_by: "likes_comments" (default), "likes" or "likes_comments_shares"
(views are not used). The search fetches search_pages pages of up to search_limit
candidate posts inside the window, keeps the ones matching query / topic_tag, ranks
them and fetches replies only for the final top posts (1 credit each), re-ranked by
likes. If a replies call fails that post carries comments_error and the rest still
return. The exact UTC date_window used comes back in the reply. Threads search is a
sampled window, so fewer than posts_limit posts is normal; add search_pages to widen the
candidate pool.
Args: query: Keyword, phrase or category name (optional when topic_tag is given). days: Size of the date window ending at end_date (or today UTC), inclusive. 1 = just that day. end_date: Optional ISO date (YYYY-MM-DD) to anchor the window on instead of today (UTC). rank_by: "likes_comments" (default), "likes" or "likes_comments_shares". posts_limit: How many top posts to return. comments_per_post: How many top (by likes) replies per post, 0-50. search_limit: Candidate posts per search page, 1-100 (default 30; big pages are slow and can time out; 50 max with coverage="full"). search_pages: How many search pages to scan for candidates (default 1; more costs more credits). coverage: "full" = Threads' real keyword search (3 credits per post). topic_tag: Optional Threads topic tags, comma separated (case-insensitive). topic_match: "exact" (default) or "contains". max_credits: Credit budget for the candidate search (default 500, 0 = unlimited); replies cost extra. dry_run: True = return only the credit estimate (search + replies) and the account balance, no calls. confirmed: Leave False. Without it nothing is run: you get the balance and the estimate. Set True only after the user has seen them and said yes.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "threads_top_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| query | No | ||
| dry_run | No | ||
| rank_by | No | likes_comments | |
| coverage | No | ||
| end_date | No | ||
| confirmed | No | ||
| topic_tag | No | ||
| max_credits | No | ||
| posts_limit | No | ||
| topic_match | No | exact | |
| search_limit | No | ||
| search_pages | No | ||
| comments_per_post | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |