Email search operators

The Spark Team
Created:

Definition

💡Search operators are short commands, usually a word followed by a colon, that you type into your email search bar to filter results instead of scrolling. Type from:sarah has:attachment and you skip straight to the file she sent you in March..

Why scrolling through your inbox is inefficient

You've got 30-plus emails landing every day across two or three accounts. Somewhere in there is the contract from six weeks ago, but you can't remember who sent it or what the subject line said. Sound familiar?

A plain keyword search only gets you so far. Type "contract" and you'll get every email in your inbox that mentions the word, including the ones where a colleague just asked, "Did you sign the contract yet?" Search operators let you narrow that down by sender, date, attachment type, and read status all at once. That's the difference between skimming 40 results and opening the right one first.

This matters more the more accounts you juggle. Multiple accounts means the same search has to work across inboxes that don't share history, and operators are what make that searchable rather than a memory exercise.

Gmail alone processes billions of searches a day, and its own search help documentation lists more than 30 operators you can combine. 

Learning five or six of them covers almost everything you'll ever need. Nobody memorizes all thirty. 

Two approaches to filtering your inbox

You've got two real approaches here, and they work pretty differently.

Syntax-based search is what Gmail and Outlook use. You type an exact keyword, a colon, and a value: from:john, subject:invoice, has:attachment. Get the syntax wrong (a stray space after the colon, for instance) and the search quietly fails or falls back to a keyword match. It's precise, but it's picky.

Natural language search skips the syntax entirely. Spark's Smart Search lets you type "PDF from Ann last month," and it parses that into the operators that actually work in Spark, without you needing to remember whether it's has:attachment or hasattachment:yes. Spark's search operators aren't the same as Gmail's, either. For example, has:attachment works, hasattachment:yes doesn't. Every platform's syntax differs a little from the next. You just type like you'd ask a person, and it works, though on desktop, full natural language parsing currently lives in Spark's AI assistant rather than Smart Search itself.

That second approach matters if you're not a power user. Syntax search rewards people who use it daily enough to remember the commands. Natural language search skips that learning curve.

Operators by email client

Here's where the syntax actually differs, and it differs more than you'd think.

Gmail uses operators like from:, to:, subject:, has:attachment, older_than:2y, and larger:10M. Capitalized Boolean words (AND, OR, NOT) combine them, and a hyphen before an operator excludes it, like -from:newsletter@.

Outlook uses what Microsoft calls Advanced Query Search (AQS): from:, subject:, hasattachments:yes. Outlook also does prefix matching, so partial words often work. And numbers under five digits get ignored in search, which trips people up more than it should.

Spark skips memorized syntax in favor of plain English, though it still recognizes shorthand like from: and has: if you prefer typing that way. Operators are still the more precise option, though — skip them entirely and natural language search can occasionally pull in irrelevant results.

The 10 Gmail search operators worth memorizing

Gmail's own documentation lists more than 30 operators, but most people only lean on a handful. Here's the actual shortlist: 

  1. from: finds messages from a specific sender, like from:sarah.
  2. to: finds messages sent to a specific address, handy for checking what you sent someone.
  3. subject: searches subject lines only, so subject:invoice skips anything that just mentions invoices in passing.
  4. has:attachment filters to messages carrying a file.
  5. filename: narrows further by file name or type, like filename:pdf.
  6. is:unread surfaces what you haven't opened yet.
  7. is:starred pulls up anything you've flagged as important.
  8. label: searches inside a specific label, including label:sent.
  9. older_than: and newer_than: filter by date range using shorthand like 2y, 6m, or 3d.
  10. larger: and smaller: filter by message size, useful for tracking down whatever's eating your storage.

A few more show up almost as often, even if they don't crack most top-ten lists. in:anywhere searches Trash and Spam too, which a normal search skips. cc: and bcc: catch messages where you were copied rather than addressed directly. And is:important pulls up whatever Gmail's own priority signal has flagged for you.

Combine any of these with AND, OR, or a minus sign to exclude, and you've covered the vast majority of what people actually reach for day to day. Memorize five of these and you'll rarely need to look anything up again.

How to search with operators

In Gmail: 

  1. Go to Gmail and click the search box at the top
  2. Type an operator, like has:attachment from:Ann
  3. Press Enter
  4. Click Create filter under the search bar to save that search as an automatic rule

In Outlook:

  1. Click the search box at the top of the Outlook window
  2. Type an AQS keyword and value, like subject:invoice AND from:vendor
  3. Press Enter
  4. Use the Filters option beside the search box to add sender, folder, or attachment filters without typing syntax

In Spark:

  1. Click the search icon at the top right, or press Cmd+F (Mac) or Ctrl+F (Windows)
  2. Type your query using shorthand like from: and has: for example, "from:vendor has:attachment"  and press Enter
  3. Smart Search recognizes that shorthand, but it doesn't fully understand natural language the way Spark's AI Assistant does. If you want to type a plain-language query like "invoice from vendor last month," the AI Assistant is the more reliable option; for Smart Search itself, sticking with operators gets you more accurate results
  4. If you're juggling multiple accounts, use the arrow buttons next to the search field to narrow the search to one account. By default, Spark searches across all of them though scope depends on account type: for Google accounts, it searches every folder except Trash and Spam; for non-Google accounts, it searches only the Inbox and Archive

Note: One limitation worth knowing: Spark doesn't support Gmail-style exclusion syntax (like -word to filter a term out of your results), so there's no direct equivalent if that's part of your workflow.

Getting more out of every search

Combine operators instead of running separate searches. from:sarah has:attachment older_than:1m beats three chained searches every time. It's faster, full stop. And when you need precision on wording, quotes matter more than people realize: budget review without quotes finds both words anywhere in the email, while "budget review" finds that exact phrase only. Small difference, big accuracy gain.

Once you've got a search that actually works, save it. Gmail lets you save a search for one-click reuse. In Spark on desktop, the equivalent is creating a Smart Folder — so you're not retyping the same query every Monday morning. And resist the "just type plain English" instinct when you're setting one of these up in Spark: that reliably works in the AI Assistant, but regular Smart Search may return nothing useful, or a pile of irrelevant results, if you skip operators. For a search you're going to reuse every week, operators are the safer bet.

One more habit worth building: exclude the noise rather than scroll past it. A minus sign before an operator, like -from:newsletter@, removes a whole category from your results in one shot. Handy the moment your search keeps surfacing marketing mail you don't actually care about.

Related terms

The Spark Team
Spark

Smart. Focused. Email.

Fast, cross-platform email designed to filter out the noise - so you can focus on what's important.