Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Gmail allows me to search using the operator as

has:attachment *.txt

How do I further filter this to search for a specific word in a file?

E.g. to search for a PDF that contains the word ATLANTICO, I've tried this without success:

has: attachment *.pdf ATLANTICO
share|improve this question
up vote 4 down vote accepted

I'm afraid you can't. Looking at Gmail help, there's nothing related to searching within attachments.

You can specify a file name, but that's it:


Or you could save files you want to search through to Google Docs.

The simple explanation why it's not possible is that it would require a tremendous amount of indexing to be done. Gmail search isn't that fast to begin with, and I can imagine it'd take far too long to search within attachments.

Also note that this is a feature that even most desktop clients don't do.

That being said, there seems to be a startup that focuses on what you want: attachments.me

Attachments.me indexes your email account and presents an attachments-centric view of it. We create thumbnails, let you search within attachments, and, above all, make your email better

share|improve this answer
I'm confused; running a google web search usually brings up such PDF as include keywords for the search as well. – Everyone Jul 30 '11 at 17:21
Google Web search is not the same as the search used in Google Mail. If you search in GMail, you will notice that it's much slower, the reason (probably) being that GMail search is a far less commonly used feature than Google Web search and therefore not as optimized. We've had a question about the difference between the two on Stack Exchange a while ago, can't seem to find it though. – slhck Jul 30 '11 at 18:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.