SearchMonkey > Start Overview > Local

Local - Display phone numbers, addresses, and other local info

Example

Description

Display local listing information directly in Yahoo! Search. Add code to indicate to Yahoo! that a local listing exists on your page, and when we next crawl your site, we'll take care of the rest. From your markup, we’ll be able to extract structured data from your site and render it automatically in an enhanced result in search results.

Details

  • Types of content permitted: businesses, organizations, and points of interest.
  • How soon after I add my markup will I see my enhanced result appear? Assuming your markup is correct, your enhanced result will appear after Yahoo! recrawls your page; this can take between a few days and a few weeks depending on your site.

Get Started

1. Add code / markup to your site

Copy this code and replace the example text with your data to see enhanced local listing information in Yahoo! Search.

  • Use RDFa markup to embed local listing metadata directly in your markup. You can provide the local listing's name, address, picture, rating, and more.
  • Use hcard and hreview microformat markup for an alternative way to display address and review information in Yahoo! Search.
  • Use DataRSS XML to send your data to Yahoo! privately, using a feed. Once you have constructed your DataRSS feed, you must submit the feed to Yahoo!.

RDFa

Example 1

<div typeof="vcard:VCard commerce:Business"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:commerce="http://search.yahoo.com/searchmonkey/commerce/">

     <span property="rdfs:label vcard:fn">Parcel 104</span>

     <div rel="vcard:adr">
       <div typeof="vcard:Address">
         <span property="rdfs:label">2700 Mission College Blvd, Santa Clara, CA 95054</span>
       </div>
     </div>

     <span property="vcard:tel">+1 408 970-6104</span>
 </div>

NOTE: Your local listing code might vary

Example 2

<div typeof="vcard:VCard commerce:Business"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:commerce="http://search.yahoo.com/searchmonkey/commerce/"
    xmlns:review="http://purl.org/stuff/rev#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">

     <span property="rdfs:label vcard:fn">Parcel 104</span>

     <span property="rdfs:comment">
         A collaborative venture of renowned chefs, Bradley Ogden and 
         Robert Sapirman. The American-themed menu celebrates seasonal 
         delights and showcases the finest efforts of local growers, 
         ranches and dairies.
     </span>

     <div rel="vcard:adr">
         <div typeof="vcard:Address">
             <!-- If address is not available in parsed form, use rdfs:label as seen in Example 1 -->
             <span property="vcard:street-address">2700 Mission College Blvd</span>
             <span property="vcard:locality">Santa Clara</span>
             <span property="vcard:region">CA</span>
             <span property="vcard:postal-code">95054</span>
             <span property="vcard:country-name">United States</span>
         </div>
     </div>

     <span property="vcard:tel">1 408 970-6104</span>

     <div rel="vcard:geo">
         <span property="vcard:latitude" datatype="xsd:float">37.392326</span>
         <span property="vcard:longitude" datatype="xsd:float">-121.974426</span>
     </div>


     <span rel="vcard:photo">
         <img src="http://example.com/restaurant.jpg"/>
     </span>

     <a rel="vcard:url" href="http://www.parcel104.com">Parcel 104</a>

     <!-- Review -->
     <div rel="review:hasReview">
         <div typeof="review:Review">
             Rated <span property="review:rating" datatype="xsd:float">3.5</span> on a scale of
             <span property="review:minRating" datatype="xsd:integer">1</span> to
             <span property="review:maxRating" datatype="xsd:integer">5</span>
             Rated <span property="review:totalRatings" datatype="xsd:integer">14</span> times.
         </div>
     </div>

     <span property="commerce:hoursOfOperation">Breakfast daily, Lunch Mon.-Fri., Dinner Mon.-Sat.</span>
     <span property="commerce:priceRange">3</span>
     <span property="commerce:parkingOptions">Valet parking &amp; parking lot</span>
     <span property="commerce:attire">Business casual</span>
     <span property="commerce:businessCategory">Restaurants, American Restaurants</span>
     <span property="commerce:cuisine">American</span>
 </div>

This metadata will be available in SearchMonkey and Yahoo! Search BOSS for further use. For more information, refer to the RDFa specification or the RDFa wiki.

NOTE: To validate your markup with RDFa attributes, use this W3C DOCTYPE:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

Microformats

Example 1

<div class="vcard">
   <div class="fn org summary">Parcel 104</div>
   <span class="adr">
       <span class="street-address">2700 Mission College Blvd</span>,
       <span class="locality">Santa Clara</span>,
       <span class="region">CA</span>
       <span class="postal-code">95054</span>,
   </span>
   <span class="tel">+1 408 970-6104</span>;
</div>

