How does Twitter Search function works?

search

#1

I am developing a simple twitter search app which allows users to type in a search query and when they hit search button it will fetch results by connecting to the Twitter Search API which will be displayed to the user.

When I was testing it I noticed for some tweets, query string doesn’t appear in the tweet text. So I want to know how the matching process works in Twitter search.

For example if my query string is “abc”, how does it find matching tweets? Is it based on matching keywords on just tweet text or user name or URL content in tweets or where does it look in a tweet to find matching keywords.


#2

Depending on what endpoint you’re using it should be contained within the tweet, more info: https://dev.twitter.com/rest/public/search


#3

I looked at the link but it doesn’t say anything about where in the tweet that it looks for matches like if it consider the user mentions or content inside URLs when looking for matching keywords?

From my experiments it seems like it considers user mentions as well as content inside URLs, but is there any documentation explaining this? The link you provided doesn’t mention these things, it just tells you things like how to build the query and using the API.