Home » Community » Proposal » Specifications » OpenSearch » Extensions » Advertisement » 1.0 » Draft 1
Contents |
[edit] Notice
This is a draft document for public review.
[edit] Introduction
The OpenSearch Advertisement Extension allows search engines to include advertisements with search results.
Example of a search result that includes an advertisement:
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
xmlns:advertisement="http://a9.com/-/opensearch/extensions/advertisement/1.0/">
<!-- ... -->
<entry>
<!-- ... -->
</entry>
<ad:advertisement>
<ad:callOut atom:type="TEXT">[Ad]</ad:callOut>
<ad:title atom:type="TEXT">20% Off Coffee</ad:title>
<ad:subTitle atom:type="TEXT">Walk in and show us this ad on your phone</ad:subTitle>
<ad:displayUrl atom:type="TEXT">example.com/coffee</ad:displayUrl>
<ad:image ad:id="cprp20" ad:width="170" ad:height="30">
<ad:link href="http://example.com/ads/20_off_coffee.jpg" />
<ad:altText atom:type="TEXT">Click for Cafes Near You</ad:altText>
</ad:image>
<atom:link href="http://example.com/coffee/" />
<ad:id>1234567890</ad:id>
</ad:advertisement>
</feed>
[edit] Namespace
The XML namespace of the OpenSearch Advertisement Extension is:
-
http://a9.com/-/opensearch/extensions/advertisement/1.0/
This namespace and a corresponding namespace prefix must be included when the extension is used in an OpenSearch response.
[edit] Elements
The OpenSearch Advertisement extension introduces the following element and sub-elements.
[edit] The "advertisement" element
The advertisement element is used to specify an advertisement related to the search results. See further in this document for the specifications of sub-elements.
- Requirements: This element may appear zero or more times.
Examples of advertisement elements:
<ad:advertisement>
<ad:callOut atom:type="TEXT">[Ad]</ad:callOut>
<ad:title atom:type="TEXT">20% Off Coffee</ad:title>
<ad:subTitle atom:type="TEXT">Walk in and show us this ad on your phone</ad:subTitle>
<ad:displayUrl atom:type="TEXT">example.com/coffee</ad:displayUrl>
<ad:image ad:id="cprp20" ad:width="170" ad:height="30">
<ad:link href="http://example.com/ads/20_off_coffee.jpg" />
<ad:altText atom:type="TEXT">Click for Cafes Near You</ad:altText>
</ad:image>
<atom:link href="http://example.com/coffee/" />
<ad:id>1234567890</ad:id>
</ad:advertisement>
<ad:advertisement>
<ad:callOut atom:type="TEXT">[Ad]</ad:callOut>
<ad:title atom:type="TEXT">Paris and Nicole: Double Trouble?</ad:title>
<ad:subTitle atom:type="TEXT">Read this and more at example.com</ad:subTitle>
<ad:displayUrl atom:type="TEXT">example.com</ad:displayUrl>
<ad:image ad:id="pn200" ad:width="200" ad:height="40">
<ad:link href="http://example.com/ads/paris_nicole.jpg" />
<ad:altText atom:type="TEXT">Click for Celebrity Gossip</ad:altText>
</ad:image>
<atom:link href="http://example.com/celebs/" />
<ad:id>1234567891</ad:id>
</ad:advertisement>
[edit] The "callOut" sub-element
The callOut sub-element is an atom:text construct used to specify a textual marker that identifies this content as an advertisement.
- Requirements: This element may appear zero or one time.
Examples of callOut elements:
<ad:callOut atom:type="TEXT">[Ad]</ad:callOut>
<ad:callOut atom:type="TEXT">Sponsored Result</ad:callOut>
[edit] The "title" sub-element
The title sub-element is an atom:text construct used to specify the title of the advertisement.
- Requirements: This element may appear zero or one time.
Examples of title elements:
<ad:title atom:type="TEXT">Paris and Nicole: Double Trouble?</ad:title>
<ad:title atom:type="TEXT">20% Off Coffee</ad:title>
[edit] The "subTitle" sub-element
The subTitle sub-element is an atom:text construct used to specify the subtitle text of the advertisement. The subtitle text is positioned underneath the advertisement title.
- Requirements: This element may appear zero or one time.
Examples of subTitle elements:
<ad:subTitle atom:type="TEXT">Read this and more at example.com</ad:subTitle>
<ad:subTitle atom:type="TEXT">Walk in and show us this ad on your phone</ad:subTitle>
[edit] The "displayUrl" sub-element
The displayUrl sub-element is an atom:text construct used to specify the advertisement domain name or URL. This value need not be a valid URL. Most online advertisements display only a domain name as the displayUrl. The displayUrl text is positioned underneath the advertisement subtitle.
- Requirements: This element may appear zero or one time.
Examples of displayUrl elements:
<ad:displayUrl atom:type="TEXT">example.com</ad:displayUrl>
<ad:displayUrl atom:type="TEXT">example.com/coffee</ad:displayUrl>
[edit] The "image" sub-element
The image sub-element is used to specify an image displayed in the advertisement.
- Requirements: This element may appear zero or one time.
| Attribute Name | Attribute Value |
| id | A unique ID for the image advertisement. |
| width | The integer width of the image. |
| height | The integer height of the image. |
| Sub-element Name | Sub-element Value |
| link | An Atom Link element used to specify the link to an image to display in the advertisement. |
| altText | An atom:text construct used to specify the alternate text for the image displayed in the advertisement. |
Examples of image elements:
<ad:image ad:id="pn200" ad:width="200" ad:height="200"> <ad:link href="http://example.com/banners/paris_nicole_200px.jpg" /> <ad:altText atom:type="TEXT">Click for Celebrity Gossip</ad:altText> </ad:image>
[edit] Authors
Gail Rahn Frederick, Damon Lanphear and Michael "Luni" Libes <opensearch@medio.com> (Medio Systems)
[edit] License
This document is made available by Medio Systems subject to the terms of the Creative Commons Attribution-ShareAlike 3.0 License.