GoodRelations as part of

The GoodRelations Cookbook
Recipe GoodRelations as part of
Description Using GoodRelations from the namespace
Status mature
Level intermediate
Tags, microdata, seo, rdfa
See also Microdata, GoodRelations and

Breaking News - November 8, 2012:GoodRelations is the new, official e-commerce core for

For over a year now, we have been working with the sponsors, namely Google, Yahoo, Bing, and Yandex, on the integration of GoodRelations into the core. This will mean that you can use the full expressivity of GoodRelations directly from the namespace in Microdata syntax. Today, that addition has been officially published on the servers. This brings the full thrust of having the four biggest search engines behind it to the adoption of GoodRelations for exposing rich e-commerce data directly from shop pages and datasheets.

For more information on why this is important, see the article GoodRelations for Semantic SEO.

On this page, we will provide examples of this usage.

Note: will be one additional syntactical form of using GoodRelations for your site. GoodRelations will remain an independent vocabulary, and usable in RDFa and other RDF syntaxes. The original namespace of GoodRelations will remain the primary location. In particular, consumers of GoodRelations data will be able to execute SPARQL queries using the original GoodRelations namespace and identifiers, because the next service release of GoodRelations will include all necessary mappings.


We were looking for a way of making the rich GoodRelations conceptual model be usable as a direct extension of so that Webmasters would not have to choose between and GoodRelations but could instead use both the basic patterns and the advanced GoodRelations patterns from the same namespace.


The basic approach for the integration is as follows:

  • All GoodRelations classes and properties that do not yet exist in have been added to For example, the GoodRelations class becomes also a class with the identifier
  • GoodRelations will include mapping axioms so that an RDF environment with minimal reasoning support (rdfs:subclassOf, rdfs:subPropertyOf, owl:equivalentClass, owl:equivalentProperty, owl:sameAs) can operate on the data purely from the GoodRelations namespace.
  • Enumerations, i.e. individuals/instances of GoodRelations will be used from the original GoodRelations namespace using the extension mechanism for external enumerations. This reduces the amount of entries that have to be added to A list of the respective GoodRelations elements is here.
  • For a few classes and properties, the local part of the name may differ in the namespace. This was necessary in order to keep a consistent naming convention in The names in GoodRelations remain unchanged to avoid breaking older data and older clients. A list of naming differences will be provided on this page.
  • For legal reasons, cannot contain elements for modeling licensing conditions, because site-owners may try to use them to express complex licensing terms for the use of their content by search engines, which cannot be properly handled by Web-scale crawlers. Thus, the class gr:License from GoodRelations is not available from the namespace. If you want to use gr:License, use GoodRelations in its original namespace or use the additionalType property in combination with the full URI the main itemtype
  • The upcoming GoodRelations class gr:PropertyValue and the dependent properties gr:feature, gr:propertyName, gr:propertyValue, and gr:unitText will likely not be included in the first release of the integration.
  • The gr:category is not included in the first integration step.


Offer with Delivery Charges and Business Function

The following example shows how an entity of type can be augmented using the granular pricing elements of GoodRelations for indicating shipping charges. It also shows the usage of business functions that define the bundle of rights you will obtain on the product.

<div itemscope itemtype="" itemid="#offer">
<div itemprop="name">Hepp Personal SCSI Controller Card</div>
<div itemprop="description">The Hepp Personal SCSI is a 16-bit add-on card that allows
attaching up to seven SCSI devices to your computer.</div>
<link itemprop="businessFunction"
href="" />
<!-- Unit price -->
<div itemscope itemprop="priceSpecification"
<meta itemprop="priceCurrency" content="EUR">Euro:
<span itemprop="price">99.99</span>
<time itemprop="validThrough"
<!-- Shipment fees -->
Delivery costs to
<div itemscope itemprop="priceSpecification"
<meta itemprop="eligibleRegion" content="DE">Germany:
<meta itemprop="priceCurrency" content="EUR">Euro:
<span itemprop="price">10.00</span>
<link itemprop="appliesToDeliveryMethod"
href="" />(via UPS)
<!-- other offer properties follow here -->

Observe the following details:

1. Some property names differ slightly between the GoodRelations namespace and the namespace:

hasBusinessFunction businessFunction
hasCurrency priceCurrency
hasCurrencyValue price
hasPriceSpecification priceSpecification

