search_tweets
Search Twitter/X for recent tweets using keywords, hashtags, or advanced filters. Retrieve matching tweets with IDs, text, and timestamps.
Instructions
Searches Twitter/X for recent tweets matching a query string. Use this tool when the LLM needs to find tweets by keyword, hashtag, mention, or advanced filters (date ranges, language, engagement thresholds). Supports Twitter's full advanced search syntax. Returns a list of matching tweets with their IDs, text, author IDs, and creation timestamps, plus pagination metadata (next_token) for retrieving additional results. Can use alternative backends (XQuik or GetXAPI) when their respective API keys are configured. The count parameter controls how many results (10-100) are returned per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The Twitter search query string. Supports the full Twitter advanced search syntax, including keywords (separated by spaces), exact phrases (in double quotes), from:username, to:username, #hashtag, @mention, lang:XX (ISO language code), until:YYYY-MM-DD, since:YYYY-MM-DD, min_retweets:N, min_faves:N, and filter:media / filter:links / filter:images. The query is URL-encoded and sent directly to the Twitter search API. | |
| count | Yes | Number of search results to return per request. Must be between 10 and 100 (inclusive). Higher values return more tweets per invocation but increase response latency and API quota consumption. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Indicates the outcome of the operation: "success" or "error". | |
| message | Yes | A human-readable summary of the search result, e.g. "Search completed successfully". | |
| data | Yes | Container holding the array of matched tweets and search metadata. |