Home > OpenSearch > OpenSearch 1.1: ResponseNote: This is Draft 2 of the 1.1 specification, and changes may be made before the final version.
OverviewOpenSearch™ Response elements are used to add search data to existing XML-based syndication formats, such as RSS 2.0 and Atom 1.0. These extensions are designed to work with OpenSearch Description files, another of the components of OpenSearch, to provide rich search syndication with a minimal amount of overhead. OpenSearch Response introduces several elements that provide the necessary information for syndicating search results. Additionally, OpenSearch Response recommends clean extensibility guidelines, and suggests that clients and servers recognize certain other common extensions to enhance search results. On This PageExamplesSimple search results, using RSS 2.0 and the OpenSearch Response extensions.<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<channel>
<title>Example.com Search: New York history</title>
<link>http://example.com/New+York+history</link>
<description>Search results for "New York history" at Example.com</description>
<opensearch:totalResults>4230000</opensearch:totalResults>
<opensearch:startIndex>21</opensearch:startIndex>
<opensearch:itemsPerPage>10</opensearch:itemsPerPage>
<opensearch:link rel="search"
href="http://example.com/opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<opensearch:Query role="request" searchTerms="New York History" />
<item>
<title>New York History</title>
<link>http://www.columbia.edu/cu/lweb/eguids/amerihist/nyc.html</link>
<description>
... Harlem.NYC - A virtual tour and information on
businesses ... with historic photos of Columbia's own New York
neighborhood ... Internet Resources for the City's History. ...
</description>
</item>
<!-- 9 additional <item> elements appear here -->
</channel>
</rss>
The same simple search results, using Atom 1.0 and the OpenSearch Response extensions.<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<title>Example.com Search: New York history</title>
<link href="http://example.com/New+York+history"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>Example.com, Inc.</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<opensearch:totalResults>4230000</opensearch:totalResults>
<opensearch:startIndex>21</opensearch:startIndex>
<opensearch:itemsPerPage>10</opensearch:itemsPerPage>
<opensearch:link rel="search"
href="http://example.com/opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<opensearch:Query rel="request" searchTerms="New York History" />
<link rel="alternate" href="http://example.com/New+York+History?pw=3" type="text/html"/>
<link rel="self" href="http://example.com/New+York+History?pw=3&format=atom" type="application/atom+xml"/>
<link rel="first" href="http://example.com/New+York+History?pw=1&format=atom" type="application/atom+xml"/>
<link rel="previous" href="http://example.com/New+York+History?pw=2&format=atom" type="application/atom+xml"/>
<link rel="next" href="http://example.com/New+York+History?pw=4&format=atom" type="application/atom+xml"/>
<link rel="last" href="http://example.com/New+York+History?pw=42299&format=atom" type="application/atom+xml"/>
<entry>
<title>New York History</title>
<link href="http://www.columbia.edu/cu/lweb/eguids/amerihist/nyc.html"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<content type="text">
... Harlem.NYC - A virtual tour and information on
businesses ... with historic photos of Columbia's own New York
neighborhood ... Internet Resources for the City's History. ...
</content>
</entry>
<!-- 9 additional <entry> elements appear here -->
</feed>
XML NamespaceThe OpenSearch Response elements fall under the OpenSearch 1.1 namespace: ElementsThe OpenSearch Response extension aims to define the bare minimum of additional functionality required to provide search results over syndication channels.
The following elements can be added to existing XML-based syndication formats.
In the case of RSS 2.0, these elements are added as children to the
ExtensibilityThe OpenSearch Response format can be extended via the use of standard XML 1.0 namespaces and prefixes.
For example, if Example.com wanted to inform clients of the "color" of a particular search result, then the root element of the result set
would include an namespace declaration of Recommended ExtensionsIn order to provide a consistent representation of search result data, certain common extensions are recommended. In particular, the following are recommended:
LicenseAll components of the OpenSearch 1.1 specification are made available by A9.com subject to the terms of the Creative Commons Attribution-ShareAlike 2.5 License (the License). The License applies only to the OpenSearch specification, and not to any other technology or copyrightable works of A9.com or its affiliates. |
Our services: A9.com Search | A9 Yellow Pages | A9.com Maps
About Us |
What’s New |
Media | Jobs | Feedback | Help
Webmasters & Developers | OpenSearch
Conditions of Use | Privacy Policy © 2003-2006, A9.com, Inc. or its affiliates.