2. The enumerations, i.e. the instances of the classes like gr:BusinessFunction and gr:DeliveryMethod are used directly from the GoodRelations namespace. Since does typically not define lists of enumerations, that seems like the favorite way of adding support for those. So instead of, as one may assume:

<div itemscope itemtype="" itemid="#offer">
<link itemprop="businessFunction" href="" />

we use for such enumerations.

<div itemscope itemtype="" itemid="#offer">
<link itemprop="businessFunction" href="" />

Rent Videos for 30 days

We use with the business function LeaseOut and the validity of the lease will be encoded using the eligibleDuration property:

<!-- Some copies of that title -->
<div itemprop="about" itemscope itemtype="" itemid="#video">
<link itemprop="type" href="" />
<h1 itemprop="name">Pirates of the Carribean: On Stranger Tides (2011)</h1>
<span itemprop="description">Jack Sparrow and Barbossa embark on a quest to
find the elusive fountain of youth, only to discover that Blackbeard and
his daughter are after it too.</span>
<a itemprop "model" href="">
More information on</a>
<!-- The offer to sell a copy of the video -->
<div itemprop="offers" itemscope itemtype="">
<link itemprop="businessFunction" href="" />
Price: <div itemprop="priceSpecification" itemscope
<span itemprop="price">3.99</span>
<meta itemprop="priceCurrency" content="USD">
<time itemprop="validThrough"
Delivery: <link itemprop="availableDeliveryMethod"
href="" /> Download
Validity of the lease: <div itemprop="eligibleDuration" itemscope
<span itemprop="value">30</span>-
<meta itemprop="unitCode" content="DAY" >days

Naming Differences


  • schema:Offer = gr:Offering
  • schema:IndividualProduct = gr:Individual
  • schema:ParcelService = gr:DeliveryModeParcelService
  • schema:Place = gr:Location
  • schema:ProductModel = gr:ProductOrServiceModel
  • schema:CreditCard = gr:PaymentMethodCreditCard
  • schema:Product = gr:ProductOrService
  • schema:SomeProducts = gr:SomeItems

Object Properties

  • schema:priceSpecification = gr:hasPriceSpecification
  • schema:businessFunction = gr:hasBusinessFunction
  • schema:eligibleCustomerType = gr:eligibleCustomerTypes
  • schema:manufacturer = gr:hasManufacturer
  • schema:warrantyScope = gr:hasWarrantyScope
  • schema:inventoryLevel = gr:hasInventoryLevel
  • schema:dayOfWeek = gr:hasOpeningHoursDayOfWeek
  • schema:brand = gr:hasBrand
  • schema:itemOffered = gr:includes
  • schema:makesOffer = gr:offers
  • schema:availableDeliveryMethod = gr:availableDeliveryMethods
  • schema:openingHoursSpecification = gr:hasOpeningHoursSpecification
  • schema:eligibleQuantity = gr:hasEligibleQuantity
  • schema:warranty = gr:hasWarrantyPromise
  • schema:image =
  • schema:acceptedPaymentMethod = gr:acceptedPaymentMethods

A special case is

  • schema:durationOfWarranty

This used to be gr:durationOfWarrantyInMonths in GoodRelations but will be updated to match the new name and range from shortly.

Datatype Properties

  • schema:minPrice = gr:hasMinCurrencyValue
  • schema:unitCode = gr:hasUnitOfMeasurement
  • schema:isicV4 = gr:hasISICv4
  • schema:gtin8 = gr:hasGTIN-8
  • schema:maxPrice = gr:hasMaxCurrencyValue
  • schema:gtin14 = gr:hasGTIN-14
  • schema:maxValue = gr:hasMaxValue
  • schema:mpn = gr:hasMPN
  • schema:value = gr:hasValue
  • schema:model = gr:hasMakeAndModel
  • schema:gtin13 = gr:hasEAN_UCC-13
  • schema:globalLocationNumber = gr:hasGlobalLocationNumber
  • schema:naics = gr:hasNAICS
  • schema:priceCurrency = gr:hasCurrency
  • schema:sku = gr:hasStockKeepingUnit
  • schema:duns = gr:hasDUNS
  • schema:minValue = gr:hasMinValue
  • schema:eligibleRegion = gr:eligibleRegions

Other Differences

  • The offers property has a different meaning in, since it links from the product to respective offers, while in GoodRelations, it links from a gr:BusinessEntity to its offers.

Additional Materials