Search tweets
GET /twitter/search
Search with X / Twitter advanced operators. ~20 tweets per page; paginate with cursor.
Auth
http
Authorization: Bearer YOUR_API_KEY
Accept: application/jsonQuery
| Param | Type | Required | Description |
|---|---|---|---|
query | string | yes | UTF-8 query, URL-encoded; operators go inside this string |
type | enum | no | Latest (default) or Top |
cursor | string | no | next_cursor from previous page (URL-encode) |
Example
bash
curl "https://twidata.wvovw.com/twitter/search?query=from%3Aelonmusk%20doge&type=Latest" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Success response (truncated)
json
{
"next_cursor": "DAACCgACGC12FhmAJxAKAAMY...",
"tweets": [
{
"tweet_created_at": "2023-12-13T05:39:09.000000Z",
"id_str": "1734810168053956719",
"full_text": "@TeslaHype Pace of Progress",
"user": { "id_str": "44196397", "screen_name": "elonmusk" },
"retweet_count": 78,
"favorite_count": 977,
"views_count": 32377
}
]
}Prefer full_text over text. Use id_str as a string in JavaScript.
Billing
Charged by tweets.length (default 1 credit / item). Empty result = free.
Common operators (inside query)
| Operator | Meaning |
|---|---|
from:user | From user |
@user -from:user | Mentions only |
from:user -filter:replies | Original tweets only |
since_time:UNIX / until_time:UNIX | Time window |
since_id:ID / max_id:ID | ID range |
conversation_id:ID | Conversation |
Pagination
Omit cursor on first page; pass next_cursor next. Each page is billed separately.
For large backfills when Latest stops returning cursors, segment with max_id: / since_id: in query.
Errors
| HTTP | Meaning |
|---|---|
| 200 | OK |
| 401 / 402 | Auth / balance |
| 422 | Validation |
| 429 | Rate limit |
| 500 / 502 | Upstream; retry |