Search Tweets
The/search-tweets endpoint runs keyword and operator-based queries against the public X (Twitter) search index and returns matching tweets with full author profiles and engagement metrics.
For end-to-end usage patterns, query templates, and working code, see the How to Search Tweets via API guide on the blog.
Endpoint
Authentication
Pass your API key in theApiKey header (case-sensitive).
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keywords and operators. Supports the full set of native X search operators. |
order | string | No | "popular" (default) for the Top tab equivalent, or "latest" for chronological order. |
next_cursor | string | No | Pagination cursor returned in the previous response. Omit on the first request. |
Example Request
Response
For the complete field reference, see Response Format.
Query Operators
Thequery field accepts the full set of native X search operators, including:
- Keywords and exact phrases:
"climate change" - User filters:
from:,to:,@mention - Engagement filters:
min_faves:,min_retweets:,min_replies: - Content filters:
filter:media,filter:images,filter:videos,filter:links(prefix with-to exclude) - Language and date:
lang:en,since:2026-01-01,until:2026-03-01 - Boolean logic:
OR, parentheses for grouping,-for exclusion
Full operator reference: Search Operators.
Pagination
The response includes anext_cursor field. To fetch the next page, send the same request with next_cursor set to that value. When next_cursor is null or absent, the result set is exhausted.
See Pagination for cursor-based pagination patterns and edge cases.
Rate Limit
20 requests per second per API key, universal across all plans. Exceeding the limit returns429 Too Many Requests. See Rate Limits.
Error Codes
| Code | Meaning |
|---|---|
200 | OK |
400 | Bad request (invalid parameters) |
401 | Unauthorized (missing or invalid API key) |
429 | Too many requests (rate limit exceeded) |
500 | Internal server error |
See Error Codes for the full list.
Related Endpoints
- Track Mentions - purpose-built
@handletracking with a richer body-level filter set - User Tweets - timeline of a single user
- Search Users - finding accounts by keyword