Advanced Search Operators to Find Emails in Gmail

Gmail provide advanced search operators to help you narrow your search criteria.

The query syntax is operator

. For instance, you could say from:paypal.com to find all emails where the sender in PayPal. Use the logical boolean search operators to specify multiple search operators (e.g., from
OR subject
).

Also see: Gmail Search Tips and Tricks

| Search Criteria | Gmail Search Query | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | --------------------------------------- | ------------------------------- | | Emails that are either starred or unread | is

OR is
| | Emails with specific recipients in the To or Cc fields | to
OR cc
| | Emails received during a specific time period | after:2017/01/01 before:2017/06/15 | | Search for messages older or newer than a time period | older_than:7d (for 7 days) newer_than:2m (for 2 months) older_than: 2y (for 2 years) | | Search Gmail by size | larger:10M (for emails larger than 10 MB) smaller:1M (for emails small than 1 | MB) size:1000 (specify the size in bytes) | | Email messages that are in a particular email folder (or label). | in
label
label
in
(message anywhere in Gmail) | | Find emails that have no labels applied | has
has
| | Find emails that have particular words in the subject line | subject
subject:(invoice OR receipt) subject:“payment received” | | Find messages that contain particular words | dinner OR movie (either words) dinner AND movie (contain both words) (dinner movie) (contain both words) “dinner movie” (exact phrase) | | Find emails that have an attachments | has
filename
(search attachments by type) filename
.csv (search by file name) | | Search for messages delivered to a particular email address | deliveredto
@labnol.org | | Emails where my email is either in CC or BCC | cc
OR bcc
| | Emails that do not contain a specific word | -cats | | Find emails messages in trash or spam | label
OR label
| | Find emails anywhere but in spam or trash | in
| | Find emails that contain links to Google Drive or Google Slides or YouTube | has
OR has
OR has
|

Gmail Search - Things to Know

  1. Search for an exact phrase by enclosing the phrase inside double quotes. Capitalization is ignored.
  2. You can use logical operators like AND, NOT or OR to refine your search and they must always be typed in uppercase letters.
  3. Search for email messages by date using the before: and after: search operators. The date format is yyyy/mm/dd (e.g., 2017/07/15)
  4. You cannot use the bcc: operator to find emails in which you were blind carbon copied.
  5. If the label name in Gmail includes a space (e.g., Office Expenses), use a dash in the query when searching for emails inside that label (e.g. label
    )

Amit Agarwal is a web geek, solo entrepreneur and loves making things on the Internet. Google recently awarded him the Google Developer Expert and Google Cloud Champion title for his work on Google Workspace and Google Apps Script.

Awards & Recognition

Google Developer Expert

Google Developer Expert

Google awarded us the Developer Expert title recogizing our work in Workspace

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional title for 5 years in a row

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator award for technical expertise

Want to stay up to date?
Sign up for our email newsletter.

We will never send any spam emails. Promise 🫶🏻