Search X (formerly Twitter)
x_searchSearch X by keywords. type picks the mode: recent (default) is the deep chronological sweep and keeps paginating as far as you follow the cursor; popular returns the highest-engagement tweets for the query; people finds accounts and returns a single page (no cursor). Advanced query operators pass through verbatim, e.g. "from:nasa", "min_faves:100", exact phrases in quotes -- there is no separate date parameter, so use since:/until: operators for time windows. Costs 6 credits per page; a cursor page is a NEW call priced the same way, so a deep sweep costs linearly in pages. Returns tweet summaries (text, author with follower count, views, likes, retweets, replies, created_at, url, id) with a cursor. Fetch one tweet's full detail with x_get_tweet and an account's timeline with x_get_tweets. For comment-level sentiment inside topic communities, reddit_search type=comments is usually the sharper instrument.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | recent = chronological deep sweep; popular = top engagement; people = account search (single page). | recent |
| query | Yes | Free-text keywords; X advanced operators work, e.g. 'claude code from:AnthropicAI since:2026-06-01'. | |
| cursor | No | Cursor from a previous page. Not valid with type 'people'. | |
| freshness | No | recent (default) serves cached data from the last few hours when available; realtime forces a live fetch for +2 credits (refunded if we fall back to cached data). Trial keys are cached-only and reject realtime with TRIAL_CAP_EXCEEDED; paying upgrades this same key to unlock it. | recent |
| max_credits | No | Spend ceiling for this one call. The call is rejected (nothing charged) if its quote exceeds this. Only the quote is ever reserved, never this ceiling. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | Yes | ||
| common | Yes | ||
| entity | Yes | ||
| platform | Yes | ||
| freshness | Yes | ||
| data_as_of | Yes | ||
| canonical_url | Yes | ||
| schema_version | Yes | ||
| platform_fields | Yes |