Google search tips
[Programmers note: a standard (i.e. as typed by the user)
query is submitted to http://www.google.com/search
using the 'q' CGI parameter. To support the 'Advanced Search'
dialog, some features can additionally be invoked by using other
parameters - for reference these are shown within '[..]' below.]
The following can be used to compose search terms in the Standard Google search dialog. It's
not entirely clear to what extent search terms can be combined, though
it is defiantly possible to include at least one of each of the
following in a search.
- Google searches are always case insensitive.
- Google returns pages that match all search terms. You don't need
to (and can't) put AND between terms. E.g. 'all these words'
[as_q=all+these+words]
- To include what would otherwise be a stop word, proceed it with +.
E.g. '+and'.
- For a search term that matches any one of a number of words, link
them with OR. E.g. 'any OR of OR these' [as_oq=any+of+these]
- To search for an exact phrase, enclose it in double quotes. E.g.
'"exact phrase"' [as_epq=exact+phrase]
- To exclude pages that match a search term, proceed it with
'-'. E.g. '-but -without -these'. This is known to work with simple
words, exact phrases and with site: and inurl: (see below) [(for words
as search terms only) as_eq=but+without+these]
The following additionally limit results of a search, but can't
appear in a search on their own. Their sense can be inverted by
proceeding them with -.
- To limit results to those on a site or domain, proceed the
[possibly partial] site or domain name with 'site:. E.g.
'site:cam.ac.uk' [as_dt=i&as_sitesearch=cam.ac.uk or
as_dt=e&as_sitesearch=cam.ac.uk to exclude]
- To limit results to those containing a partcular string in their
url, procede the string with 'inurl:' E.g. 'inurl:pdf'.
The folowing modify the entire search string, and therefore must
appear at the start of the string and can't be combined.
- To force the entire search to be matched only in the document title,
procede it with 'allintitle: E.g. 'allintitle: fred bill OR barney'
[as_occt=title]
- To force the entire search to be matched ony in the document url,
procede it with 'allinurl:'. E.g. 'allinurl: fred bill OR barney'.
[as_occt=url]
- To find pages that are like an other page, procede the url with
'related:'. E.g. 'related:www.cam.ac.uk' [as_rq=www.cam.ac.uk]
- To find pages containing links to an other page, procede the url with
'link:'. E.g. 'link:www.cam.ac.uk' [as_lq=www.cam.ac.uk]
- To return Google's cached copy of a page, procede the page's url
with 'cache:'. If you follow the url with a space seperated list of search
words, they will be highlighted on the returned page. E.g. cache:www.cam.ac.uk university
Some behaviour is controled either by your Google preferences
or by CGI parameters, but not by anything that appears in the query string.
- Limit results to pages in particular languages: [lr=lang_en, for
english; lr=lang_fr for french; ...].
- Enable Google's 'Safe Search' filter: [safe=active].
- Restrict the number of results returned per page: [num=10].
Jon Warbrick
Last modified: Tue Mar 6 12:12:39 GMT 2001