Search Twitter Posts
search_twitterSearch Twitter/X posts by keyword; X search operators work in query. Returns tweet text, author username, URL, date and engagement metrics (likes, retweets, replies, views). Filter by time window (posted_ago) or date range. Use twitter_user_tweets for one account's timeline. Billed $0.006 per page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | Number of pages to fetch, 1-20 (default: 1) | |
| query | Yes | Search keyword (max 500 characters). Supports X search operators | |
| sort_by | No | Sort order: "most_recent" or "relevance" | most_recent |
| end_date | No | Only posts up to and including this date (YYYY-MM-DD, UTC). Not with posted_ago | |
| posted_ago | No | Only posts from this period: "1h", "24h", "7d", "30d", or "12m" (default: all time). Works with both sort orders | |
| start_date | No | Only posts from this date onward (YYYY-MM-DD, UTC). Not with posted_ago | |
| get_sentiment | No | Add AI sentiment analysis (Plutchik emotions, dominant_emotion, intensity, and positive/negative/neutral polarity) to each result. Adds a small surcharge per page, or per request on single-request endpoints. |