Python SDK for Twitter search, followers, DMs, communities, and X automation. Built for TwexAPI. Not affiliated with X Corp.
- Docs: https://docs.twexapi.io
- Source: https://github.com/twexapi-dev/x-api-scraper-python
- Dashboard: https://twexapi.io/dashboard
import os
from x_api_scraper import XapiScraper
with XapiScraper(bearer_auth=os.environ["X_API_SCRAPER_KEY"]) as client:
res = client.search.advanced(
search_terms=["from:elonmusk"],
sort_by="Latest",
next_cursor="",
)
print(res)