XML technologies / RSS & Atom / RSS 2.0 / Extension modules / Amazon’s OpenSearch module

(Excerpt from "Newsfeeds with RSS and Atom" by Heinz Wittenbrink, published by Galileo Press, 2005)

Perhaps the most interesting recent extension comes from Amazon. Amazon’s OpenSearch engine, called "A9", further demonstrates the considerable commercial interest in RSS technologies and the format’s business potential.

The "OpenSearch RSS 1.0" extension equips RSS 2.0 with constructs for presenting search results as RSS feeds and retrieving them regularly. OpenSearch thus allows subscriptions to search queries and retrieval of their results in a feed reader or aggregator. It defines a standard format for displaying search results, explicitly aiming to preserve compatibility with existing RSS readers.

Elements of the OpenSearch module

OpenSearch 1.0 introduces three new elements and its own namespace:

"http://a9.com/-/spec/opensearchrss/1.0/".

Search results themselves are marked up as RSS items. Within the elements item, link contains the link to the document found, title the page title, and description the beginning of its text. (This is interesting because it shows how common website components can be marked up semantically with RSS.) OpenSearch uses the existing RSS elements of the same names, keeping them in the RSS namespace but broadening their meaning.

As the title of channel these result lists should show the name of the search results’ producer, including both the search engine’s name and the search terms. HTML markup should be avoided.

The element link within channel points to a Web page containing the search results. The element description describes the search and may contain simple escaped HTML markup.

The extension also introduces three new elements. They are descendants of the RSS element channel and belong to the OpenSearch namespace:

The element totalResults specifies how many results the search engine found:

<openSearch:totalResults>1000</openSearch:totalResults>

If the search found no results, "0" should be specified. If the element is absent, the client may assume that the feed received from the search engine contains all search results.

The element startindex also contains an integer:

<openSearch:startIndex>1</openSearch:startIndex>

This identifies which search result is displayed first. All common search engines use this approach, usually showing something like "11 - 20 of 1756 results found" at the top of the page. Like the other two, this element is optional.

The element itemsPerPage specifies the maximum number of results a page can contain:

<openSearch:itemsPerPage>10</openSearch:itemsPerPage>

The OpenSearch specification also suggests ways to make optimal use of existing RSS 2.0 elements in searches. Further OpenSearch versions with additional features are already envisaged. Possible extensions include language selection, encoding, spelling suggestions, multimedia results, and paid search listings. The potential of combining such "saved searches" with categories is immediately apparent.

   

 

 

 

Creative Commons license
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

back to top