Narrowing Your Search Results with URL ParametersThere'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 URLsWhat 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 ResultsIf 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:
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) ResultsNow 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 FiletypeWe'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. |