
All SearchMonkey presentation applications are built using a PHP associative array with a particular structure. If the array is missing or malformed, or if your PHP code does not compile, your presentation application cannot display properly. If you include additional array elements beyond the ones listed in this section, these extra elements are ignored.
The associative array supports these keys:
['title'] — A string specifying the search
result's title. If this key is blank or missing, SearchMonkey
displays the default title in the Yahoo! Search Index, usually
extracted from the document's HTML <title>
element.
Although the default title can be accurate, some HTML
<title>s are poorly crafted, contain a lot of
"cruft", or are missing entirely. Optimizing the title is incredibly
important for search relevance. You can use this key to make the
title more compact and readable, or replace the title with something
more suitable.
The title appears at the top of the search result in a larger font, and provides the definitive link to the page itself.
['summary'] — A string specifying the search
result's summary. If this key is blank or missing, SearchMonkey
displays the default summary determined by the Yahoo! Search
Index.
The default summary is hit or miss; sometimes it can be reasonably good, but if you have detailed knowledge about the structure of the page in question, you can often provide a more interesting summary. For example, you could change the summary of a recipe page to display the recipe's ingredients list, rather than the autogenerated summary. On the other hand, the default summary is usually contextual, highlighting the words and phrases from the URL that match the user's query. Research shows that contextual summaries are relevant and help improve the click-through rate, so only replace the default summary if you're certain about its quality and relevance to the user.
The summary appears below the title and to the right of any thumbnail images or supplementary links. If you include a summary and key/value pairs, the key/value pairs start appearing below the summary. Since there are only four lines of room, combining the two often leads to the summary being truncated. If you provide four key/value pairs, the key/value pairs replace the summary entirely.
The maximum length for a summary is 300 characters if only a photo is present, 280 characters if only links are present, and 200 characters if both a photo and links are present.
['image'] — A URL specifying
the image source of a thumbnail image for the search result, with a
maximum width and height of 80px and 60px, repectively. If this key
is blank, missing, or does not specify a valid image file,
SearchMonkey does not display a thumbnail image. You can resize the
image by setting ['src']['image']['allowResize'] to
TRUE.
The thumbnail image appears below the title and to the left of
the links, summary, and key/value pairs. For applications in the
Gallery, the
image src URL must belong to the host of the search result. For
example, if you design an application to work on
wikipedia.org, any images must reside on the host
wikipedia.org. However, you may request non-hosted links
during the approval process. For applications outside the Gallery,
the image src URL may have any host.
['image'] — A string
specifying the ['alt']alt attribute of the thumbnail image. If
this key is or blank or missing, the image has no alt
attribute.
![]() |
Note |
|---|---|
Yahoo! strongly recommends that you provide alt text for your thumbnail images. |
['image'] — A string
specifying the ['title']title attribute of the thumbnail image.
If this key is or blank or missing, the image has no
title attribute.
['image'] — A boolean
value indicating whether SearchMonkey may resize the image to fit
the 80px by 60px pane.['allowResize']
If this key is TRUE, SearchMonkey resizes the
thumbnail image to a height of 60px, keeping the aspect ratio
constant. If the width does not fit after this scaling,
SearchMonkey crops the image, displaying only the first 80
pixels on left side of the image.
If this key is FALSE or missing, SearchMonkey
crops the image to fit the available space. If the image is
larger than 80 x 60, SearchMonkey crops the image to show the
upper left portion. If the image is smaller than 80 x 60,
SearchMonkey centers the image within the 80 x 60 pane.
['links'][ —
A string specifying the text of a supplementary link for the search
result. If this key is missing, but the corresponding
n]['text']['links'][ key is
present, SearchMonkey displays the link text as an abbreviated
version of the URL.n]['href']
Links either provide more detailed information about the item in the search result, or indicate some sort of action the user can take. For example, a result for a camera could include a "Buy this" link and a link to detailed technical specifications, while a result for a person could include a link to download contact information in vcard format.
Links appear below the title and to the left of the summary
and key/value pairs. Your application may include up to four
supplementary links. The integer may range from 0 to 3. The maximum length for link text is
20 characters.n
['links'][ —
A URL specifying a supplementary link for the search result. If this
key is missing, but the corresponding
n]['href']['links'][ key is
present, SearchMonkey displays the text without a link.n]['text']
![]() |
Note |
|---|---|
For Enhanced Result applications, any supplementary URL links must belong to the host of the search result. For Infobar applications, supplementary URL links may have any host. |
['dict'][ — A
string specifying some aspect of the search result. If this key is
missing, SearchMonkey does not display the key/value pair, even if
the corresponding
n]['key']['dict'][ key is
present.n]['value']
In addition to links, SearchMonkey provides each search result
with a small dictionary of key/value pairs, enabling you to call out
terse, structured information about the item in the search result.
For example, a result for a restaurant could include keys for
"Cuisine", "Rating", and "Accepts
Reservations", with values specified by corresponding
['dict'][
entries, such as n]['value']"South Indian", "4/5",
and "No". SearchMonkey automatically separates
key/value pairs with a colon, so there is no need to add one
manually.
![]() |
Tip |
|---|---|
For ratings and reviews, consider using the |
Key/value pairs appear below the title and the summary, and to
the right of any thumbnail images. Your application may include up
to four key/value pairs, which replace the summary from the bottom
up. The integer may
range from 0 to 3. The maximum length for a dictionary key is 15
characters.n
['dict'][ —
A string specifying the value of some aspect of the search result.
If this key is missing, SearchMonkey does not display the key/value
pair, even if the corresponding
n]['value']['dict'][ key is
present.n]['key']
The maximum length for a dictionary value is 60 characters if only a photo is present, 55 characters if only links are present, and 35 characters if both a photo and links are present.
![]() |
Note |
|---|---|
The |
['infobar']['summary'] — A snippet of text that
appears as the summary for the Infobar. If this key is missing,
SearchMonkey uses the standard summary instead.
['infobar']['blob'] — A snippet of HTML that
defines the infobar. You may use a wide array of inline and block
HTML elements to create highly customized Infobar designs. You may
not use Javascript, the style element, iframes, and
certain other elements and attributes If this key is missing,
SearchMonkey uses the other elements of the associative array to
construct the Infobar, according to the rules described
above.
![]() |
Note |
|---|---|
The character limits described in this section are subject to change based on further usability research. |