search
Find X posts from the last 7 days or locate accounts by keyword with date filters, sort order, and result limits.
Instructions
Search X. type=posts: posts from the last 7 days (billed per post returned, keep max_results small). type=users: search accounts by keyword.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Default posts | |
| query | Yes | For posts, X search syntax, e.g. 'from:xdevelopers -is:retweet' | |
| account | No | X username of an authorized account (see list_accounts). Omit to use the default account. | |
| end_time | No | posts only | |
| next_token | No | ||
| sort_order | No | posts only | |
| start_time | No | posts only; ISO 8601 within the last 7 days | |
| max_results | No | posts: 10-100 (default 10); users: 1-1000 (default 10) |