Advanced Search Operators to Find Emails in Gmail

A
Published in: GA07 - Gmail - Search Tricks

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

The query syntax is operator:search_keyword. 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:paypal OR subject:invoice).

Also see: Gmail Search Tips and Tricks

Search CriteriaGmail Search Query
Emails that are either starred or unreadis:unread OR is:starred
Emails with specific recipients in the To or Cc fieldsto:amit OR cc:aryaman
Emails received during a specific time periodafter:2017/01/01 before:2017/06/15
Search for messages older or newer than a time periodolder_than:7d (for 7 days) newer_than:2m (for 2 months) older_than: 2y (for 2 years)
Search Gmail by sizelarger:10M (for emails larger than 10 MB) smaller:1M (for emails small than 1
Email messages that are in a particular email folder (or label).in:label_name label:label_name label:personal-emails in:anywhere (message anywhere in Gmail)
Find emails that have particular words in the subject linesubject:invoice subject:(invoice OR receipt) subject:“payment received”
Find messages that contain particular wordsdinner OR movie (either words) dinner AND movie (contain both words) (dinner movie) (contain both words) “dinner movie” (exact phrase)
Find emails that have an attachmentshas:attachments filename:pdf (search attachments by type) filename:emails.csv (search by file name)
Search for messages delivered to a particular email addressdeliveredto:amit@labnol.org
Emails where my email is either in CC or BCCcc:me OR bcc:me
Emails that do not contain a specific word-cats
Find emails messages in trash or spamlabel:spam OR label:trash
Find emails anywhere but in spam or trashin:anywhere
Find emails that contain links to Google Drive or Google Slides or YouTubehas:youtube OR has:drive OR has:presentation

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:office-expenses)
📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: GA07 - Gmail - Search Tricks

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
A
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account
G

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube