A Smarter Wikipedia Search using Google

I’m always looking for ways to speed up common tasks. This post describes a faster and more accurate way to reach a desired Wikipedia article.

There’s an increbibly useful (and free) plugin for Safari from David Wantanbe (the man also responsible for Acquisition, NewsFire, and Xtorrent) called Inquisitor which gives you search suggestions as you type in the search bar (described as “Spotlight for the web”, essentially Google Suggest). In addition to the search suggestions, Inquisitor allows you to assign key combinations to different search engines, which you can define yourself.

I usually just use Google to get to a Wikipedia article, since it’s so convenient. For example, type “safari wiki” and the first item will probably be the Wikipedia article for the Safari web browser. Taking this a step further, using the Google’s “I’m Feeling Lucky” button search, along with “site:en.wikipedia.org” appended to the search term, most of the time you will get redirected directly to the Wikipedia page you’re looking for.

I don’t find Wikipedia’s built in search to be particularly useful. Since this method uses Google’s smartness it will find partial matches as well as the (usually) the more relevant topic. For example, type “apple site:en.wikipedia.org” and it will take you to the computer company (actually “Apple Inc.”) rather than the fruit (the real “Apple”). I’m usually more interested in the computer company.

Of course typing all that out at google.com and pressing the “I’m Feeling Lucky” button would offset any convenience it adds, so combine it with Inquisitor or Firefox/IE’s custom searches.

Here’s the search URL for Inquisitor (install in “Safari” application menu : “Preferences” : “Search” tab : “Edit Sites…”):

If you just want to use Google as your Wikipedia search engine, use this one without the “I’m Feeling Lucky” option:

All Inquisitor does is substitute the search terms you enter into a custom URL wherever it finds an “@”, then takes you to that URL. This particular URL uses the “I’m Feeling Lucky” feature of Google to redirect you to the top resulting page. Assign a key combo (I use command-option-W) to it and you’ve got a really simple and fast way to get to the most relevant Wikipedia article.

If you’re a Firefox 2 or [gasp] IE 7 user, I threw together two OpenSearch plugins. Unfortunately neither browser supports hot keys for different search engines so some of the convenience is lost. The plugins should be auto-detected, if not, click on one of the following links (JavaScript required):

Install Smarter Wikipedia (auto redirect to most relevant page)
Install Smarter Wikipedia Search (Google search results)

Note that this technique could be applied to *any* website, even ones without built in search engines: just replace “site:en.wikipedia.org” with the desired domain name. You could also remove the “site” clause entirely to get an “I’m Feeling Lucky” search of the entire web.

Update: John Gruber over at Daring Fireball also has a good use for Google’s “I’m Feeling Lucky” search.