v1

latestOpenAPI 3.1.02026-07-26180242448.0 KB
Tweets

Advanced tweet search

Search for tweets using advanced query syntax. Supports filtering by Top, Latest, or Media results. Use Twitter's advanced search operators in the query (e.g., from:username, since:2024-01-01, min_faves:100). Essential for monitoring, research, and content discovery.

get/v1/twitter/tweets/advanced_search

Query parameters

querystring required
Example:from:elonmusk lang:en

Search query string. Supports Twitter advanced search operators like from:, to:, since:, until:, min_faves:, min_retweets:, lang:, etc.

query_type'Top' | 'Latest' | 'Media'

Type of search results to return.

countinteger

Number of tweets to return per page.

cursorstring

Pagination cursor for fetching the next page of results.

Response

Successfully retrieved search results.

next_cursorstring nullable

Cursor for fetching the next page. Null if no more results.

Example response

{
  "data": [
    {
      "id": "1234567890123456789",
      "text": "Hello, world! This is a tweet.",
      "created_at": "Wed Oct 10 20:19:24 +0000 2018",
      "lang": "en",
      "user_id": "44196397",
      "username": "elonmusk",
      "user_name": "Elon Musk",
      "hashtags": [
        {
          "text": "AI"
        }
      ],
      "place": {
        "full_name": "San Francisco, CA",
        "name": "San Francisco",
        "country": "United States",
        "country_code": "US"
      },
      "source": "Twitter Web App"
    }
  ]
}