This is the minimum markup you need to display local listing information on your page when that page turns up in search results.

Example 2

<div class="hreview">
  <div class="item vcard">
      <div class="fn org summary">Parcel 104</div>
      <span class="adr">
          <span class="street-address">2700 Mission College Blvd</span>,
          <span class="locality">Santa Clara</span>,
          <span class="region">CA</span>
          <span class="postal-code">95054</span>,
      </span>
      <img class="photo" alt="Parcel 104 exterior" src="http://www.parcel104.com/wp-content/uploads/2009/03/photo175.jpg"/>
      <span class="tel">+1 408 970-6104</span>;
      <a class="url" href="http://www.parcel104.com">parcel104.com</a>

    <div class="geo">
      <abbr class="latitude" title="37.408183">51.514828</abbr>
      <abbr class="longitude" title="-122.13855">-0.122604</abbr>
    </div>
  </div>
  <div class="hreview haggregatereview">
      Rated <span class="rating">4.5</span> out of <span class="best">5</span> stars based on <span class="num"> 29</span>ratings.        
  </div>
  <div class="description"><p>
      Parcel 104 is a collaborative venture of renowned chefs,  Bradley Ogden and Robert Sapirman. The American-themed menu celebrates seasonal delights and showcases the finest efforts of local growers, ranches and dairies.
  </p></div>
</div>

This is the minimum markup you need to display local listing information on your page when that page turns up in search results.

DataRSS XML

Example 1

<y:adjunct version="1.0" name="YOURID" xmlns:y="http://search.yahoo.com/datarss/">
  <y:item rel="dc:subject">
      <y:type typeof="vcard:VCard commerce:Business">
          <y:meta property="rdfs:label vcard:fn">Parcel 104</y:meta>
          <y:meta property="rdfs:comment"> A collaborative venture of renowned chefs, Bradley
              Ogden and Robert Sapirman. The American-themed menu celebrates seasonal delights and
              showcases the finest efforts of local growers, ranches and dairies. </y:meta>
          <y:meta property="commerce:hoursOfOperation"> Breakfast daily, Lunch Mon.-Fri., Dinner
              Mon.-Sat. </y:meta>

          <y:meta property="commerce:priceRange">3</y:meta>
          <y:meta property="commerce:priceRangeHighest">5</y:meta>
          <y:meta property="commerce:paymentOptions">Credit Cards</y:meta>
          <y:meta property="commerce:parkingOptions">Valet parking & parking lot</y:meta>
          <y:meta property="commerce:attire">Business casual</y:meta>
          <y:meta property="commerce:businessCategory">Restaurants, American Restaurants</y:meta>
          <y:meta property="commerce:cuisine">American</y:meta>

          <y:item rel="vcard:adr">
              <y:type typeof="vcard:Address">
              <!-- If address is not available in parsed form, use rdfs:label and supply the address as a single string -->

                  <y:meta property="vcard:street-address">2700 Mission College Blvd</y:meta>
                  <y:meta property="vcard:locality">Santa Clara</y:meta>
                  <y:meta property="vcard:region">CA</y:meta>
                  <y:meta property="vcard:postal-code" datatype="xsd:integer">95054</y:meta>
                  <y:meta property="vcard:country-name">United States</y:meta>
              </y:type>
          </y:item>

          <y:item rel="vcard:geo">
              <y:meta property="vcard:latitude" datatype="xsd:float">...</y:meta>
              <y:meta property="vcard:longitude" datatype="xsd:float">...</y:meta>
          </y:item>

          <y:item rel="vcard:url" resource="http://www.parcel104.com"/>

          <y:meta property="vcard:tel">+1 408 970-6104</y:meta>

          <y:item rel="review:hasReview">
              <y:type typeof="review:Review">
                  <y:meta property="review:rating" datatype="xsd:integer">5</y:meta>
                  <y:meta property="review:minRating" datatype="xsd:integer">1</y:meta>
                  <y:meta property="review:maxRating" datatype="xsd:integer">5</y:meta>
                  <y:meta property="review:totalRatings" datatype="xsd:integer">1</y:meta>
                  <y:meta property="review:positiveVotes" datatype="xsd:integer">12</y:meta>
                  <y:meta property="review:totalVotes" datatype="xsd:integer">13</y:meta>
              </y:type>
          </y:item>
      </y:type>
  </y:item>
</y:adjunct>

This markup would be included in a DataRSS feed.

2. Validate your markup

Test your markup to make sure your enhanced result will appear.

3. Wait until we recrawl your site for your enhanced result to appear on the search results page

This can take up to a few weeks depending on your site.

Copyright © 2009 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy | Terms of Service

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions