Disentangling the Google Search Query String

If you have ever glanced a the address bar in your browser when carrying out a search using Google you may have noticed a peculiar string of letters and characters. Here’s a basic explanation of what you may have seen.

A query string, in the wonderful worldwide web, is a string of characters that are appended to the end of a URL to convey data to the programme at that URL. For example, when you enter a search query into Google it sends that query back to the Google servers in a query string.

The query string always starts with a question mark and the data that follows forms the search parameters that Google will use to find web pages that match your query and then present them to you from your browser.

So lets have a look at an example. Here is the Google search query string that I see in my browser when I’ve searched Google.com for the term ‘swimming pools‘ (without the inverted commas):

http://www.google.com/search?hl=en&q=swimming+pools&btnG=Search

This part: http://www.google.com/search? is the Google URL followed by the keyword ’search’ and the question mark that signifies the start of the query string.

This part: hl=en&q=swimming+pools&btnG=Search is the query string.

The various parameters passed back to the Google search programme are each separated by an ampersand (&) symbol. So this simple query string passes three separate parameters back to the Google servers. Lets look at each of these in turn.

The first: (hl=en) defines the interface language. In this case it is set to be English.

The second: (q=swimming+pools) is the actual search query terms. In this case the two words ’swimming’ and ‘pool’.

The third: (btnG=Search) presents results as if the ‘Google Search’ button has been clicked, rather than the ‘I’m Feeling Lucky’ button. (The ‘I’m Feeling Lucky’ button will take you directly to the first page of the search results for that search query).

So those are the absolute basics of the Google search query string. With a little modification you can manipulate the query to present results differently from the standard presentation. For example, adding: &num=100 will give you 100 results in a page rather than the default 10 results. When you click through each page of results you are presented with a nice long list (Note: The upper limit is 100).

As you click through the Google SERPs (search engine results pages) keep an eye on the Google search query. You should see that an additional parameter appears as you progress through the pages: &start=100

This is quite easy to understand. It’s the parameter that defines where each page of the search results start and this too can be modified manually. For example, if I wanted to see 100 search results starting from result number 351 I would need to add: &num=100&start=350 to my query string.

There are numerous additional parameters and symbols that you might see exercised in a Google query string. Here are a handful of the most useful:
cr=countryXX (where xx is the country code) - This will restrict the search results to those derived from a particular country.
safe=images - This turns Google safe search off. To turn it on use safe=active
as_eq=words+not+be+included - This defines words that must not appear in the search results

For a detailed list of nearly all of the possible parameters take a look at this post by Peter Wailes: The Ultimate Guide to the Google Search Parameters.

And to learn about those interesting and useful Google Operators vist the Google Advanced Operators page.

Have fun with your Google search queries.

By Tony Gee.

For swimming pools I can recommend http://www.h2ofun.co.uk/. And don’t forget to make sure you have a good pool cover in place this winter.

http://www.wordcat.co.uk/articles/wp-content/plugins/sociofluid/images/digg_32.png http://www.wordcat.co.uk/articles/wp-content/plugins/sociofluid/images/reddit_32.png http://www.wordcat.co.uk/articles/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.wordcat.co.uk/articles/wp-content/plugins/sociofluid/images/delicious_32.png http://www.wordcat.co.uk/articles/wp-content/plugins/sociofluid/images/furl_32.png http://www.wordcat.co.uk/articles/wp-content/plugins/sociofluid/images/technorati_32.png

Leave a Reply

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.