Navigation
gr_banner_small.png
GoodRelations is a standardized vocabulary for product, price, and company data that can be embedded into existing static and dynamic Web pages.

Project Main Page
Vocabulary
Documentation
Developer's Wiki
GoodRelations Cookbook

Introduction

2010-11-02: BREAKING NEWS: Google now officially supports GoodRelations

See http://www.heppresearch.com/gr4google for more information and a recipe

This page will be updated shortly.




old page content:


2010-02-25: If you use the Magento shop software, there is now a free extension to use GoodRelations for SEO automatically.

2009-12-16: Breaking news: It seems that Google is now showing GoodRelations price information in the search results!

2009-12-10: We removed the recipes using XML entity definitions for shortening the mark-up, because that is unlikely to work on a Web scale.

2009-10-30: You can see how your page would look like in Google+GoodRelations using the iGoogr application at http://igoogr.appspot.com/

2009-07-30: Changed all <div> elements in the RDFa parts to <span> in order to avoid extra blank lines in the rendering of such pages.


On this page, we describe proper patterns that can be used by companies for embedding

  • contact details,
  • opening hours,
  • individual products, and
  • pricing information

in their Web pages using the RDFa syntax and the GoodRelations vocabulary.

While Google has recently announced to consider RDFa meta-data for improved search results, details expressed using the GoodRelations vocabulary is currently not included in the output.

However, there are numerous innovative applications and services that will display GoodRelations meta-data if available.

The current main purpose of this page is

  • to allow Google staff to check that the proposed recipes for such data are compliant with all current Google content policies, and
  • to train Web designers and SEO experts in creating GoodRelations meta-data.


Overview

There are two ways of using RDFa with existing content:

a) Reusing existing text and values at their original position

Example:

<xml> ... <body> +49-89-6004-0 </body> ... </xml>

b) Embedding additional meta-data in the same document, but detached from the human-readable content

Example:

<xml> ... <body> Phone: +49-89-6004-0

... </body> </xml>

The advantage of a) is that updating the human-readable content means automatically updating the associated meta-data. The downside is that mixing the data level and the presentation level can create complicated mark-up. Also, it is impossible to create generic tools that provide the mark-up for easy copy-and-paste.

The advantage of b) is that it is easy to create generic tools that provide the mark-up for easy copy-and-paste, which will help assist users in creating respective mark-up.

Describing a business and its opening hours

Example 1: Reusing existing text and values at their original position

http://www.heppnetz.de/rdfa4google/company.html <xml> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: A Company or Shop</title>
 </head>
 <body xmlns:gr="http://purl.org/goodrelations/v1#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
   xmlns:foaf="http://xmlns.com/foaf/0.1/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema#">

This page is part of a demo of how a small business can feed its contact etc. descriptions into the Web of Linked Data, while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen, <a href="http://www.unibw.de/ebusiness/">www.unibw.de/ebusiness/</a>.

     
     
       <img src="logo.png" alt="Company Logo"/>
     
     
Hepp Space Ventures Inc.
Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example.
Address of our main office:
         1234 Hepp Road,
         85577
         Neubiberg,
         Bavaria,
         Germany.
     Phone: +49-89-6004-0
       
       
     Web: <a rel="vcard:url foaf:page" href="http://www.heppnetz.de/">www.heppnetz.de</a>
     
           
           
         
Opening Hours: Mon-Fri 10-6, Sat 10-4.30
             
             
         
             
             
           
     <a href="http://www.heppnetz.de/rdfa4google/product.html">Link to Personal SCSI offer</a>
 </body>

</html>

</xml>

Example 2: Embedding additional meta-data in the same document, but detached from the human-readable content

http://www.heppnetz.de/rdfa4google/company-tool.html

<xml> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: A Company or Shop - Machine-based</title>
 </head>
 <body>

This page is part of a demo of how a small business can feed its contact etc. descriptions into the Web of Linked Data, while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen, <a href="http://www.unibw.de/ebusiness/">www.unibw.de/ebusiness/</a>.

     <img src="logo.png" alt="Company Logo"/>
     
Hepp Space Ventures Inc.
Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example.
Address of our main office:
1234 Hepp Road, 85577 Neubiberg, Bavaria, Germany.
Phone: +49-89-6004-0
Web: <a href="http://www.heppnetz.de/">www.heppnetz.de</a>

Opening Hours: Mon-Fri 10-6, Sat 10-4.30
<a href="http://www.heppnetz.de/rdfa4google/product.html">Link to Personal SCSI offer</a>
     
       
       
       
       
         
           
           
           
           
           
         
       
       
       
         
         
       
       
       
       
         
           
           
             
             
           
           <span property="rdfs:comment" content="Opening Hours: Mon-Fri 10-6, Sat 10-4.30"/>
           
             
               
               
               
               
               
               
               
             
           
           
             
               
               
               
             
           
         
       
     
 </body>

</html>

</xml>

Describing a product and its pricing

