Google Search syntax dissected
Here is my compilation of some of Google’s advanced query syntax which you can use to get results quickly.
Basic Boolean
Whenever you search for more than one keyword at a time, Google will search for all of them. If you search for
XML Java “web Services”
Google will search for all the words. If you want to specify that either word is acceptable, you put an OR between each item
XML OR Java OR “Web Services”
If you want to have definitely one term and one of two or more other terms, you group them with parentheses, like this
XML (Java OR “Web Services”)
This query searches for the word “Java” or phrase “Web Services” along with the word “XML.” A stand-in for OR borrowed from the computer programming realm is the | (pipe) character, as in
XML (Java | “Web Services”)
If you want to specify that a query item must not appear in your results, use a -.(minus sign or dash).
XML Java -”Web Services”
This will search for pages that contain both the words “XML” and “Java” but not the phrase “Web Services.”
Operators
In addition to the basic AND, OR, and quoted strings, Google offers some rather extensive special syntaxes for honing your searches. Google being a full-text search engine, it indexes entire web pages instead of just titles and descriptions. Additional commands, called special syntaxes, let Google users search specific parts of web pages or specific types of information. Specifying that your query words must appear only in the title or URL of a returned web page is a great way to have your results get very specific without making your keywords themselves too specific.
Here are some of the common keywords that you can add to your query in Google
intitle, allintitle
Restricts your search to the titles of web pages. The variation, allintitle: finds pages wherein all the words specified make up the title of the web page. It’s probably best to avoid the allintitle: variation, because it doesn’t mix well with some of the other syntaxes.
Eg: intitle:”george bush”
allintitle:”money supply” economics
inurl, allinurl
Restricts your search to the URLs of web pages. This syntax tends to work well for finding search and help pages, because they tend to be rather regular in composition. An allinurl: variation finds all the words listed in a URL but doesn’t mix well with some other special syntaxes.
Eg: inurl:help
allinurl:search help
intext, allintext
Searches only body text (i.e., ignores link text, URLs, and titles). There’s an allintext: variation, but again, this doesn’t play well with others. While its uses are limited, it’s perfect for finding query words that might be too common in URLs or link titles.
Eg: intext:”yahoo.com”
allintext:html
inanchor
Searches for text in a page’s link anchors. A link anchor is the descriptive text of a link. For example, the link anchor in the HTML code O’Reilly and Associates is “O’Reilly and Associates.”
site
Allows you to narrow your search by either a site or a top-level domain. AltaVista, for example, has two syntaxes for this function (host: and domain:), but Google has only the one.
Eg: site:loc.gov
site:thomas.loc.gov
site:edu
site:nc.us
You can also use site: operator to exclude certain domains from a search
Eg: google -site:google.com
This is particularly useful for ego searches. You can find out all those sites which mention your name expect your site.
Eg: bill gates -site:microsoft.com -site:wikipedia.org
link
Returns a list of pages linking to the specified URL. Enter link:www.google.com and you’ll be returned a list of pages that link to Google. Don’t worry about including the http:// bit; you don’t need it, and, indeed, Google appears to ignore it even if you do put it in. link: works just as well with “deep” URLs-http://www.raelity.org/apps/blosxom/ for instance-as with top-level URLs such as raelity.org.
cache
Finds a copy of the page that Google indexed even if that page is no longer available at its original URL or has since changed its content completely. This is particularly useful for pages that change often. If Google returns a result that appears to have little to do with your query, you’re almost sure to find what you’re looking for in the latest cached version of the page at Google.
filetype
Searches the suffixes or filename extensions. These are usually, but not necessarily, different file types. I like to make this distinction, because searching for filetype:htm and filetype:html will give you different result counts, even though they’re the same file type. You can even search for different page generators, such as ASP, PHP, CGI, and so forth-presuming the site isn’t hiding them behind redirection and proxying. Google indexes several different Microsoft formats, including: PowerPoint (PPT), Excel (XLS), and Word (DOC).
Eg: homeschooling filetype:pdf
“leading economic indicators” filetype:ppt
related
Finds pages that are related to the specified page. Not all pages are related to other pages. This is a good way to find categories of pages; a search for related:google.com would return a variety of search engines, including HotBot, Yahoo!, and Northern Light.
Eg: related:www.yahoo.com
related:www.cnn.com
info
Provides a page of links to more information about a specified URL. Information includes a link to the URL’s cache, a list of pages that link to that URL, pages that are related to that URL, and pages that contain that URL. Note that this information is dependent on whether Google has indexed that URL or not. If Google hasn’t indexed that URL, information will obviously be more limited.
Eg: info:www.oreilly.com
info:www.nytimes.com/technology
define
Will get the definition of the term that you have entered. This syntax can be used to get the definitions of words, phrases, and acronyms
Eg: define:dreaming
This query will get you the definition of the word dreaming
numrange
If you want to search for a range of numbers then you can use two dots (without spaces) to represent a range of numbers
Eg: inventions 1850..1899
This query will get you all the inventions between 1850 and 1899
safesearch
If you include safesearch: in your query, Google will exclude adult-content.
Eg: safesearch:breasts
This will search for information on breasts without returning adult or pornographic sites.
stocks
If you start your query with stocks:, Google will interpret the rest of the query terms as NYSE, NASDAQ, AMEX, or mutual fund stock ticker symbols, and will open a page showing stock information for the symbols you specify.
Eg: stocks:goog
This will show information about Google’s stock. Specify ticker symbols not company names. If you enter an invalid ticker symbol, you’ll be told so and given a link to a page where you can look up a valid ticker symbol.
The Special Syntaxes
Currency Conversion
Google makes it easy to calculate money conversions from one form of currency to another.
Eg: $5 in yenThe above query will let you know that five dollars is worth about 566.599846 yen.
If you’re not sure of the name of a currency, use nationality instead.
Eg: 25 Australian money in Italian money
This may sound awkward but it does the job.
Eg: $5 in indian money
This will let you know that 5 US dollars is worth about 224.477976 Indian rupees
You can even convert units in this fashion.
Eg: $2.85 per gallon in British money per literThis query will tell you that it is about 42 pence per liter and provides an international basis for discussing gas prices at the pump.
Check Airfares
When you google for the names of two major cities, Google automatically offers to search for flights.
Eg: Denver Fort Lauderdale
In the form labeled “Flights from Denver, CO to Fort Lauderdale, FL”, enter a departure and return date and choose whether to search using Expedia, Hotwire or Orbitz. Do not use quotation marks in your initial search. Denver “Fort Lauderdale” will not bring up the flight search form.
Find Song Lyrics
If you are looking for the title or lyrics of a song then you can use Google search phrases and wildcards to find them.
Eg: “Friday I am in love” lyrics
Or use the wildcard operator to get lyrics with certain words in them, like this
This compilation is just a tip of the iceberg of the features available in Google’s search syntax. If you come across any other special syntax, then do let me know so that I can add it.
Update: Some of the latest additions to Google Search Syntax can be found here.
Update 2: You can also get the current time of any city using Google Search query.
Personal website, blog and play ground of Sudar Muthu, a web and WordPress developer from Chennai, India. 
Cool. But, hey isn’t it the same one you showed me some time back ? Well, a long time back:D
Yeah, this one is based on that old article. But now I have updated it and the second part of this article is totally new.
Very Very nice information here… Thanks
Hi Cayle,
Nice to know that it was useful to you.
great list, is there a replacement for the ‘daterange:julian-julian’ operator?
hmm.. I am not very sure. Will check up and let you know.
Cheers
Sudar
Here is what I’ve found as far as the date range.
Type in the searchbox:> daterange:startdate-enddate. The catch is that the date must be expressed as a Julian date (see below). So, for example, July 8, 2002, is Julian date 2452463.5 and May 22, 1968, is 2439998.5. Furthermore, Google isn’t fond of decimals in its date range queries; use only integers: 2452463 or 2452464 (depending on whether you prefer to round up or down) in the previous example
You might want to say a few words about the * operator in a bit more detail, because it’s a useful function and worthy of a small section in its own right, IMO. Another really important one is the file format - I’ve written about this myself at http://www.philb.com/fileformat.htm
For dates I’d be inclined to use GooFresh at http://www.researchbuzz.org/2003/09/goofresh.shtml which makes searching for dates much easier. Although having said that, it’s broken at the moment.
Phil.
@Joeups, @Phil
Thanks for the information about data range.
Cheers,
Sudar
xanax++B
Hi Sudar,
This is very helpful as I am an undergraduate and needs to minimise the time I spend in searching the internet.
Thanks a million.
Vinetta
Hi Vinetta,
Nice to know that my article was helpful to you.
Cheers,
Sudar
cool information ,very very useful
nice very help full
@Sharosh, Goverdhan
Nice to know that you guys found this useful
Cheers,
Sudar
hey sudar,
my friend said you can find it better than u usually do ,i was wondering how do i do tht
this page has thought me how to
will explore more and let you know if i have something new
Hi Prabeesh,
Nice to know that you found it useful. Happy Googling..
Cheers,
Sudar
hey its really good…. amazing google….?????
thanks for let me knowing the power of google.
amazing ……. never knew google was so powerful.
thanks a lot..
Great work buddy!!!.
have learnt good stuff
Thanks for that and keep doing if u have time
Hi Vinay, Sandeep, Murali,
Nice to know that it was useful to you guys.
Happy Googling…
Cheers,
Sudar
[...] info:For more on Google’s search syntax, see this guide, and this [...]
[...] siete interessati a maggiori dettagli alla sintassi di Google, ecco potete leggere questa guida, oppure quest’ultima (entrambe in [...]
[...] info:For more on Google’s search syntax, see this guide, and this [...]
[...] it would help if we understand some of the useful techniques for searching. You may refer to this Google Search Techniques Article for more [...]
[...] Google Search syntax dissected @ Night Dreaming (by Sudar) [...]
[...] info:For more on Google’s search syntax, see this guide, and this [...]
[...] info: For more on Google’s search syntax, see this guide, and this [...]
Good info gathered and well organized.
Its wonderful, Good!
Rocks !!!!!!
i just completed my project on Google searching strategies, it really helps me alot ha ha !!! 
@Vin,
Nice to this article was of help to you.
–
Sudar
[...] Google has added some new search syntax and so here is the update to my Google Search syntax tutorial. [...]
[...] Google has added some new search syntax and so here is the update to my Google Search syntax tutorial. [...]
@ Jimmy
well it seems very cool
but can u search $2 in Pak Rupee. It showing very non related output. It means still you don’t have deployed enough instances regarding to this.
[...] ????? ?????????? ? ?????? ?? ????????? ??????????: Google Search syntax dissected @ Night Dreaming (by Sudar)Using Search Operators @ Google Guide??????? [...]
I am very new to seo job. so kindly give me some reference site of search engine optimisation and also give tips for how to search a keyword. This site is very useful for me to find keywords . thank u
Hello Manimegalai,
Check the SEO tool list by Joost at this url http://www.joostdevalk.nl/seo-tools/
Hope this helps.
Nice. these syntax would easy my search.
Thanks.
Hi Kamal,
Nice to know that my guide will be of help to you. Happy Googling
Cheers
Sudar
Sudar, thanks for all the useful info. But I’ve been looking for a search technique that would allow me to find terms that were in close proximity to each other. I know I could put the words or terms in double quotations, but that sometimes eliminates results that may be useful. Isn’t there a search term like “near”, “within 10 words”, or something like those?
thanks,
tim
[...] dress will find results that include those terms together, not just separately. Here is a great site that gives you other ways to search [...]
Sudar, using parentheses to group boolean expressions do not seem to work. Any ideas?
Thanks. Andy
Thanks for the info.
http://www.nela.in/
Thanks. Very useful for me.
is there a command like
link:google.com
that allows one to search for how many times a “particular-term” or site was searched for on Google?
[...] Google Search syntax dissected @ Night Dreaming (by Sudar) [...]
Picked a few new tricks. good work. Thanks Sudar.
Hi Vallabh,
Nice to know it was helpful to you.
Great article, really helpful information. Keep up the good work.
@Chris,
Nice to know that you find article useful.
Very very informative. Thanks a lot.
Really informative article, it helped me a lot, had to come back a few times and readi it again. keep up the good work, thanks
@Batmiah, @Weis
Nice to know that my article was informative and helpful to you.
Very informative and well designed website. I’m sure, you will be successful with it, have a nice day!,
@Lewis,
Thanks for the wishes and nice to know that you liked my article.
Thank you for you’re work. It’s in my favorites now.
question for you. Lets say I’m trying to search with in a word - is that possible for example lets say that am trying to find an email address at with the ending “@fun.com” is there a way to find emails with that ending? Thanks
Thanks for the information, but i wan to now more and more about the google search terms, can you give the more information about the search terms. Thanks: alex
@alex,
If you want to track how a specific search terms is used, you can try http://www.google.com/trends.
[...] work with all Boolean terms, so be careful, but it’s a handy trick to have in your pocket. Here is a quick tutorial for how Boolean works with [...]
Hi, it’s really informative. To search how many links that our domain has can be find by searching site:yoursitename.com ( eg : site:blognol.com ). This will list the urls that crul by goolge in your site.
For more details : Click Here
Great work.. get sharing.. great help…
thanks a lot , it is very useful.
Hi,
Very cool!, and I found this list just today.(20/07/2008).
But, what I’m looking for, is for a TRANSLATION OPERATOR, something like:
” ‘ORBAT’, in Spanish:”
or
” ‘Common Tactical Picture’, in Spanish”, etc.
Is there anything like this? Or anything leading to the parallel terminology in a different (e.g.= Spanish) language?
Thanks, Shmuel.
[...] (use standard Google, code search or other search engines) - there are many recommendations how to use search engines [...]