| Search Operators |
| Operator | Definition | Example |
| from: | Used to specify the sender. | Example: from:amy Meaning: Messages from Amy. |
| to: | Used to specify a recipient. | Example: to:david Meaning: All messages that were sent to David (by you or someone else). |
| subject: | Search for words in the subject line. | Example: subject:dinner Meaning: Messages that have the word “dinner” in the subject. |
| OR | Search for messages matching term A or term B.OR must be in all caps. | Example: from:amy OR from:davidMeaning: Messages from Amy or from |
| - (hyphen) | Used to exclude messages | Example: dinner-movie Meaning: Messages that contain the word “dinner” but do not contain the word “movie”. |
| label: | Search for messages by label. There isn’t a search operator for unlabeled messages. | Example: from:amy label:friendsMeaning: Messages from Amy that have the label “friends”.Example: from:david label:my-familyMeaning: Messages from David that havethe label My Family. |
| has:attachment | Search for messages with an attachment. | Example: from:david has:attachmentMeaning: Messages from David that have an attachment. |
| filename: | Search for an attachment by name or type. | Example: filename:physicshomework.txt Meaning: Messages with an attachment named physicshomework.txt. Example: label:work filename:pdf Meaning: Messages labeled work that also have a PDF file as an attachment. |
| “ “(quotes) | Used to search for an exact phrase. Capitalization isn’t taken into consideration. | Example: “i’m feeling lucky” Meaning: Messages containing the phrase “i’m feeling lucky” or “I’m feeling lucky”.Example: subject:”dinner and a movie”Meaning: Messages containing the phrase “dinner and a movie” in th
1 subject. |
| ( ) | Used to group words. Used to specify terms that shouldn’t be excluded. | Example: from:amy(dinner OR movie) Meaning: Messages from Amy that contain either the word “dinner” or the word “movie”. Example: subject:(dinner movie) Meaning: Messages in which the subject contains both the word “dinner” and the word “movie”. |
| in:anywhere | Search for messages anywhere in your account. Messages in Spam and Trash are excluded from searchesby default. | Example: in:anywhere subject:movie Meaning: Messages in All Mail, Spam, and Trash that contain the word “movie”. |
in:inbox in:trash in:spam | Search for messages in Inbox, Trash, or Spam. | Example: in:trash from:amy Meaning: Messages from Amy that are in the trash. |
is:starred is:unread is:read | Search for messages that are starred, unread, or read. | Example: is:read is:starred from:David Meaning: Messages from David that have been read and are marked with a star. |
cc: bcc: | Used to specify recipients in the cc: or bcc: fields.Search on bcc: cannot retrieve messages on which you were blind carbon copied. | Example: cc:david Meaning: Messages that were cc-ed to David. |
after: before: | Search for messages after or before a certain date. Date must be in yyyy/mm/dd format. | Example: after:2005/04/17 before:2005/04/18 Meaning: Messages sent on April 17, 2005. More precisely: Messages sent on or after April 17, 2005, but before April 18, 2005. |
| | | |
These operatorsare all self-explanatory and can be combined. For example, consider the following search parameters: in:inbox from:BenHammersley “fancy a pint?” This search would result in any message from my Gmail account, in your Inbox, suggesting a visit to the pub. In order to bring any unread mail sent before New Year’s Eve 2005, with an attachment, and the subject line New Year’s Eve Invitation, you would conduct the following search: is:unread before:2005/12/31has:attachment subject:”New Years Eve Invitation”
Very simple indeed. |