Overview
The OpenSearch™ Query Syntax 1.0 consists of the the minimal set of arguments that are needed to generate search results.
The OpenSearch Query Syntax is used in an OpenSearch Description document to describe a search URL to a search aggregator (such as A9.com).
A search URL is defined by substituting the macro expansion tags in place of particular arguments.
All tags are optional, and some tags, such as {startIndex} and {startPage} are usually mutually exclusive, depending on the search content provider.
Search aggregators should make no assumptions that the particular arguments are honored by the search content provider, though the search content provider should make every effort to do so if possible.
Search Arguments
| Term | Definition | Comments |
|---|---|---|
{searchTerms} | The terms to be searched for | URL-encoded search terms |
{count} | The desired number of results. | A positive integer |
{startIndex} | The offset, in individual search results, of the first search result | A positive (non-zero) integer |
{startPage} | The offset, in pages of search results, of the first search result | A positive (non-zero) integer |
Examples
The following is a valid search URL for http://koders.com:
-
http://www.koders.com/?s={searchTerms}&p={startPage}&output=rss
The following is a valid search URL for http://indeed.com:
-
http://beta.indeed.com/opensearch?q={searchTerms}&start={startIndex}&limit={count}
The following is a valid search URL for Unto.net AWS Electronics:
-
http://www.unto.net/aws?q={searchTerms}&searchindex=Electronics&flavor=osrss&itempage={startPage}
Results
Search results are expected to be returned in the OpenSearch RSS format. For search content providers that do not offer search results in OpenSearch RSS format, a wrapper must be authored that can perform the transformation.
