← All posts

Gmail Search Operators: The Complete 2026 List (Including the Ones Google Hides)

A magnifying glass isolating three specific emails from a grid of hundreds, and a funnel narrowing many messages down to a few, showing how a Gmail search operator filters an inbox to the exact mail you want

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: and has: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.

OperatorWhat it doesExample
from:Mail sent from a specific personfrom:amy@example.com
to:Mail sent to a specific personto:john@example.com
cc: / bcc:Mail with specific people in Cc or Bcccc:john@example.com
subject:A word or phrase in the subject linesubject:dinner
label:Mail under one of your labelslabel:friends
category:Mail under an inbox categorycategory:promotions
has:Mail containing attachments, inline images, YouTube videos, Drive files, Docs, Sheets, or Slideshas:attachment
filename:Attachments by name or file typefilename:pdf
is:Mail by status: important, starred, unread, readis:unread
is:mutedConversations you mutedis:muted
in:anywhereEverywhere in Gmail, including Spam and Trashin:anywhere movie
in:archiveArchived messagesin:archive receipt
in:snoozedMail you snoozedin:snoozed
after: / before:Mail received in a date rangebefore:2026/04/18
older: / newer:Same idea, alternative syntaxnewer:2026/01/01
older_than: / newer_than:Relative age, using d, m, or yolder_than:1y
size: / larger: / smaller:Mail by sizelarger:10M
list:Mail from a mailing listlist:info@example.com
deliveredto:Mail delivered to a specific addressdeliveredto:you@example.com
has:userlabels / has:nouserlabelsMail with or without a labelhas:nouserlabels
has:yellow-star (and other colours)Mail under a star optionhas:red-star
rfc822msgidA specific message-id headerrfc822msgid:200503292@example.com
label:encryptedmailMail sent with client-side encryptionlabel:encryptedmail
-Exclude somethingdinner -movie
+Match a word exactly+unicorn
OR or { }Match one criterion or another{from:amy from:david}
ANDMatch all criteriafrom:amy AND to:david
AROUNDWords near each otherholiday AROUND 10 vacation
" "An exact phrase"dinner and movie"
( )Group terms togethersubject:(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 lists in:anywhere, in:archive and in:snoozed, but the in: 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 example in:sent after:2014/01/01 before:2014/02/01.
  • **in:all**: everything except Spam and Trash. This is where it differs from in:anywhere, which includes them.
  • **label:^unsub**: the interesting one. ^unsub is 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.