July 21, 2006

Meaning of Parameters in a Google Query

A typical Google search URL from Firefox might look like this:

http://www.google.com/search?q=tools&ie=utf-8&oe=utf-8
&rls=org.mozilla:en-US:official&hl=en-US&client=firefox-a


Although this is a very simple search, Google adds a lot of parameters (marked with bold) to identify the source of the query, the language of the interface and the encodings. You'll obtain the same results if you type:
http://www.google.com/search?q=tools

Let's see some of the most common parameters in a Google query:

Languages

ie = encoding of the input (default: utf-8)
oe = encoding of the output, the results (default: utf-8)
hl = language of the interface (default:en, you can try xx-bork or xx-hacker)
lr= language of results (default:en)

Source


sourceid = type of the source (ie7, opera, navclient, navclient-ff - navclient is used for Google software like the toolbar)
client = similar to sourceid (safari, firefox-a)
rls = version of the client, the language (example: rls=GGLD,GGLD:2003-35,GGLD:en for Google Desktop)

Results

q, as_q= query, what you type in the search box
start=number of the first result from the page (starts from 0)
num=number of results in a page
filter= 0 or 1 (hide duplicate results)

Advanced search

as_epq=exact phrase (instead of typing quotes in the query, you can use this parameter)
as_filetype= file format (example:as_filetype=pdf)
as_ft=include / exclude a file format defined with as_filetype (values: i, e)
as_qdr=date of the results (values: m3, m6, y - last 3 or 6 months, a year)
as_nlo= find numbers greater than
as_nhi= find numbers lower than (example: as_nlo=7&as_nhi=9 to search integers from 7 to 9 - alternatively, you could type 7..9 in the query)
as_occt=where can appear the words in the page (some values: any, body, url, title)
as_sitesearch= restrict to a site (example: as_sitesearch=cnn.com)
as_dt=include / exclude a domain (values: i, e)
as_rights= type of the license (for Creative Commons licenses)
safe= safe search (values: active, off)

Using these parameters you can understand better a Google query URL from your site stats and can create an advanced query without using Advanced Search dialog:

http://www.google.com/search?as_epq=matrix+1..3&num=25&hl=en&as_qdr=m3

searches for "matrix 1", or "matrix 2" or "matrix 3" in the sites updated in the past 3 months and returns 25 results.

{ Idea by Corsin Camichel. }

16 comments:

  1. as_qdr can be used for more date types than the standard ones. Append "&as_qdr=m1" to the end of a search URL to get the last month only for example. Thought you might find that interesting.

    ReplyDelete
  2. Can you please let us a little more about filter=0, is it for duplicate content or more parameters involved. Thanks

    ReplyDelete
  3. ie = encoding of the input (default: utf-8)
    filter= 0 or 1 (hide duplicate results)
    as_filetype= file format (example:as_filetype=pdf)

    can you give me more file formet
    Green Tea

    ReplyDelete
  4. Hi there,

    Ive noticed that when googling for things in firefox, the "parameters" part is seperated by a # rather than a ? as seen in IE etc..

    so rather than
    http://www.google.com/search?a=b&c=d
    its
    http://www.google.com/search#a=b&c=d

    Is there any reason for this?

    ReplyDelete
  5. Sometimes Google uses AJAX to load the page's content without reloading the page.

    ReplyDelete
  6. Although this post is 3 yrs old its still interesting. would love to see a new similar post - using paramaters for advanced search.

    ReplyDelete
  7. Does anyone know what the tbo parameter is for? I sometimes get tbo=1 urls, but haven't found out which queries use it.

    ReplyDelete
  8. "tbo" enables the search options panel (also known as search toolbelt).

    ReplyDelete
  9. What are some typical URL Query Parameters to exclude in Google analytics. Sid and sesssionid make perfect sense... what else?

    Thanks!

    ReplyDelete
  10. Now with google instant they really made everything more confusing for developers like us, I think they're trying to avoid scraping by making searches more ajax based.

    ReplyDelete
  11. What does parameter with rls=es.com.microsoft mean?

    ReplyDelete
  12. as_nlo and as_nhi are interchanged in your list

    ReplyDelete
  13. Google continues changing, and we'll see more these coming days, so brace yourselves :)

    ReplyDelete
  14. So many changes with Google in the past years, do these parameters still the same?

    ReplyDelete
  15. Updates 2012:
    pws=0 no personalized search filter.
    nfpr=1 no automatic spell-check guessing.
    complete=0 no auto-suggest nag.

    ReplyDelete

Note: Only a member of this blog may post a comment.