schema.orgstructured-datagoogle-knowledge-graph

schema.org restaurant menu - describing an individual dish


Is there a way to describe the properties of each dish in a restaurantmenu?

These fields in particular: name, description, price

Or does one have to pray that google interprets the data correct when you have indicated the url of the menu in the restaurant properties?


Solution

  • The vocabulary Schema.org does not (yet) offer a type for representing restaurant menus or single menu items.

    Their menu property expects text or URL as value. If there should ever be a type for menus, it would become another expected value.

    The issue Extension Proposal: FoodProduct and Restaurant Menu with FoodProducts. asked for this. It got closed, referencing the broader issue Create a new Food type (help further with foodWarning and recipeIngredient). It’s still under discussion.

    If you need something now, you could use the hasOfferCatalog property that references an OfferCatalog type (representing the menu, or grouped parts of the menu) and the Offer type (representing a single menu item, with a price).

    For example:

    <div vocab="http://schema.org/" typeof="Restaurant">
      <section property="hasOfferCatalog" typeof="OfferCatalog">
        <h1 property="name">Menu</h1>
        <ul>
    
          <li property="itemListElement" typeof="Offer">
            <b property="name">Bread</b> – 
            <span property="price">1.50</span>
            <meta property="priceCurrency" content="EUR" />
          </li>
    
          <li property="itemListElement" typeof="Offer">
            <b property="name">Water</b> – 
            <span property="price">1.00</span>
            <meta property="priceCurrency" content="EUR" />
          </li>
    
        </ul>
      </section>
    </div>
    

    If you want to use the menu property, too, you could add a div that encloses the OfferCatalog. The value for menu would then be the textual content.

    <div vocab="http://schema.org/" typeof="Restaurant">
      <div property="menu">
        <section property="hasOfferCatalog" typeof="OfferCatalog">
          <!-- … -->
        </section>
      </div>
    </div>