# Search Tweets

![](/files/V00gyPoTxree9BXGo6Bz)

### 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edrus.gitbook.io/appgregator-api-docs/appgregators/social-media/twitter/api/search-tweets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
