Skip to main content
POST
Submit X Search task

X Search

Search public posts using a keyword or search expression.
Results use the normalized structure documented in X Posts, with resource set to search. The submitted expression is returned under extra.search_query.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
string
required

X post search expression.

Minimum string length: 1
results_limit
integer
default:20
Required range: 20 <= x <= 2000Must be a multiple of 20
sort_by
enum<string>
default:latest
Available options:
latest,
top
callback_url
string<uri>

Optional callback URL.

Response

Task submitted

code
integer
Example:

200

data
object