PrerequisitesBefore you begin, you’ll need:
- A developer account with an approved App
- Your App’s Bearer Token (found in the Developer Console under “Keys and tokens”)
Build a query
Search queries use operators to match Posts. Start with a simple keyword:Or combine multiple operators:This matches Posts containing “python” in English, excluding retweets.
Make a request
cURL
Review the response
The default response includes
id, text, and edit_history_tweet_ids:Add fields and expansions
Request additional data with query parameters:Response:
cURL
Paginate through results
The SDKs handle pagination automatically. For cURL, use the
next_token from the response:Pagination guide
Learn more about navigating large result sets
Example queries
Posts from a specific user
Posts from a specific user
Posts with a hashtag
Posts with a hashtag
Posts with images
Posts with images
Posts mentioning a user
Posts mentioning a user
Posts with links to a domain
Posts with links to a domain