Twitter API Calls
Advanced Search
The Advanced Search feature allows users to perform more complex queries to filter tweets according to various criteria such as date ranges, specific users, hashtags, and more. Below you will find detailed information on how to construct advanced search queries.
Exact Search
Search for tweets containing specific hashtags.
Syntax: "\"searchterm\"
Example:
Hashtag Search
Search for tweets containing specific hashtags.
Syntax: #hashtag
Example:
Mention Search
Search for tweets mentioning a specific user.
Syntax: @username
Example:
From User Search
Search for tweets posted by a specific user.
Syntax: from:username
Example:
To User Search
Search for tweets directed to a specific user.
Syntax: to:username
Example:
Language-Specific Search
Search for tweets in a specific language.
Syntax: lang:language_code
Example:
Date Range Search
Search for tweets within a specific date range.
Syntax: since:yyyy-mm-dd until:yyyy-mm-dd
Example:
Retweets Filtering
Exclude retweets from your search results.
Syntax: -filter:retweets
Example:
Minimum Likes Filter
Search for tweets with a minimum number of likes.
Syntax: min_faves:number
Example:
Minimum Retweets Filter
Search for tweets with a minimum number of retweets.
Syntax: min_retweets:number
Example:
Keyword Exclusion
Exclude tweets with certain keywords.
Syntax: -keyword
Example:
OR Operator
Combine multiple terms, where at least one must be present.
Syntax: term1 OR term2
Example:
Geo-location Based Search
Search for tweets by users located within a certain radius of a given latitude and longitude.
Syntax: geocode:latitude,longitude,radius
Example:
URL Inclusion Search
Search for tweets containing a specific URL.
Syntax: url:"http://example.com"
Example:
Question Tweets Filter
Search for tweets asking a question.
Syntax: ?
Example:
Safe Search Mode
Exclude adult content from your search results.
Syntax: filter:safe
Example:
Each of these search types can be combined to create more complex queries, allowing for highly targeted searches. Remember to test each example to ensure they work as expected and to provide users with accurate and helpful documentation.