1] How can I include or exclude web pages depending on the search terms I want or do not want?
How can I find web pages that have:
[a] all these words: (e.g. “PHP”, “Ajax”)
- Advanced Search Page: Fill “all these words:” text box with your words separated by spaces, e.g. (php ajax).
- Standard Search Box:
[b] this exact wording or phrase: (e.g. "Bill Gates")
- Advanced Search Page: Fill "this exact wording or phrase:" text box with your exact phrase, e.g. (bill gates).
- Standard Search Box: ["bill gates"].
one or more of these words: (e.g. "Firefox", "Chrome")
- Advanced Search Page: Fill "one or more of these words:" text boxes (max 3) with your words, e.g. (firefox) (chrome).
- Standard Search Box: [firefox OR chrome].
How can I find web pages that do NOT have:
[d] any of these unwanted words: (e.g. to remove "Computer" from the context of "Viruses")
- Advanced Search Page: Fill "any of these unwanted words:" text boxes with your unwanted words separated by spaces, e.g. (computer), having filled (virus) in "all these words:" text box.
- Standard Search Box: [virus -computer].
How can I find web pages where:
[e] this (stop) word should not be removed: (e.g. the "I" in "World War I")
- Advanced Search Page: No separate control. Fill "all these words:" text box with your words separated by spaces and just add a "+" sign before any essential word -- same as below.
- Standard Search Box: [world war +i]
 Google gives 10 results per page by default. Can I make it return more / less (e.g. say, 20, 50, 100, 1, 5, etc) results per page?
