Roost Download free
All tools

Free email toolsSearch

Gmail search operators

Build a search, or look an operator up. Every one in the list below comes from Google’s own help page, read on 19 November 2026.

By Telman, who makes Roost · Runs in your browser · nothing is uploaded

Gmail’s search operators are short words you type into the search box to narrow a search: from:amy is:unread finds unread mail from Amy. The builder below writes a search for you. Under it are all 30 operators Google lists, with Google’s examples and whether each one also works in Roost’s ⌘K search.

Your Gmail search

The same in Roost’s ⌘K, where it can

Every Gmail search operator

This is Google’s list from its Gmail Help page “Refine searches in Gmail,” in Google’s order, read on 19 November 2026. The examples are Google’s. The last column is from Roost’s own search code, which I wrote, so you know which searches carry over.

30 operators
OperatorWhat it findsGoogle’s examplesIn Roost’s ⌘K
from:Mail sent from a personfrom:me from:[email protected]Yes, a name or address. “me” is read as a name.
to:Mail sent to a personto:me to:[email protected]Yes, addresses on the To line
cc: bcc:Mail with a person in the Cc or Bcc fieldcc:[email protected] bcc:[email protected]No
subject:A word or phrase in the subject linesubject:dinner subject:anniversary partyNo. Plain words already search subjects.
after: before: older: newer:Mail received during a time periodafter:2004/04/16 after:04/16/2004 before:2004/04/18 before:04/18/2004after: and before:, written 2004/04/16, 2004-04-16 or 16.04.2004. Not 04/16/2004, and no older: or newer:
older_than: newer_than:Older or newer than a time period, in d (day), m (month) or y (year)older_than:1y newer_than:2dYes, and w for weeks
OR { }Mail that matches one or more of the termsfrom:amy OR from:david {from:amy from:david}No
ANDMail that matches all of the termsfrom:amy AND to:davidNot needed: every word has to match. A typed AND is searched as the word “and.”
-Leaves out mail that matchesdinner -movieNo
AROUNDWords near each other; the number is how many words apartholiday AROUND 10 vacation "secret AROUND 25 birthday"No
label:Mail under one of your labelslabel:friends label:importantNo. Open the folder from the sidebar.
category:Mail in one of the inbox categories, if you use themcategory:primary category:social category:promotions category:updates category:forums category:reservations category:purchasesNo
has:Mail with attachments, inline images, YouTube videos, Drive files, Google Docs, Sheets or Slideshas:attachment has:youtube has:drive has:document has:spreadsheet has:presentationhas:attachment only
list:Mail from a mailing listlist:[email protected]No
filename:Attachments with a certain name or file typefilename:pdf filename:homework.txtNo
" "An exact word or phrase"dinner and movie tonight"Yes
( )Groups several terms togethersubject:(dinner movie)No
in:anywhereMail anywhere in Gmail, Spam and Trash includedin:anywhere movieNo. Roost searches every folder but Spam anyway; in:spam searches Spam.
in:archiveArchived mailin:archive payment reminderYes
in:snoozedMail you snoozedin:snoozed birthday reminderNo. Reply later has its own place in the sidebar.
is:mutedMail you mutedis:muted subject:team celebrationNo
is:Mail by status: important, starred, unread or readis:important is:starred is:unread is:readis:unread, is:read, is:starred (Roost’s Flagged). Not is:important.
has:yellow-star and the other star optionsMail under a star option, if you set several uphas:yellow-star OR has:purple-questionNo
deliveredto:Mail delivered to a specific addressdeliveredto:[email protected]No
size: larger: smaller:Mail by its sizesize:1000000 larger:10MNo
+A word matched exactly+unicornNo. Every Roost word matches as a start: “invoic” finds invoices.
rfc822msgidMail with a specific Message-ID headerrfc822msgid:[email protected]No
has:userlabels has:nouserlabelsMail that has, or doesn’t have, a labelhas:userlabels has:nouserlabelsNo
label:encryptedmailMail sent with client-side encryptionlabel:encryptedmailNo
header:Mail with a specific custom header or header valueheader:X-Google-Calendar-Notification:rsvpWithNoteNo

Combining operators: OR, minus, brackets and quotes

Put operators side by side with spaces and Gmail looks for mail that matches all of them. from:amy is:unread newer_than:2d is unread mail from Amy in the past two days. Writing AND between them does the same thing.

