1. ideo slideshowUsing advanced search
Print
Watch a video on using advanced search.
Advanced search operators are query words or symbols that perform special actions in Gmail
search. These operators allow you to find what you're looking for quickly and accurately. They can
also be used to set up filters so you can organize your inbox automatically. Some of the most
useful operators are listed below.
You can also use advanced search operators by clicking on Show search options beneath the
Gmail search box.
Operator Definition Example(s)
Used to Example: from:amy
from: specify the Meaning: Messages from Amy
sender
Used to Example: to:david
to: specify a Meaning: All messages that were sent to David (by
recipient you or someone else)
Search for Example: subject:dinner
subject: words in the Meaning: Messages that have the word "dinner" in
subject line the subject
Search for Example: from:amy OR from:david
messages Meaning: Messages from Amy or from David
matching
OR term A or
term B*
*OR must be
in all caps
Used to Example: dinner -movie
exclude Meaning: Messages that contain the word "dinner"
-
messages but do not contain the word "movie"
(hyphen)
from your
search
Search for Example: from:amy label:friends
messages by Meaning: Messages from Amy that have the label
label* "friends"
*There isn't a
label:
search Example: from:david label:my-family
operator for Meaning: Messages from David that have the label
unlabeled "My Family"
messages
Search for Example: from:david has:attachment
messages Meaning: Messages from David that have an
has:attachment
with an attachment
attachment
list: Search for Example: list:info@example.com
messages on Meaning: Messages with the words
mailing lists info@example.com in the headers, sent to or from
2. this list
Example: filename:physicshomework.txt
Meaning: Messages with an attachment named
Search for an
"physicshomework.txt"
attachment
filename:
by name or
Example: label:work filename:pdf
type
Meaning: Messages labeled "work" that also have a
PDF file as an attachment
Used to Example: "i'm feeling lucky"
search for an Meaning: Messages containing the phrase "i'm
exact phrase* feeling lucky" or "I'm feeling lucky"
""
*Capitalizatio
(quotes)
n isn't taken Example: subject:"dinner and a movie"
into Meaning: Messages containing the phrase "dinner
consideration and a movie" in the subject
Example: from:amy(dinner OR movie)
Used to group
Meaning: Messages from Amy that contain either the
words
word "dinner" or the word "movie"
Used to
()
specify terms
Example: subject:(dinner movie)
that shouldn't
Meaning: Messages in which the subject contains
be excluded
both the word "dinner" and the word "movie"
Search for Example: in:anywhere movie
messages Meaning: Messages in All Mail, Spam, and Trash
anywhere in that contain the word "movie"
Gmail*
*Messages in
in:anywhere
Spam and
Trash are
excluded
from searches
by default
Search for Example: in:trash from:amy
in:inbox messages in Meaning: Messages from Amy that are in Trash
in:trash Inbox,
in:spam Trash, or
Spam
Search for Example: is:read is:starred from:David
messages Meaning: Messages from David that have been read
is:starred
that are and are marked with a star
is:unread
starred,
is:read
unread or
read
cc: Used to Example: cc:david
bcc: specify Meaning: Messages that were cc-ed to David
recipients in
the cc: or
bcc: fields*
*Search on
bcc: cannot
retrieve
messages on
which you
3. were blind
carbon copied
Search for Example: after:2004/04/16 before:2004/04/18
messages
sent during a Meaning: Messages sent between April 16, 2004 and
certain period April 18, 2004.*
after:
of time* *More precisely: Messages sent after 12:00 AM (or
before:
*Dates must 00:00) April 16, 2004 and before April 18, 2004.
be in
yyyy/mm/dd
format.
Search for Example: is:chat monkey
is:chat chat Meaning: Any chat message including the word
messages "monkey".
Search for Example: deliveredto:username@gmail.com
messages Meaning: Any message with username@gmail.com
within a in the Delivered-To: field of the message header
particular (which can help you find messages forwarded from
email address another account or ones sent to an alias).
deliveredto:
in the
Delivered-To
line of the
message
header