A Gmail search operator is a small piece of syntax you type into the search bar to narrow what comes back. from:amy returns mail from Amy. older_than:1y returns mail older than a year. Combine them and you can isolate exactly the mail you want to read, archive, or get rid of.
Short answer. Google documents around 30 operators on its Gmail help page. A handful more work without being documented anywhere, including
label:^unsub, which finds every bulk email in your inbox. And two of the most searched operators,body:andhas:unsubscribe, do not exist.
The operators Google documents
This table is Google’s own reference, from Refine searches in Gmail. If an operator is here, it is supported.
| Operator | What it does | Example |
|---|---|---|
from: | Mail sent from a specific person | from:amy@example.com |
to: | Mail sent to a specific person | to:john@example.com |
cc: / bcc: | Mail with specific people in Cc or Bcc | cc:john@example.com |
subject: | A word or phrase in the subject line | subject:dinner |
label: | Mail under one of your labels | label:friends |
category: | Mail under an inbox category | category:promotions |
has: | Mail containing attachments, inline images, YouTube videos, Drive files, Docs, Sheets, or Slides | has:attachment |
filename: | Attachments by name or file type | filename:pdf |
is: | Mail by status: important, starred, unread, read | is:unread |
is:muted | Conversations you muted | is:muted |
in:anywhere | Everywhere in Gmail, including Spam and Trash | in:anywhere movie |
in:archive | Archived messages | in:archive receipt |
in:snoozed | Mail you snoozed | in:snoozed |
after: / before: | Mail received in a date range | before:2026/04/18 |
older: / newer: | Same idea, alternative syntax | newer:2026/01/01 |
older_than: / newer_than: | Relative age, using d, m, or y | older_than:1y |
size: / larger: / smaller: | Mail by size | larger:10M |
list: | Mail from a mailing list | list:info@example.com |
deliveredto: | Mail delivered to a specific address | deliveredto:you@example.com |
has:userlabels / has:nouserlabels | Mail with or without a label | has:nouserlabels |
has:yellow-star (and other colours) | Mail under a star option | has:red-star |
rfc822msgid | A specific message-id header | rfc822msgid:200503292@example.com |
label:encryptedmail | Mail sent with client-side encryption | label:encryptedmail |
- | Exclude something | dinner -movie |
+ | Match a word exactly | +unicorn |
OR or { } | Match one criterion or another | {from:amy from:david} |
AND | Match all criteria | from:amy AND to:david |
AROUND | Words near each other | holiday AROUND 10 vacation |
" " | An exact phrase | "dinner and movie" |
( ) | Group terms together | subject:(dinner movie) |
The operators Google does not document
These work in Gmail. They are simply not in Google’s table, which is why searching for them returns so much noise and so few straight answers.
**in:inbox**: restricts a search to the inbox, leaving out archived mail. Google’s table only listsin:anywhere,in:archiveandin:snoozed, but thein:operator accepts other locations.**in:spam**: searches your spam folder. Useful when a real message got filtered and you need to find it. Gmail’s own advanced search panel generates this when you set “Search in” to Spam & Trash.**in:trash**: searches the bin.**in:sent**: searches sent mail. Google uses this one itself, in the Gmail API filtering docs, in the examplein:sent after:2014/01/01 before:2014/02/01.**in:all**: everything except Spam and Trash. This is where it differs fromin:anywhere, which includes them.**label:^unsub**: the interesting one.^unsubis a Gmail system label applied automatically to mail Gmail considers bulk: newsletters, promotions, mass mailings. It is not in any Google reference. Amit Agarwal documented it in July 2025 and describes it, in his words, as “an undocumented Gmail search operator”.
label:^unsub is the closest thing Gmail has to a “show me everything I subscribed to” button. Run it once and the size of the list is usually a surprise.
Two operators that do not exist
Between them, these two account for a large share of what people search for. Both are dead ends, and almost nobody says so.
**body:** is not a Gmail operator. There is no way to restrict a search to the message body. You do not need one: a bare keyword with no operator already searches the body, the subject, and the text of attachments. So invoice finds “invoice” wherever it appears. If you want the subject only, that is subject:invoice. If you want an exact phrase in the body, use quotes: "your invoice is ready".
**has:unsubscribe** is not a Gmail operator either. The idea is sound and the syntax is not. Two things work instead:
label:^unsub, the undocumented system label above. This is the accurate one, because Gmail has already classified the mail as bulk.unsubscribe, as a plain keyword. Cruder, since it matches any message with the word anywhere in it, but it needs nothing special.
Using operators to actually clear your inbox
Operators find mail. They do not deal with it. These are the ones worth keeping:
label:^unsub: everything Gmail thinks is bulk.category:promotions older_than:6m: promotional mail you have ignored for half a year.from:sender@example.com older_than:1y: one sender’s back catalogue.larger:10M older_than:1y: the mail eating your storage.is:unread category:promotions: promotions you never opened, which is a good proxy for what to unsubscribe from.
The catch with all of them is that finding a hundred newsletters does not stop the hundred-and-first from arriving. Deleting is not unsubscribing. If a search returns a wall of mail you never asked for, the operator has done its job and the real fix is upstream: unsubscribe from the senders rather than clear the results.
That is what we built Leave Me Alone for. It scans for subscription mail, shows you the list, and unsubscribes for real, in one click, without selling what it finds. If you want the manual route first, our guide on Gmail inbox cleanup covers the system that makes it stick.
Frequently asked questions
Do Gmail search operators work on mobile?
Yes. The syntax is the same in the Gmail app on Android and iOS as it is on the web. The advanced search panel is easier to reach on desktop, but typing the operator works everywhere.
Is body: really not supported?
It is not. Gmail has no operator that restricts a search to the message body, because a plain keyword already searches the body along with the subject and attachment text.
What is the difference between in:all and in:anywhere?
in:anywhere includes Spam and Trash. in:all does not. If a message has been filtered as spam, in:anywhere is the one that finds it.
Can I use operators in Gmail filters?
Yes. The same syntax works in the “Has the words” field when you create a filter, which is how you turn a one-off search into a standing rule.
Does Gmail’s AI search replace operators?
No. Gmail’s newer AI-assisted search is good at loose questions. Operators are deterministic: they return exactly what you asked for, which matters when you are about to bulk-archive a few thousand messages. We compared the two in our piece on Gmail’s AI search.
Bottom line
Google’s table covers around 30 operators and it is accurate. The gaps are what trip people up: in:inbox, in:spam and in:sent work without being listed, label:^unsub is the most useful operator Google never mentions, and body: and has:unsubscribe do not exist no matter how many blog posts say they do.
Learn five of them and Gmail search stops being a guess. Learn label:^unsub and you will finally see how much of your inbox you never asked for.