Tweets
Advanced Search
Search tweets using Twitter's advanced search operators
GET /twitter/tweet/advanced_search
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (supports advanced operators) |
product | enum | No | Latest (default) or Top |
cursor | string | No | Pagination cursor |
Notes
- Returns up to 20 tweets per page.
- Supports advanced search operators. See: https://github.com/igorbrigadir/twitter-advanced-search
Query Examples
from:elonmusk— tweets from elonmusk"AI" OR "crypto" from:elonmusk— tweets containing AI or cryptofrom:elonmusk since:2024-01-01— tweets since Jan 1, 2024to:elonmusk— tweets replying to elonmusk#crypto min_faves:100— tweets with at least 100 likessolana memecoin— tweets mentioning solana and memecoin
Response (200)
{
"query": "from:0xsweep",
"tweet_count": 20,
"has_more": true,
"next_cursor": "DAABCgABG...",
"tweets": [
{
"type": "tweet",
"id": "2015410770834591992",
"url": "https://x.com/0xsweep/status/2015410770834591992",
"twitterUrl": "https://twitter.com/0xsweep/status/2015410770834591992",
"text": "Thread on the latest memecoin trends...",
"source": "Twitter Web App",
"retweetCount": 12,
"replyCount": 5,
"likeCount": 89,
"quoteCount": 3,
"viewCount": 4500,
"createdAt": "Sun Jan 25 13:05:46 +0000 2026",
"lang": "en",
"bookmarkCount": 10,
"isReply": false,
"inReplyToId": null,
"conversationId": "2015410770834591992",
"media": [],
"inReplyToUserId": null,
"author": {
"type": "user",
"userName": "0xsweep",
"url": "https://x.com/0xsweep",
"id": "1234567890",
"name": "Sweep",
"isVerified": false,
"isBlueVerified": true,
"profilePicture": "https://pbs.twimg.com/profile_images/...",
"coverPicture": "https://pbs.twimg.com/profile_banners/...",
"description": "Crypto researcher",
"location": "",
"followers": 15000,
"following": 500,
"createdAt": "Mon Jan 01 00:00:00 +0000 2022"
},
"quoted_tweet": null
}
]
}Example
# Latest tweets
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/tweet/advanced_search?q=from:0xsweep&product=Latest"
# Top tweets
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/tweet/advanced_search?q=from:0xsweep&product=Top"
# With pagination
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/tweet/advanced_search?q=from:0xsweep&product=Latest&cursor=DAABCgABG..."