# Search Tweets

![](https://2592634121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT5HLPrqZhkeNGgJP37dC%2Fuploads%2FuH2LzpxSbRRywYjWF29E%2FScreen%20Shot%202022-07-05%20at%2022.19.58.png?alt=media\&token=06a96506-401c-463d-bdee-4fd0887f5bd2)

### Building queries for Search Tweets

| Operator     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Example                                               |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| keyword      | <p>Matches a keyword within the body of a Tweet. This is a tokenized match, meaning that your keyword string will be matched against the tokenized text of the Tweet body. Tokenization splits words based on punctuation, symbols, and Unicode basic plane separator characters.</p><p>For example, a Tweet with the text “I like coca-cola” would be split into the following tokens: I, like, coca, cola. These tokens would then be compared to the keyword string used in your query. To match strings containing punctuation (for example coca-cola), symbol, or separator characters, you must wrap your keyword in double-quotes.</p> | pepsi OR cola OR "coca cola"                          |
| emoji        | <p>Matches an emoji within the body of a Tweet. Similar to a keyword, emojis are a tokenized match, meaning that your emoji will be matched against the tokenized text of the Tweet body.</p><p>Note that if an emoji has a variant, you must wrap it in double quotes to add to a query.</p>                                                                                                                                                                                                                                                                                                                                                 | **(😃 OR 😡) 😬**                                     |
| from:        | <p>Matches any Tweet from a specific user.<br>The value can be either the username (excluding the @ character) or the user’s numeric user ID.<br><br>You can only pass a single username/ID per <strong>from:</strong> operator.</p>                                                                                                                                                                                                                                                                                                                                                                                                          | from:docialcom                                        |
| to:          | <p>Matches any Tweet that is in reply to a particular user.<br>The value can be either the username (excluding the @ character) or the user’s numeric user ID.<br><br>You can only pass a single username/ID per <strong>to:</strong> operator.</p>                                                                                                                                                                                                                                                                                                                                                                                           | to:docialcom                                          |
| #            | Matches any Tweet containing a recognized hashtag, if the hashtag is a recognized entity in a Tweet. This operator performs an exact match, NOT a tokenized match, meaning the rule #thanku will match posts with the exact hashtag #thanku, but not those with the hashtag #thankunext.                                                                                                                                                                                                                                                                                                                                                      | #thankunext #fanart OR @arianagrande                  |
| $            | Matches any Tweet that contains the specified ‘cashtag’ (where the leading character of the token is the ‘$’ character).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | $twtr OR @twitterdev -$fb                             |
| url:         | Performs a tokenized match on any validly-formatted URL of a Tweet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | from:TwitterDev url:"<https://developer.twitter.com>" |
| has:mentions | Matches Tweets that mention another Twitter user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | #nowplaying has:mentions                              |
| has:images   | Matches Tweets that contain a recognized URL to an image.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | #meme has:images                                      |
| has:videos   | Matches Tweets that contain native Twitter videos, uploaded directly to Twitter. This will not match on videos created with Periscope, or Tweets with links to other video hosting sites.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | #icebucketchallenge has:videos                        |

#### for more guidance and support can be found on [twitter doc](https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/build-a-query)​ <a href="#for-more-guidance-and-support-can-be-found-on-twitter-doc" id="for-more-guidance-and-support-can-be-found-on-twitter-doc"></a>