In the following we show how product details and prices can be embedded as additional meta-data in the same document, but detached from the human-readable conten.

For describing products, this approach is often a lot simpler, because the order and structure of the presentation is often quite different from the underlying data.

The file is available on the Web at

http://www.heppnetz.de/rdfa4google/product.html

<xml> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: A Product Detail Page</title>
 </head>
 <body>

This page is part of a demo of how a small business can feed its product and offer descriptions into the Web of Linked Data, while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen, <a href="http://www.unibw.de/ebusiness/">www.unibw.de/ebusiness/</a>.

     Price: 34.99 USD
Product Name: Personal SCSI 16-bit SCSI Controller
Description: This low-cost, high-performance SCSI controller allows you to connect up to seven professional mass-storage devices to your computer.
EAN/UPC code: 0000010363780
Article number: 10363780
<img src="pscsi.jpg" alt="Product Image"/>
Product Reviews:
Average: 4.5, lowest: 0, highest: 5 (total number of reviews: 45)
<a href="http://www.heppnetz.de/rdfa4google/company.html">Link to the main company page</a>
<a href="http://www.heppnetz.de/rdfa4google/company-tool.html">Link to the main company page (tool-variant)</a>
     
       
       
       
       
       
       
       
         
         
         
       
       
       
       
         
           
           
           
             
               
               
               
               
               
               
             
               
                 
                 
                 
                 
               
             
           
         
       
     
   

</body> </html> </xml>

Getting less verbose mark-up

As per request by Google, we tried to simplify and shorten the recommended mark-up. This sections gives some examples on how that can be achieved.

Opening Hours in Tabular Form

http://www.heppnetz.de/rdfa4google/openinghours.html

a) XHTML+RDFa <xml> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>Martin Hepp's Demo Page for Google+GoodRelations+RDFa: Opening Hours</title>
 </head>
 <body xmlns:gr="http://purl.org/goodrelations/v1#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
   xmlns:foaf="http://xmlns.com/foaf/0.1/">

This page is part of a demo of how a small business can feed its contact etc. descriptions into the Web of Linked Data, while staying compatible with Google.

Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen, <a href="http://www.unibw.de/ebusiness/">www.unibw.de/ebusiness/</a>.

     
     Hepp Space Ventures Inc.
     
Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example. Phone: +49-89-6004-0
       
       
     Web: <a rel="vcard:url foaf:page" href="http://www.heppnetz.de/">www.heppnetz.de</a>
     
Fort Myers Beach Shop
         

Opening Hours:
Mondays 08:00 18:00
Tuesdays 08:00 18:00
Wednesdays 08:00 14:00
Thursdays 08:00 18:00
Fridays 08:00 20:00
Saturdays 09:00 15:00
 </body>

</html> </xml>

b) N3

@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xhv: <http://www.w3.org/1999/xhtml/vocab#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .


<http://www.heppnetz.de/rdfa4google/openinghours.html#business> a gr:BusinessEntity ;
     rdfs:label "Hepp Space Ventures Inc."@en ;
     gr:hasPOS <http://www.heppnetz.de/rdfa4google/openinghours.html#myshop> ;
     gr:legalName "Hepp Space Ventures Inc."@en ;
     foaf:page <http://www.heppnetz.de/>, <http://www.heppnetz.de/rdfa4google/openinghours.html> ;
     vcard:fn "Hepp Space Ventures Inc."@en ;
     vcard:geo
         [ vcard:latitude "48.0802626"^^xsd:float ;
             vcard:longitude "11.6407428"^^xsd:float
         ] ;
     vcard:tel "+49-89-6004-0"^^xsd:string ;
     vcard:url <http://www.heppnetz.de/> .

<http://www.heppnetz.de/rdfa4google/openinghours.html#fri> a gr:OpeningHoursSpecification ;
     gr:closes "20:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Friday ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#mon> a gr:OpeningHoursSpecification ;
     gr:closes "18:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Monday ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#myshop> a gr:LocationOfSalesOrServiceProvisioning ;
     gr:hasOpeningHoursSpecification
         <http://www.heppnetz.de/rdfa4google/openinghours.html#fri>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#mon>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#sat>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#thu>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#tue>,
         <http://www.heppnetz.de/rdfa4google/openinghours.html#wed> .

<http://www.heppnetz.de/rdfa4google/openinghours.html#sat> a gr:OpeningHoursSpecification ;
     gr:closes "15:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Saturday ;
     gr:opens "09:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#thu> a gr:OpeningHoursSpecification ;
     gr:closes "18:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Thursdays ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#tue> a gr:OpeningHoursSpecification ;
     gr:closes "18:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Tuesday ;
     gr:opens "08:00:00"^^xsd:time .

<http://www.heppnetz.de/rdfa4google/openinghours.html#wed> a gr:OpeningHoursSpecification ;
     gr:closes "14:00:00"^^xsd:time ;
     gr:hasOpeningHoursDayOfWeek gr:Wednesday ;
     gr:opens "08:00:00"^^xsd:time .