The A9 search engine ( created the OpenSearch protocol (http://www.? as a “collection of simple formats for the sharing of search results.”

Many web sites have their own search boxes; many are also capable of creating RSS and Atom feeds. OpenSearch is a set of extensions that can wrap existing search functionality, leveraging the feeds to create lightweight search APIs. The most prominent clients for OpenSearch are the search ­plug-­ins for Firefox 2 and Internet Explorer 7.

Let’s get more concrete. One of the easiest ways to learn how to create a search ­plug-­in is to use the search ­plug-­in generator at the Mozilla Mycroft project ( su bmitos.html).

Here I use as an example site for which I want to generate a search ­plug-­in. I go to the blog to type in a term (for example, Yahoo) to search on and see what URLs come back:

I can then replace Yahoo with {searchTerms} to generate the search URL for the ­plug-­in generator:{searchTerms}&searchsubmit=Find

You are given the option to register your search ­plug-­in. One of the great features of the search ­plug-­in wizard is its generation of OpenSearch documents. Here’s the one for the plug-in (

         <?xml version="1.0" encoding="UTF-8"?>
         <OpenSearchDescription xmlns=""
           <!-- Created on Sun, 17 Jun 2007 17:08:21 GMT -->
           <Description>Search for info about mashups</Description>
           <Url type="text/html" method="get"
           <Image width="16" height="16">
           <Developer>Raymond Yee</Developer>

With the OpenSearch XML document in hand, you can then embed some JavaScript to let a user install the ­plug-­in. The relevant method is window.external.AddSearchProvider(), which you find documented here:

You can get a list of search engine ­plug-­ins here:

Note a caveat from

While the implementation of Sherlock [the legacy Apple search tool] in ­Mozilla-­based browsers only supported GET requests, the introduction of OpenSearch has also allowed POST requests to be used but unfortunately this is not currently supported in IE7.

You can use the following WordPress ­plug-­in to generate a search ­plug-­in:

There is another half to the OpenSearch specification. If the search results that come out of the search engine are in RSS 2.0 or Atom 1.0 format, wrapped with special elements documented here:

then the search results can be consumed and presented by search clients that support the OpenSearch protocol:

and by programming libraries that can use it:

In other words, you can get lightweight APIs for these sources and build metasearch systems from them. In the specific case of WordPress search results, you can make WordPress into a full OpenSearch source using a WordPress ­plug-­in, such as the following: