Google Mail (Gmail) Query String Parameters

Gmail Query String Parameters

To pass these Gmail query string parameters on to Google Mail, simply paste the query into Gmail’s search box.



from: Used to specify the sender.
to: Used to specify a recipient.
subject: Search for words in the subject line
OR Search for messages matching term A or term B (OR must be in all caps).
The hyphen (the “minus” sign) is used to exclude messages from your search
label: Search for messages by label (There isn’t a search operator for unlabeled messages)
has:attachment Search for messages with an attachment.
list: Search for messages on mailing lists.
filename: Search for an attachment by name or type.
” “ Used to search for an exact phrase (Capitalization isn’t taken into consideration)
( ) Used to group words or used to specify terms that shouldn’t be excluded
in:anywhere Search for messages anywhere in Gmail (Messages in Spam and Trash are excluded from searches by default)
in:inboxin:trashin:spam Search for messages in Inbox, Trash, or Spam.
is:starredis:unreadis:read Search for messages that are starred, unread or read.
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)
after:before: Search for messages sent during a certain period of time (Dates must be in yyyy/mm/dd format.)
is:chat Search for chat message.
deliveredto: Search for messages within a particular email address in the Delivered-To line of the message header.

Check out Google’s Advanced Gmail Search page for examples of how to use Google Gmail search.