tx twitterxapi.com docs

API reference

Search

Search public posts, accounts, and the posts behind a trend.

GET

Search posts

/v1/search?q={query}&cursor={cursor}

Run an X search query and get one page of public posts.

curl "https://twitterxapi.com/api/v1/search?q=openai&level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Search users

/v1/search/users?q={query}&cursor={cursor}

Search accounts by name, username, or query text.

curl "https://twitterxapi.com/api/v1/search/users?q=openai&level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Search a trend

/v1/search/trend?q={query}&cursor={cursor}

Run the search request used when someone opens a trend.

curl "https://twitterxapi.com/api/v1/search/trend?q=openai&level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"