العربية
Back

Mobile apps

Search in Gmail: operators and advanced filtering · Lekando

Google's Gmail Help page explains how to use words and symbols called search operators to filter results, with a table of operators and examples, and how to combine them to narrow results further.

Last reviewed:

This content is for information only; we are not affiliated with Gmail Help or any official body. Menu names and feature availability may change; check the official source before making any decision.

Confirmed

Key facts

Google's Gmail Help page explains how to use words and symbols called search operators to filter results, with a table of operators and examples, and how to combine them to narrow results further.

  • Usage: on your computer open Gmail, click the search box at the top, and enter a search operator; operators can be combined for finer filtering.
  • Common operators: from: for emails from a specific person, to: for recipients, subject: for a word in the subject, label: for a label, and has:attachment for emails with attachments.
  • For dates: after: and before: in a format like after:2004/04/16, and older_than:/newer_than: with d for day, m for month, y for year, such as newer_than:2d.
  • For logic: OR or braces {} for any of the criteria, AND for all of them, the minus sign - to exclude, and double quotes for an exact phrase.
  • Status and location operators: is:unread and is:starred, in:anywhere to search all of Gmail including Spam and Trash, and in:archive for archived messages.
  • For attachments and size: filename:pdf for an attachment type, and size: or larger:/smaller: for size, such as larger:10M.
  • The page cautions about exclusion operators: conversations can still appear if at least one message in them doesn't match the excluded criteria; for example -is:starred can return a conversation containing one unstarred message even if other messages in it are starred.
  • After searching, you can use the results to set up a filter for those messages, according to the page.

Sources

Wording is ours, from the official source. Images and video belong to their owners and are credited with a link to the official page.

Frequently asked questions

How do I search Gmail precisely?

Use search operators in the search box, such as from: for the sender, subject: for the subject, and has:attachment for attachments; you can combine them to narrow results.

How do I find emails from a certain period?

Use after: and before: in a format like after:2004/04/16, or older_than:/newer_than: with d, m, and y units, such as newer_than:2d.

How do I exclude results?

Put a minus sign - before the word or operator. The page cautions that conversations may still appear if at least one message in them doesn't match the exclusion.

How do I find emails with large attachments?

Use has:attachment for attachments, larger: or smaller: for size (for example larger:10M), and filename:pdf for a specific attachment type.

Can I turn a search result into a filter?

Yes. The page says that after searching you can use the results to set up a filter for those messages.