Annotating a Hotel offering Rooms with the new schema.org version 3.1

With the version 3.1, schema.org brings a lot of new annotation power to hotels. Previously accommodation providers were able to annotate the core data of their business, like name, phone, address and more, but the newly released version 3.1 brings that to a new level and allows the annotation of rooms, features and services and even lets the accommodation owners annotate their room offers on the website. This article shows how this is done on a short JSON-LD example.

The example starts with the straight forward definition of the hotel with some properties like name, URL, address and others. The property makesOffer requires an Offer which comes with a property itemOffered, which has our special attention here.

The itemOffered requires, as stated in the documentation, either a Product or Service. The alleged problem: HotelRoom is neither. Here schema.org comes up with the concept of Multiple Typed Entities (MTE). One might think now “What is new about that, Hotel itself is an Organization and a Place”, but this is different. In the case of the HotelRoom we have to make a multi typing on the instance level instead of the vocabulary level.

This works simply by setting the @type of our annotated hotel room to HotelRoom AND Product – in the JSON-LD implementation we use an array for that. The rest of the example is straight forward: the room gets a bed, a description, a name and values for occupancy.

{
    "@context": "http://schema.org/",
    "@type": "Hotel",
    "name": "Landgasthof Adler",
    "openingHours": "We-Mo 10:00-20:00",
    "paymentAccepted": "Cash, credit card",
    "url": "http://www.landgasthof-adler.at/",
    "address": {
        "@type": "PostalAddress",
        "addressCountry": "Austria",
        "addressLocality": "Hinterhornbach",
        "addressRegion": "Tirol",
        "postalCode": "6642",
        "streetAddress": "Hinterhornbach 17"
    },
    "makesOffer": {
        "@type": "Offer",
        "availability": "InStock",
        "name": "Enzian Room",
        "itemOffered": {
            "@type": ["HotelRoom", "Product"],
            "bed": {
                "@type": "BedDetails",
                "numberOfBeds": 1
            },
            "description": "Double Room with Shower",
            "name": "Enzian Room",
            "numberOfRooms": 1,
            "occupancy": {
                "@type": "QuantitativeValue",
                "maxValue": 3,
                "minValue": 1
            }
        }
    }
}

For further information about schema.org, follow their blog and brows their GitHub issues.

Becoming An Entity In The Google Knowledge Graph

This website was created for no other purpose than to drive an experiment towards the target of becoming an entity in the google knowledge graph. After an interesting talk an discussion with Andrea Volpini from Redlink and further reading about the topic of becoming an entity in the graph (and here), I decided to do a hands-on myself and try to become an entity.

Two simple steps:

Despite the efforts described in the two articles linked above, I wanted to do as little work as possible, and so I reduced the procedure to just two simple steps:

Creating an entry in freebase

I went to freebase.com, created an account for my person and started to add properties like /common/topic/alias/common/topic/official_website/common/topic/social_media_presence/people/person/date_of_birth and some more.

Creating a simple website and annotating it with schema.org in JSON-LD

I set up a simple wordpress page, consisting of more or less only one static page and a blog, and entered some very basic schema.org annotations in json-ld format.

Extract of my schema.org annotation in json-ld format:

{
  "@context": "http://schema.org/",
  "@type": "Person",
  "name": "Elias Kärle",
  "workLocation": "Innsbruck",
  "url": "http://elias.kaerle.com",
  "image": "elias.jpg",
  "sameAs": [ "https://www.freebase.com/user/eliaska",
    "https://www.facebook.com/elias.kaerle",
    "https://www.twitter.com/eliaska",
    "https://www.instagram.com/eliaskaerle",
    "https://plus.google.com/+EliasKaerle"]
}

As you can see I used the schema.org/Person concept and made excessive use of the “sameAs” property to link all my social channels.

So far, so good, now I will wait to see what happens. Will google really recognize me as an entity after so little “SEO”? I will keep posting here about the progress.