Gmail advanced search fields

Gmail advanced search fields: sender, recipient, subject, date, and unread.

Use Gmail advanced search fields to find known messages by sender, recipient, subject, date range, attachment, category, label, or unread state. Then turn stable searches into filters, or use KeepKnown when the recurring rule is sender not in contacts.

from:to:subject:after: and before:has:attachmentis:unread
KeepKnown separating searched Gmail messages from outsider inbox noise

Gmail advanced search fields and the operators behind them

Gmail advanced search is the visual form of Gmail search operators. The fields help you build queries for the sender, recipient, subject, words, missing words, date range, size, attachments, categories, labels, and read state.

Field-to-operator examples

  • Sender: use from:amy@example.com or from:example.com.
  • Recipient: use to:you@example.com, cc:name@example.com, or bcc:name@example.com.
  • Subject: use subject:"invoice" or combine subject words with a sender.
  • Date: use after:2026/01/01 before:2026/02/01, newer_than:30d, or older_than:1y.
  • Unread: use is:unread, or in:anywhere is:unread when unread messages may be archived, labeled, Spam, or Trash.
  • Attachment: use has:attachment or filename:pdf.
  • Category and label: use category:primary, category:promotions, or label:project-name.

When advanced search should become a filter

If the sender, subject, phrase, label, or category pattern is stable, use the search to create a Gmail filter for future mail. If the pattern is open-ended, such as every sender who is not in contacts, Gmail advanced search cannot express that rule cleanly. KeepKnown checks sender relationship automatically and moves unknown senders to KK:OUTSIDERS without deleting the message.

Source: Google Gmail search operators help and Google Gmail filters help.

Short answer

Gmail advanced search fields are a visual builder for search operators.

Use advanced search when you know the sender, recipient, subject, words, date, attachment, label, category, or unread state. Use filters or KeepKnown when the same rule needs to run automatically.

Most useful advanced search fields

Sender and recipient

Use from:, to:, cc:, and bcc: to isolate who sent or received a message.

Subject and words

Use subject:, exact phrases, and excluded words to narrow known topics without reviewing the whole mailbox.

Date window

Use after:, before:, newer_than:, and older_than: to audit a specific time range.

Unread and hidden mail

Use is:unread, in:inbox, or in:anywhere depending on whether archived, Spam, or Trash messages should be included.

Attachments

Use has:attachment and filename: when the missing message is tied to a PDF, spreadsheet, or document.

Unknown senders

Use KeepKnown when the rule is sender not in contacts, because Gmail advanced search is a lookup tool, not a contact allow-list.

Automation boundary

Advanced search finds known patterns. KeepKnown handles unknown senders.

A Gmail search can become a filter when you know the matching pattern. KeepKnown is for the stricter inbox rule: contacts stay visible, unknown senders move aside.

Questions before you connect.

What are Gmail advanced search fields?

They are the fields in Gmail's search-options window that map to operators such as from:, to:, subject:, after:, before:, has:attachment, category:, label:, and is:unread.

How do I search Gmail by sender?

Use from: followed by a name, address, or domain. For example, from:amy@example.com limits results to messages sent by that address.

How do I search Gmail by recipient and date?

Use to: for the recipient and combine it with after: and before: for the date range, such as after:2026/01/01 before:2026/02/01.

Is there an unread field in Gmail advanced search?

Use is:unread to find unread mail. Combine it with in:anywhere when unread messages may be archived, labeled, Spam, or Trash.

Can Gmail advanced search create a filter?

Yes. After searching, Gmail can create a filter for matching messages. That works for known sender or keyword patterns, but not for a native not-in-contacts rule.

When should I use KeepKnown instead of Gmail advanced search?

Use KeepKnown when the recurring problem is outsider noise. KeepKnown checks whether the sender is in contacts and routes unknown senders away from the inbox without deleting them.

Related inbox workflows

Gmail advanced search

Find known patterns, then stop unknown senders automatically.