Google returns 10 results per page by default because this choice balances fairly well the trade-off between fast performance and high probability of getting what you want in the first page itself. (For an interesting reading on the reasons attributed to the default behaviour, see Note).
There can be situations, however, when you might want to override this default behaviour and want more (e.g. 100) or less (e.g. 1) results per page. Here's how you can achieve that:
- Advanced Search Page: Select an option from "Results per page:" drop-down list. Your options are limited to the available options (10 / 20 / 30 / 50 / 100 results) here.
- Query String Hack: There is a simple Google query string hack. Do a standard search once with your search string to get the usual ten first-page results. Now go to the address bar and add &num=50 to the end of the URL that is found there. Hit Enter. This time, Google will give you back a results page with 50 (rather than 10) results. However, it works only for numbers between 1 and 100 (both included).
- Please note that using Advanced Search Page "Results per page:" drop-down list is per-query-basis approach: works for that specific query and reverts to default behaviour (10 results per page) next query onwards unless overridden again. If you want Google to remember your preference and apply to all future searches, then go to the Preferences page (by clicking Preferences link to the right of Google search box), select an option from "Number of Results" drop-down list, and click "Save Preferences". (Setting preferences will work as long as the browser's cookies are enabled.)
- For most general searches, 10 results per page is almost ideal since most people rarely go beyond page 1 or at most 2. A well-defined query would get you what you want within the top ten anyway. Hence, this filter is mostly for special cases.
 Can I limit my search to web pages written in a specific language (e.g. French)?
Yes. You can restrict your search results to pages written in a specific language, say French.
- Advanced Search Page: Select an option from "Language:" drop-down list (e.g. "French", if you wanted to get web pages written in French on say, France tours).
- Query String Hack: The query string hack would require something like &lr=lang_fr to be added. (Harder to remember, apt to change; not recommended generally.)
If you are searching for pages in a language other than your language (English), you'll find a "Translate this page" link alongside all search results listed by Google. This makes it immensely useful since you can now translate and read a web page originally written in any language in the world.
On a similar note, you can search for web pages from a specific geographic region by selecting an option from "Region:" drop-down list. The query string hack would be like &cr=countryUS for United States.
 Can I search for documents of a specific type (e.g. PowerPoint, PDF, Flash, etc)?
Yes. Files of some well-known types can be searched easily for your filetype-specific needs.
- Advanced Search Page: Select an option from "File type:" drop-down list (e.g. "Adobe Acrobat PDF (.pdf)"). "File type:" drop-down list has about 10 options (including .pdf, .doc, .ppt, .xls, .rtf, .swf) as of this writing.
- Standard Search Box: Use filetype: operator in your query, e.g. [web security filetype:pdf]. Please note that, using this method, you can search for more types of files than are listed in "File type:" drop-down list (like .java, .cpp, .xml, etc), e.g. [ajax filetype:java].
 Can I search only within a website (e.g. Wikipedia)?
Yes. You can restrict your search to a particular website (e.g.www.youtube.com) or domain (e.g. .gov) in either of the following two ways:
- Advanced Search Page: Specify the site or domain name in the "Search within a site or domain:" text box.
- Standard Search Box: Use site: operator in your query followed by the site or domain name to restrict your search to within that particular website or domain, e.g. [paypal site:www.howstuffworks.com], [cloud computing site:en.wikipedia.org], [peace site:gov], etc.
Note: For using the following options (-), please find relevant input controls by click-expanding "Date, usage rights, numeric range, and more" link on Google Advanced Search Page.
 Can I search for recent information on any topic?
Yes. Google lets you specify how recent you want your search results to be: past 24 hours / week / month / year or anytime.
- Advanced Search Page: Select an option from "Date:" drop-down list (e.g. If you want to know what Barack Obama was up to during the last 24 hours, enter (barck obama) in "all these words:" box and select "past 24 hours" from "Date:" list).
- Query String Hack: For this, Google adds &as_qdr=<value> to the query string (you can too as a hack) where <value> can be d (day), w (week), m (month), y (year), and all (anytime). (Harder to remember, apt to change; not recommended generally.)
 Can I search for information according to the usage rights associated with pages (e.g. free to use / share / modify, commercially / non-commercially)?
Yes. Some web pages are specially marked to indicate to search engines that they are covered by the Creative Commons License (and have certain permitted usage rights). Google lets you search for pages with the usage rights you want.
- Advanced Search Page: Select an option from "Usage rights:" drop-down list (e.g. "free to use, share or modify, even commercially").
- Query String Hack: Makes complicated changes to query string (See for yourself, if you want, by experimenting with various options and checking the URL. Prone to mistakes, harder to remember, apt to change; not recommended.)
 Can I search for pages where my search terms occur where I want, e.g. in the title of the pages?
Yes. Google Advanced Search lets you search for pages wherein your search terms occur where you want them to be, like anywhere on the page / in the title / in the text / in the URL / in links to the page.
- Advanced Search Page: Select an option from "Where your keywords show up:" drop-down list (e.g. "in the title of the page").
- Standard Text Box: Prefix your search terms with these self-describing keywords: allintitle:, intitle:, allinurl:, inurl:, e.g.
- [allintitle: google faq] - Will return only documents that have both "google" and "faq" in the title.
- [intitle:google faq] - Will return documents that have "google" in their title, and "faq" anywhere in the document (title or not).
- [allinurl: google faq] - Will return only documents that have both "google" and "faq" in the URL.
- [inurl:google faq] - Will return documents that have "google" in their URL, and "faq" anywhere in the document (URL or not).
Please note that the following are equivalent: [inurl:google inurl:faq] and [allinurl: google faq]. And so are these: [intitle:google intitle:faq] and [allintitle: google faq].
 Can I search for pages containing numbers (years, prices, etc) in a specified range?
Yes. Google helps you search for content containing numbers in a specified range, e.g. between years 2000 and 2008, between prices $50 and $500, etc.
- Advanced Search Page: Fill in the couple of "Numeric range:" text boxes with your limit values, e.g. ($500) and ($1500).
- Standard Text Box: Use .. operator, e.g. [digital slr $500..$1500], [sidney sheldon 2000..2005], etc.
 Can I eliminate adult sites from my search results?
Yes. Many users prefer not to have explicit sexual content included in their search results due to various reasons (workplace rules, kids around, etc). Google provides a way to eliminate most inappropriate material from your search results if you so desire.
- Advanced Search Page: Select "On" option from "SafeSearch:" group of option buttons. For example, turning SafeSearch on while searching for "breast cancer" will eliminate most breast images of sexual, non-pathological nature.
- Query String hack: Google adds &safe=active to its query string. (Might change in future without notice. Not recommended generally.)
This is a per-search-basis approach. Should you want to turn SafeSearch on for all your queries, you can choose a "SafeSearch Filtering" option (strict / moderate) on the Preferences page.
 Can I search for pages that are related to or linked to a particular web page?
Yes. And it's easy. Here is how:
Find pages similar to a page:
- Advanced Search Page: Fill in "Find pages similar to the page:" text box with the URL of the page and click "Search". (Also accessible by clicking on the "Similar Pages" link below a result on Google's search results page.)
- Standard Text Box: Use related: operator, e.g. the query [related:www.google.com] will point you to Yahoo!, AltaVista, MetaCrawler, etc.
Find pages that link to a page:
- Advanced Search Page: Fill in "Find pages that link to the page:" text box with the URL of the page and click "Search".
- Standard Text Box: Use link: operator, e.g. [link:www.google.com] will list web pages pointing to Google homepage.
Next up: Top Useful Google Search Tips
- Find some interesting thoughts on why Google returns 10 results per page here:http://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20.html. Don't miss the comments!
- There is a box at the top of Google Advanced Search page with this text in gray: "Use the form below and your advanced search will appear here". Watch this box getting automatically filled with the Google query for your advanced search as you successively fill in the fields in the form (e.g. "any of these unwanted words:" field). (For those fields that do not have a direct query syntax equivalent, like "Date:", your request shows up in the query string on search instead.) This can be quite helpful in becoming familiar with advanced Google queries if you are relatively new to it.
- If an operator qualifies only the next search term, leave no space between the operator and the search term. For example, there may not be any space betweenlink: and www.google.com. Other such operators are +, -, filetype:, site:,intitle:, inurl:, related:, etc.
- Google keeps perfecting its tool and things keep changing. For example, adding date:3to a search string used to restrict result pages to ones updated in the last 3 months. This doesn't seem to be working anymore. Instead Google adds something like&as_qdr=<value> to the query string for date filtering. If you are using Google's (especially) undocumented features, please verify their validity from time to time.
- Many of the advanced search operators can be used in conjunction with relatively basic ones like +, –, OR, and " " in a single query. For example, if you are interested in publications by / about Jesse James Garrett (the person who coined the term Ajax) in the context of Ajax but outside www.adaptivepath.com (where that seminal article resides), you can try this query: [ajax "jesse james garrett" -site:www.adaptivepath.com]. Note how " ", -, and site: operators are used with implicit AND in creating the query. Used well, this can lead to the creation of very powerful queries.
-- o --