Search X posts
x_searchSearch X posts by query and time window, choose recent or full-archive scope, and control results with pagination and field filters.
Instructions
Search X posts. scope=recent covers the last 7 days; scope=all requests full-archive search and may be forbidden by account entitlement. Read-only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "x_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | X search query using official search operators. | |
| scope | No | recent | |
| end_time | No | RFC 3339 end time. | |
| since_id | No | Return posts newer than this ID. | |
| until_id | No | Return posts older than this ID. | |
| expansions | No | X API expansions, for example author_id,attachments.media_keys,referenced_posts. | |
| sort_order | No | ||
| start_time | No | RFC 3339 start time. | |
| max_results | No | Recent search accepts 10-100; full-archive search accepts 10-500. | |
| poll_fields | No | Mapped to poll.fields. | |
| post_fields | No | Mapped to the current query parameter post.fields. | |
| user_fields | No | Mapped to user.fields. | |
| media_fields | No | Mapped to media.fields. | |
| place_fields | No | Mapped to place.fields. | |
| pagination_token | No | Opaque next_token from a previous page. |