Write OR in capitals, as Google does. Curly brackets mean the same: from:amy OR from:david and {from:amy from:david} both find mail from either. A minus sign leaves things out, as in dinner -movie. Google’s list has no NOT; the minus is how you exclude.

Round brackets group terms under one operator, so subject:(dinner movie) looks for both words in the subject. Quotes keep an exact phrase together: "dinner and movie tonight". And AROUND finds words close to each other, with the number saying how far apart they may be.

Two of Google’s tips are easy to miss. A minus can still show a conversation you meant to leave out, because Gmail matches single messages first: -is:starred finds a conversation if one message in it isn’t starred. And in numbers, a space or a dash separates two numbers while a dot is a decimal point, so Gmail reads 01.2047-100 as 01.2047 and 100. Google lists no wildcard operator.

Searching by date

Google gives two ways to write a date: after:2004/04/16 (year first) and after:04/16/2004 (month first). before: works the same way, so all of October is after:2026/10/01 before:2026/11/01. Google’s page doesn’t say which time zone the dates use.

For a moving window, newer_than: and older_than: take a number and d, m or y: newer_than:7d is the past week, older_than:1y is everything over a year old. They’re handy for clean-ups, as in older_than:1y -is:starred.

Searches people actually type

You wantGmailRoost’s ⌘K
Unread mail from your boss in the past weekfrom:[email protected] is:unread newer_than:7dThe same
Big attachments, to free up spacehas:attachment larger:10MNot possible
PDFs since New Yearfilename:pdf after:2026/01/01Not possible
Mail from either of two peoplefrom:amy OR from:davidOne search each
A phrase, but not in the newsletter"quarterly report" -newsletter"quarterly report"
Old mail you never starredolder_than:1y -is:starredNot possible
An invoice, wherever it wentin:anywhere invoiceinvoice (every folder but Spam)
October’s unread mailis:unread after:2026/10/01 before:2026/11/01The same

Search every inbox at once in Roost

Gmail’s operators only search Gmail. I make Roost, a Mac mail app that keeps Gmail, Outlook, iCloud, Yahoo, Fastmail and other inboxes in one window, and its search (⌘K) reads the Gmail words the table above marks as working, across all of them at once. Under the field it says what it understood, like “from anna · unread,” and a date it can’t read gets a message instead of a guess.

A few things differ from Gmail. Roost also reads in:inbox, in:sent, in:trash and in:spam, and is:flagged as well as is:starred. Spam is left out unless you ask with in:spam. Every word matches the start of a word, so “invoic” finds invoices. A word with a colon it doesn’t know, like label:x, is searched as plain words. It has no OR and no minus.

Roost searches the mail on your Mac first, which is the last 90 days plus older unread and flagged mail in the Inbox. For anything older, the last row of results, Search older mail on the servers, asks every inbox’s server at once. More on the search page.

Questions

Does Gmail have a NOT operator?

Not by that name. Google’s list uses the minus sign: dinner -movie finds mail about dinner that doesn’t mention a movie. It also works on other operators, as in -is:starred.

How do I use OR in Gmail search?

Type OR in capitals between two terms, like from:amy OR from:david, or put the terms in curly brackets: {from:amy from:david}. Both find mail that matches either.

How do I find only unread email in Gmail?

Search for is:unread. Add more to narrow it: is:unread from:amy, or is:unread newer_than:7d for the past week.

How do I search Gmail by date?

Use after: and before: with a date written 2026/10/01 or 10/01/2026, or newer_than: and older_than: with d, m or y, like newer_than:3d.

How do I search Gmail by size?

Use larger: or smaller:, or size: with a number of bytes. Google’s examples are larger:10M and size:1000000.

Is there a wildcard in Gmail search?

Google’s list of operators doesn’t include one. Roost’s search treats every word as the start of a word instead, so a part of a word is enough there.

Can I save a Gmail search?

Google’s tip is to turn it into a filter: after you search, you can use the results to set up a filter for those messages.

Sources

  1. Google, Gmail Help, “Refine searches in Gmail,” support.google.com/mail/answer/7190, read 19 November 2026.
  2. Roost 1.2 release notes, “Search words,” roostmail.app/changelog, read 19 November 2026. The Roost column was checked against Roost’s search code as of version 1.4.2.