Google Advanced Search Operators

(August 23, 2019)

Daniel M. Russell

Here, in one place, are all of the currently documented advanced search operators. Note that some operators come in two versions of the same operator:  (e.g., allinanchor along with inanchor: ). I’ve written about them together rather than having two entries for the same kind of operator. (But, in truth, I almost never use the “allin…” form.)

Note: In this document, I follow the square brackets convention, here a query is surrounded by square brackets. So, when doing the query, you wouldn’t actually use the square brackets in your query. (Although it won’t hurt anything either...) Example: [ codfish site:nytimes.com ]


allinanchor: / inanchor:

-- Google restricts results to pages containing all query terms in the anchor text on links to the page. For instance: [ allinanchor: best restaurant Sunnyvale ] will return only pages in which the anchor text on links to the pages contain the words “best” “restaurant” and “Sunnyvale” – that is, all of the words following the allinanchor operator. So, when using allinanchor: in your query, do not include any other search operators. By contrast, using the operator inanchor: only searches for the term that’s next. (This is true for all of the “all…” operators.) Example: [ inanchor:sales offer 2011 ] will search only for “sales” in the anchor text.

Definition: Anchor text is the text you see on a page that is linked to another web page

or a different place on the current page. For instance, this sample link has “sample link” as its anchor text. When you click on anchor text, you will be taken to the page or place on the page to which it is linked.

Example: [ allinachor: best restaurant La Jolla ocean view ] - search for those terms in the anchor

allintext: / intext:

-- restricts results to those containing all the query terms you specify in the text of the page. For example, [ allintext: camping tent stove] will return only pages in which the words “camping” “tent” and “stove” appear in the text of the page. Using the operator “intext: will search only for the next term in the text of the page. . (Note: using intext: in front of every word in your query is the same as using allintext: at the front of your query, e.g., [ intext:Victorian intext:artists ] is the same as [ allintext: Victorian artists ].)

Example: [ allintext:mesothelioma asbestos symptoms ] - search for all those terms on the page

allintitle: / intitle:

-- results to those containing all the query terms you specify in the title. For example, [ allintitle: university relations ] will return only documents that contain the words “university” and “relations” in the title of the page. Using the operator intitle: will search only for the next term in the title of the page. For instance, [ flu shot intitle:help ] will return documents that mention the word “help” in their titles, and mention the words “flu” and “shot” anywhere in the document (title or not).

allinurl: / inurl:

-- restricts results to those containing all the query terms you specify in the URL. For example, [ allinurl:google faq ] will return only documents that contain the words “google” and “faq” in the URL, such as “www.google.com/help/faq.html”.

term1 AROUND n term2