Social Media
X Search
Search X for tweets and people. Returns a timeline of matching tweets — text, author, engagement counts, and media — with pagination cursors, as JSON. Costs 1 credit per request.
POST/api/v1/x/search
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonsearchstringrequiredThe search query (1-500 characters).
Example: artificial intelligence
search_typestringResult category: Top, Latest, People, Photos, or Videos. Defaults to Top.
Example: Latest
cursorstringPagination cursor from a previous response (next_cursor). Keep passing it while has_more is true.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.x.search(search="artificial intelligence")
print(results)Response
"next_cursor": "DAADDAABCgABGY-lJH0AAAoAAgAA",
"prev_cursor": "DAADDAABCgABGY-lJH1AAAoAAgAB",
"has_more": true
},
"response_time": 1140,
"credits_used": 1,
"credits_remaining": 4820
}