Narrowing Your Search Results with URL Parameters


There's one more way to tweak your Google resultsnot your queries, mind you, but rather the results that get returned. You can do this by modifying the URL of any search results page, via the addition of what the techno-wizards call URL parameters.

Understanding Google's URLs

What is a URL parameter? It's a technical modifier that appears at the end of a URL; it's essentially the internal code used to generate a particular page of search results. For example, do a basic Google search for tweeter, and then look at the URL for the ensuing search results page. As you can see in Figure 2.33, the URL looks like this: http://www.google.com/search?hl=en&q=tweeter. Everything after the www.google.com part of the URL are the URL parameters.

Figure 2.33. The URL of a Google search results page; note the URL parameters after the www.google.com.


Using our tweeter example, you can see that the first parameter is search?, which tells Google that you're conducting a search. The next parameter is hl=en, which sets the language for the search results to English. The final parameter is q=tweeter, which tells Google that your query is the single keyword, tweeter.

Now, it's not important that you learn all these URL parameters; they're essential to Google's internal search function, but not to you. However, if you know a few of these URL parameters, you can use them to manipulate the results that Google returns from a standard web search. Let's look at a few of the most useful of these parameters.

Displaying the Most Recent Results

If you want to filter your search results to include only those pages created within the past few months, you can add the &as_qdr=m# parameter to any search results URL. With this parameter, replace the# with the number of months back you want to search; for example, &as_qdr=m3 refines your results to pages created within the past three months. (You can search back between 1 and 12 months.)

Tip

You can also use the URL of a search results page as a bookmark for future searches. Just copy the URL into your favorites list, email it to a friend, or whatever. When you enter the full URL into your web browser, you'll jump to the same search results page, without having to re-enter the original search query.


How does this work? It's pretty simple, really. Just follow these steps:

1.

Enter your query into the Google search box as normal, and then click the search button.

2.

When the search results page appears, move your cursor to the end of the URL in your web browser's address box.

3.

Add the following to the end of the URL: &as_qdr=m#, replacing# with a number between 1 and 12, as shown in Figure 2.34.

Figure 2.34. A search results URL modified with the &as_qdr=m# parameter.




4.

Press the Enter key on your keyboard or click the Go button in your web browser.

Google now reruns your search, this time filtering the results to include only those pages created within the past x number of months.

Displaying More (or Fewer) Results

Now let's look at expanding the number of results displayed on a page. While this is something you can manipulate from the Advanced Search page, you can also do this by adding the &num=x parameter to the end of any search results URL. Just replace x with the number of results you want to display on a page, and then rerun the search with the modified URL.

Restricting Results to a Specific Filetype

We'll look at one last URL parameterthis one is also available from the Advanced Search page but easily duplicable in the search results URL. If you want to narrow your results to documents of a certain type of file, just add the &as_filetype=xxx parameter to the end of the search results URL. Replace xxx with the file extension (doc, jpg, pdf, and so forth), and then rerun the search with the modified URL. It's that easy.




Googlepedia. The Ultimate Google Resource
Googlepedia: The Ultimate Google Resource
ISBN: 078973639X
EAN: 2147483647
Year: 2004
Pages: 370

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net