v1 目录架构

食品目录 Feed 基于 schema.org DataFeed 实体。食品目录 Feed 包含餐馆语言区域详细信息(如餐馆地址、菜单和位置)以及餐馆的服务详细信息(如运费、配送区域和下文中指定的其他项)。

DataFeed 包含一组元素,其中每个元素表示一项在 schema.org 词汇表中表示的项。您可以使用 DataFeed 类型以 JSON-LD 格式发布所有结构化数据。

如需了解如何使用此规范构建 Feed,请参阅商品目录集成概览

日期和时间格式

DateTime 基于 schema.org 类型,除非另有说明,否则必须遵循 ISO 8601 格式,并包含日期、时间和时区。对于 DateTime,请使用以下语法:

// DateTime format:
YYYY-MM-DDTHH:MM:SS[∓HH:MM|Z]

例如:

2017-05-01T06:30:00-07:00 // UTC minus 7 hours
2017-05-01T06:30:00Z  // UTC time zone. The optional "Z" suffix represents the UTC time zone.

Time 是指定餐厅或服务地点所在时区的本地时间,也基于 schema.org 类型,并且必须遵循 ISO 8601 格式。时间使用以下语法:

// Time format:
THH:MM:SS

例如:

T08:08:00 // 8:08 AM

每当您指定 DateTimeTime 时,都请注意以下事项:

  • 时间前的“T”前缀是格式的一部分,是必需的。
  • 必须为 DATETIME 指定时区。TIME 不需要。
  • 必须为餐馆或服务指定的当地时间指定时间。

信包

任何食品目录 Feed 的起始代码都应包含一个“信封”部分。

“信封”是每个 Feed 的顶级结构,必须是具有以下属性的 DataFeed

媒体资源 类型 必要性 说明
@context 网址 必需 使用的上下文;通常为“http://schema.googleapis.com”。
@type 文字 必需 始终为“DataFeed”。
dateModified DateTime 必需

数据 Feed 的上次修改的 DateTime,采用 ISO 8601 格式。

此 Feed 中商品的修改日期和时间(采用 ISO_OFFSET_DATE_TIME 格式)。如果缺少此字段,系统会假定更新时间是在 Google 服务器上收到(或进行抓取)消息的时间。

如果您同时使用推送和抓取,我们强烈建议您实现此行为。应以时区和毫秒为粒度指定此时间戳;例如“2016-12-28T06:30:00:123-07:00”。

在批量 Feed 中,实体版本控制是通过 Feed 信封中的 dateModified 字段确定的。

dataFeedElement MenuRestaurantService 的数组 必需 此 Feed 中的一件或多件商品。如需了解详情,请参阅下文。

以下示例展示了该信封:

示例

{
  "@context": "http://schema.googleapis.com",
  "dateModified": "2016-12-28T06:30:00:123-07:00",
  "@type": "DataFeed",
  "dataFeedElement": [
    /* All items that are part of this feed go here */
  ]
}

AdditiveDetails

要使用此类型,请添加 gs1 上下文:"@context": ["http://gs1.org/voc/", "http://schema.org"]

然后,将 FoodBeverageTobaccoProduct 添加到相应 MenuItemMenuItemOption 的类型。

下表介绍了 AdditiveDetails 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“AdditiveDetails”。
additiveName 文字 选填 添加项的名称。
additiveLevelOfContainment 文字 选填 根据 gs1:LevelOfContainmentCode 的包含代码。 例如 http://gs1.org/voc/LevelOfContainmentCode-CONTAINShttp://gs1.org/voc/LevelOfContainmentCode-FREE_FROMhttp://gs1.org/voc/LevelOfContainmentCode-MAY_CONTAIN

以下示例展示了 AdditiveDetails 类型的用法:

{
  "@type": ["MenuItem", "FoodBeverageTobaccoProduct"],
  "@id": "http://www.example.com/bar/menuitem/8",
  "name": "Energy Drink",
  "description": "A 0.25l can of energy drink.",
  "offers": {
    "@type": "Offer",
    "sku": "offer-energy-drink",
    "price": "3.49",
    "priceCurrency": "USD"
  },
  "additive": [
    {
      "@type": "AdditiveDetails",
      "additiveName": "caffeine",
      "additiveLevelOfContainment":
        "http://gs1.org/voc/LevelOfContainmentCode-CONTAINS"
    },
    {
      "@type": "AdditiveDetails",
      "additiveName": "phosphate",
      "additiveLevelOfContainment":
        "http://gs1.org/voc/LevelOfContainmentCode-CONTAINS"
    }
  ]
},

AddOnMenuItem

MenuItem 的附加菜单项中列出的食品或饮料。

下表列出了 AddOnMenuItem 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“AddOnMenuItem”。
@id 网址 必需 附加菜单项的唯一标识符。
name 文字 必需 在用户浏览菜单时用于标识 AddOnMenuItem 的文本。
description 文字 选填 附加菜单项的说明。
image 网址 选填

符合以下准则的插件菜单项的图片:

  • 宽高比:3:2
  • >
  • 最低分辨率为 600x400 像素,72 dpi
  • >
  • 推荐分辨率:1400x960 像素,72 dpi
offers Offer 的数组 必填*

提供此 AddOnMenuItem 的一个或多个优惠。

说明此 AddOnMenuItem 何时可用以及以什么价格提供。每个时间只能有一个优惠有效。如果价格或库存状况会随时段而变化,您可以有多个有效优惠。如果插件或商品因基本属性或附加项本身的变体而异(例如作为插件的小菜、中菜和大薯条),请使用 hasMenuItemOption 属性。

Offer.eligibleQuantity 的默认值为 0,最大值为 1。

AddOnMenuItem 中会使用以下 Offer 属性:

  • 需要达到 Offer.sku
  • 需要达到 Offer.price
  • 需要达到 Offer.priceCurrency
  • 可选的 Offer.availabilityStarts
  • 可选的 Offer.availabilityEnds
  • 可选的 Offer.availableDay
  • 可选的 Offer.validFrom
  • 可选的 Offer.validThrough
  • 可选的 Offer.eligibleQuantity
  • 可选的 Offer.inventoryLevel
hasMenuItemOptions MenuItemOption 的数组 必填*

基本属性数组,用于描述此附加菜单项的附加项本身的变体(例如,作为附加项的小型、中型和大号薯条)。使用选项指定此附加菜单项可用的各种变体。以下两种情况会发生这种情况:

  • 基本变体取决于附加菜品本身(例如作为附加项的小型、中型和大号薯条)
  • 与此插件相关联的菜单项的基本变体(例如,作为大号披萨的插件额外添加奶酪)
suitableForDiet RestrictedDiet 的数组 选填 菜肴符合所述的饮食禁忌(如“无麸质饮食”或“素食饮食”)。这是可能的值的枚举列表。
nutrition NutritionInformation 选填 菜肴的营养信息,最主要是卡路里。
menuAddOn AddOnMenuSection 的数组 选填 AddOnMenuItem 可以有一个菜单部分,其中包含可作为插件添加的允许项。

下面的示例显示了 AddOnMenuItem

示例 1

{
  "@type": "AddOnMenuSection",
  "@id": "https://www.example.com/1089/addon/1",
  "name": "AddOnCheese",
  "hasMenuItem": [
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/a",
      "name": "Swiss",
      "offers": {
        "@type": "Offer",
        "sku": "offer-swiss",
        "price": "2.99",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/b",
      "name": "Mozarella",
      "offers": {
        "@type": "Offer",
        "sku": "offer-mozzarella",
        "price": "1.99",
        "priceCurrency": "USD"
      }
    }
  ]
}

示例 2

{
  "@type": "MenuItem",
  "@id": "https://www.example.com/1089/product/170067",
  "name": "Pepperoni Pizza",
  "hasMenuItemOptions": [
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Small"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-small-pepperoni-pizza",
        "price": "10.00",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Large"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-large-pepperoni-pizza",
        "price": "20.00",
        "priceCurrency": "USD"
      }
    }
  ],
  "menuAddOn": [
    {
      "@type": "AddOnMenuSection",
      "name": "Choice of toppings",
      "@id": "https://www.example.com/1089/addon/1",
      "hasMenuItem": [
        {
          "@type": "AddOnMenuItem",
          "@id": "https://www.example.com/1089/addon/1/a",
          "name": "Shrimp",
          "hasMenuItemOptions": [
            {
              "@type": "MenuItemOption",
              "value": [
                {
                  "@type": "PropertyValue",
                  "name": "PIZZA_SIDE",
                  "value": "PIZZA_SIDE_LEFT" // Values are predefined for pizza side.
                },
                {
                  "@type": "PropertyValue",
                  "name": "APPLICABLE_ITEM_OPTION",
                  "value": "Small" // Value should be same as mentioned in item's options.
                }
              ],
              "offers": {
                "@type": "Offer",
                "sku": "offer-topping-shrimp-left-small",
                "price": "1.00",
                "priceCurrency": "USD"
              }
            },
            {
              "@type": "MenuItemOption",
              "value": [
                {
                  "@type": "PropertyValue",
                  "name": "PIZZA_SIDE",
                  "value": "PIZZA_SIDE_LEFT" // Values are predefined for pizza side.
                },
                {
                  "@type": "PropertyValue",
                  "name": "APPLICABLE_ITEM_OPTION",
                  "value": "Large" // Value should be same as mentioned in item's options.
                }
              ],

              "offers": {
                "@type": "Offer",
                "sku": "offer-topping-shrimp-left-large",
                "price": "2.00",
                "priceCurrency": "USD"
              }
            },
            {
              "@type": "MenuItemOption",
              "value": [
                {
                  "@type": "PropertyValue",
                  "name": "PIZZA_SIDE",
                  "value": "PIZZA_SIDE_WHOLE" // Values are predefined for pizza side.
                },
                {
                  "@type": "PropertyValue",
                  "name": "APPLICABLE_ITEM_OPTION",
                  "value": "Small" // Value should be same as mentioned in item's options.
                }
              ],

              "offers": {
                "@type": "Offer",
                "sku": "offer-topping-shrimp-whole-small",
                "price": "1.50",
                "priceCurrency": "USD"
              }
            },
            {
              "@type": "MenuItemOption",
              "value": [
                {
                  "@type": "PropertyValue",
                  "name": "PIZZA_SIDE",
                  "value": "PIZZA_SIDE_WHOLE" // Values are predefined for pizza side.
                },
                {
                  "@type": "PropertyValue",
                  "name": "APPLICABLE_ITEM_OPTION",
                  "value": "Large" // Value should be same as mentioned in item's options.
                }
              ],

              "offers": {
                "@type": "Offer",
                "sku": "offer-topping-shrimp-whole-large",
                "price": "2.50",
                "priceCurrency": "USD"
              }
            }
          ]
        }
      ]
    }
  ]
}

AddOnMenuSection

食品或饮料项的子分组,作为菜单项的附加菜单版块。

下表列出了 AddOnMenuSection 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“AddOnMenuSection”。
@id 网址 必需 菜单部分的唯一标识符。
name 文字 必需 当用户浏览菜单时,用于标识 AddOnMenuSection 的文本。
description 文字 选填 菜单部分的说明。
eligibleQuantity QuantitativeValue 选填 表示允许作为此菜单版块的插件的项数。您可以使用此字段限制插件的数量,例如披萨上可以选择的浇头数量下限和上限。
image 网址 选填 菜单部分的图片。
hasMenuItem AddOnMenuItem 的数组 必填* 包含在 AddOnMenuSection 中的插件菜单项。
offers Offer 的数组 选填

使用 Offer.availabilityStartsOffer.availabilityEnds 指示此 AddOnMenuSection 可用的时间段。

以下列表显示了 AddOnMenuSection 中使用的 Offer 属性。

  • 可选的 Offer.availabilityStarts
  • 可选的 Offer.availabilityEnds
  • 可选的 Offer.availableDay
  • 可选的 Offer.validFrom
  • 可选的 Offer.validThrough
hasMenuSection AddOnMenuSection 的数组 必填* 附加菜单的逻辑子分组(如晚餐、开胃菜或鱼类菜肴)。
defaultOption AddOnMenuItem 的数组 选填

系统会为AddOnMenuSection中的用户默认预先选择的插件菜单项。用户可以更改最终的选择。如果未指定 defaultOption,则不会预选择 AddOnMenuItem

AddOnMenuItem 对象必须存在于 AddOnMenuSectionhasMenuItem 中。

defaultOption 的数量不能超过 AddOnMenuSectioneligibleQuantity 上限。

numberOfFreeAddOns 数字 选填 指明用户可以免费选择的插件数量。

以下示例包括 AddOnMenuSection 对象:

示例 1

{
  "@type": "AddOnMenuSection",
  "@id": "https://www.example.com/1089/addon/1",
  "name": "AddOnCheese",
  "hasMenuItem": [
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/a",
      "name": "Swiss",
      "offers": {
        "@type": "Offer",
        "sku": "offer-swiss",
        "price": "2.99",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/b",
      "name": "Mozarella",
      "offers": {
        "@type": "Offer",
        "sku": "offer-mozzarella",
        "price": "1.99",
        "priceCurrency": "USD"
      }
    }
  ]
}

示例 2

"menuAddOn": {
  "@type": "AddOnMenuSection",
  "name": "Cheese",
  "@id": "https://www.example.com/1089/addon/1", // Points to an AddOnMenuSection
  "eligibleQuantity":
    "@type": "QuantitativeValue",
    "minValue": 0,
    "maxValue": 2 // Maximum of 2 cheeses are allowed
  }
}

示例 3

“奶酪三明治”菜单项具有“奶酪选择”AddOnMenuSection,并且预先选择了“瑞士”和“马苏里拉奶酪”。

{
  "@type": "AddOnMenuSection",
  "@id": "https://www.example.com/1089/addon/1",
  "name": "AddOnCheese",
  "defaultOption": [
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/a"
    },
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/b"
    }
  ],
  "hasMenuItem": [
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/a",
      "name": "Swiss",
      "offers": {
        "@type": "Offer",
        "sku": "offer-swiss",
        "price": "2.99",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "AddOnMenuItem",
      "@id": "https://www.example.com/1089/addon/b",
      "name": "Mozzarella",
      "offers": {
        "@type": "Offer",
        "sku": "offer-mozzarella",
        "price": "1.99",
        "priceCurrency": "USD"
      }
    }
  ]
}

AdvanceServiceDeliveryHoursSpecification

表示用户安排提前配送和外卖的履单时间。

通常,opens 的值小于 closes 的值。使用 openscloses 属性时,请遵循以下准则:

  • openscloses 属性对于 AdvanceServiceDeliveryHoursSpecification 而言是可选的,但我们强烈建议您添加这些属性。
  • 必须为服务指定当地时间。请勿在 openscloses 值中添加时区。指定的时区将被忽略。
  • 如果未明确指定 openscloses,系统会假定提前排序适用于所有日期所有日期。
  • 如果 openscloses 相同,我们假定提前排序不可用。
  • 如果 opens 大于 closes,则将结束营业时间解读为第二天。例如,如果将开门时间设为 1 月 1 日下午 5 点,打烊时间是 2 点,则系统会解释为该餐馆 1 月 2 日凌晨 2 点打烊。
  • openscloses 表示未来的时段。closes 是专有的。例如,如果 opens 是上午 10 点,closes 是下午 4 点,serviceTimeInterval 为 15 分钟,则第一个时段从上午 10 点开始,最后一个时段从下午 3:45 开始。

下表介绍了 AdvanceServiceDeliveryHoursSpecification 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“AdvanceServiceDeliveryHoursSpecification”。
validFrom DateTime 基于条件

可以履行用户提前订单的开始日期。例如,“2017-05-01T00:00:00-07:00”。

如果未设置此属性,系统会假定它每天都有效。 validFromvalidThrough 属性必须不存在或一起存在。

如果此类型在 Service 级别指定为 specialOpeningHoursSpecification,则必须在 AdvanceServiceDeliveryHoursSpecification 中使用此 validFrom 属性。

如需了解详情,请参阅 日期和时间格式

validThrough DateTime 选填

结束日期:超过该结束日期,用户提前的订单无法再履行。例如,“2018-12-01T00:00:00-07:00”。

如果未设置此属性,系统会假定它每天都有效。 validFromvalidThrough 属性必须不存在或一起存在。

如果此类型在 Service 级别指定为 specialOpeningHoursSpecification,则必须提供 AdvanceServiceDeliveryHoursSpecification 中的 validThrough 属性。

validThrough 此时间不在此时间范围内。例如,如果该时间设置为下午 6 点,则时间最长为下午 5:59:59。

如需了解详情,请参阅日期和时间格式

opens Time 选填

适用于送餐或外卖时段。

一天中可以履行用户提前订单的特定时间。例如,凌晨 6:30 会被指定为“T06:30:00”。

必须为服务指定当地时间。请勿在 opens 值中添加时区。如果指定了时区,Google 会忽略此信息。

如需了解详情,请参阅日期和时间格式

closes Time 选填

适用于送餐或外卖时段。

无法履行用户提前订单的具体时间。例如,晚上 9:00 会显示为“T21:00:00”。 closes> 是不包含的,因此将 serviceTimeInterval 设置为晚上 9:00 表示 15 分钟表示最后一个可用时段从晚上 8:45 开始。

必须为服务指定当地时间。请勿在 closes 值中添加时区。如果指定了时区,Google 会忽略此信息。

如需了解详情,请参阅日期和时间格式

dayOfWeek DayOfWeek 的数组 选填

一周中的哪几天提供提前送货服务的时间。有效值包括:

  • “星期一”
  • “星期二”
  • “星期三”
  • “星期四”
  • “星期五”
  • “星期六”
  • “星期日”

如果您未指定星期几,则 AdvanceServiceDeliveryHoursSpecification 适用于所有日期。

serviceTimeInterval Duration 必需

两次连续服务时间之间的时间间隔。

例如:如果 openscloses 分别为上午 8 点和晚上 8 点,且 serviceTimeInterval 为 15 分钟,则用户可以选择执行时间:上午 8 点、上午 8: 15、上午 8:30、上午 8:45,依此类推,直到晚上 8:00。

Duration 必须指定为 ISO 8601 时长。例如:"P15M" 表示 15 分钟的间隔。

advanceBookingRequirement QuantitativeValue 必需

从下单时间到可以履行提前订单的分钟数。

QuantitativeValueminmax 值必须设置为分钟数,并将 unitCode 设置为“MIN”。

例如,如果提前订单至少需要 60 分钟才能完成,并且限制为在 2 天后履单,则 min 值为 60,max 值为 2880。

以下示例展示了 AdvanceServiceDeliveryHoursSpecification 类型的用法:

示例 1

{
  "@type": "AdvanceServiceDeliveryHoursSpecification",
  "opens": "T10:00:00",  // Delivery between 10AM and 7:59:59PM
  "closes": "T20:00:00",
  "serviceTimeInterval": "PT15M", // in slots spaced 15 minutes apart (ISO8601)
  "advanceBookingRequirement": {
    "minValue": 60,   // The slot should be at least 60 mins away
    "maxValue": 8640, // but not more than 6 days away
    "unitCode": "MIN"
  }
}

AllergenDetails

要使用此类型,请添加 gs1 上下文:"@context": ["http://gs1.org/voc/", "http://schema.org"]

然后,将 FoodBeverageTobaccoProduct 添加到相应 MenuItemMenuItemOption 的类型。

下表介绍了 AllergenDetails 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“AllergenDetails”。
allergenType 文字 选填 过敏原的类型,请参阅 gs1:AllergenTypeCode 。例如 http://gs1.org/voc/AllergenTypeCode-PEANUTS
allergenLevelOfContainmentCode 文字 选填 根据 gs1:LevelOfContainmentCode 的包含代码。 例如 http://gs1.org/voc/LevelOfContainmentCode-CONTAINShttp://gs1.org/voc/LevelOfContainmentCode-FREE_FROMhttp://gs1.org/voc/LevelOfContainmentCode-MAY_CONTAIN

以下示例展示了 AllergenDetails 类型的用法:

{
  "@type": ["MenuItem", "FoodBeverageTobaccoProduct"],
  "@id": "http://www.example.com/bar/menuitem/6",
  "name": "Strawberry joghurt drink",
  "description": "A 0.5l bottle of strawberry joghurt drink.",
  "offers": {
    "@type": "Offer",
    "sku": "offer-joghurt-drink",
    "price": "2.49",
    "priceCurrency": "USD"
  },
  "hasAllergen": [
    {
      "@type": "AllergenDetails",
      "allergenType": "http://gs1.org/voc/AllergenTypeCode-GLUTEN",
      "allergenLevelOfContainmentCode":
        "http://gs1.org/voc/LevelOfContainmentCode-FREE_FROM"
    },
    {
      "@type": "AllergenDetails",
      "allergenType": "http://gs1.org/voc/AllergenTypeCode-LACTOSE",
      "allergenLevelOfContainmentCode":
        "http://gs1.org/voc/LevelOfContainmentCode-CONTAINS"
    }
  ]
},

DeliveryChargeSpecification

下表介绍了 DeliveryChargeSpecification 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“DeliveryChargeSpecification”。
@id 网址 选填 运费规范的标识符。
price 数字 必需 总配送费用,该值只能为数字。使用 priceCurrency 属性来表示货币类型,而不是货币符号。例如,“6.00”,不带货币符号。
priceCurrency 文字 必需 由 3 个字母表示的 ISO 4217 货币代码。例如,"USD"。
eligibleTransactionVolume PriceSpecification 选填 此运费规范有效的交易量(以货币单位表示)。例如,指明最小购买量,或表示超过特定订单量时无需额外付费。
eligibleQuantity QuantitativeValue 选填 配送费用有效的订购数量的间隔和计量单位。例如,您可以这样指定某项货运费用仅对特定数量有效。
eligibleRegion GeoShapePlaceGeoCircle 的数组 选填 优惠或运费规范有效的地缘政治地区的 GeoShape/GeoCircle 图标。仅当运费因地区而异时,才应使用此属性。
validFrom DateTime 选填 指定的运费生效的日期和时间(包括时区)。例如,"2017-05-01T06:30:00-07:00"。如需了解详情,请参阅日期和时间格式
validThrough DateTime 选填 指定的运费会在该日期和时间(包括时区)后失效。例如,“2017-05-01T06:30:00-07:00”。 validThrough 的时间不包括在内:例如,如果该时间设置为下午 6 点,则时间最长为下午 5:59:59。 如需了解详情,请参阅日期和时间格式

以下示例展示了 DeliveryChargeSpecification 元素:

示例 1

"offers": {
  "@type":"Offer",
  "priceSpecification":[
    {
      "@type": "DeliveryChargeSpecification",
      "price": "5.0",
      "priceCurrency": "USD"
    }
  ]
}

示例 2

"priceSpecification": [
  {
    "@type": "DeliveryChargeSpecification",
    "@id": "http://www.provider.com/defaultdeliveryfee/foo",
    "price": "10.0",
    "priceCurrency": "USD",
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "minValue": 3  // Minimum of 3 items required for delivery
    }
  },
  {
    "@type": "DeliveryChargeSpecification",
    "@id": "http://www.provider.com/deliveryfee/foo/1",
    "price": "20.0",
    "priceCurrency": "USD",
    "validFrom":"T18:00:00", // Valid from 6:00PM
    "validThrough":"T22:00:00", // Valid to 9:59:59PM
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "minValue": 3  // Minimum of 3 items required for delivery
    }
  }
]

示例 3

"priceSpecification": [{
    "@type": "DeliveryChargeSpecification",
    "@id": "http://www.provider.com/threebrotherstacos/deliveryfee/1",
    "price": "8.00", // Charges $8 for area5
    "priceCurrency": "USD",
    "eligibleTransactionVolume": {
      "@type": "PriceSpecification",
      "minPrice": "20.00",
      "priceCurrency": "USD"
    },
    "eligibleRegion": [ // area5
      {
        "@type": "GeoCircle",
        "geoMidpoint": {
          "@type": "GeoCoordinates",
          "latitude": "37.7392607",
          "longitude": "-122.3895522"
        },
        "geoRadius": "4505"
      }
    ]
  },
  {
    "@type": "DeliveryChargeSpecification",
    "@id": "http://www.provider.com/threebrotherstacos/defaultdeliveryfee",
    "price": "6.00", // Charges $6 when delivered from Foo restaurant to area1, area2, area3 and area4 (Default charge)
    "priceCurrency": "USD",
    "eligibleTransactionVolume": {
      "@type": "PriceSpecification",
      "minPrice": "20.00", // Minimum order price for delivery is $20
      "priceCurrency": "USD"
    }
  }
]

除了 "@type": ["DeliveryChargeSpecification"] 之外,您还可以使用 UnitPriceSpecification 扩展该对象:

"@type": ["DeliveryChargeSpecification", "UnitPriceSpecification"]

该扩展提供了额外的两个以百分比计算的运费所需的属性。

媒体资源 类型 必要性 说明
referenceQuantity QuantitativeValue 必需 特定价格适用的参考数量。例如,如果 referenceQuantity 为 10,且 unitCode 为“P1”,则得出订单价值的 10%。目前仅支持 unitCode“P1”。
basePrice 数字 选填 referenceQuantity 以外的基本费用。例如,如果 referenceQuantity 为 10,unitCode 为“P1”,basePrice 为 5(美元),则总价值为 $5 + 订单价值的 10%。默认值为 0。

运费示例

Google 允许您使用服务实体的 Offer.PriceSpecification 预先向用户指定各种费用。

请注意,端到端排序目前仅支持一个 DeliveryChargeSpecification。将所有类型的费用合并到单个 DeliveryChargeSpecification 中。

请参阅服务 Feed 示例,了解如何根据区域、距离和订单价值指定运费。

如果没有费用,系统会省略 Offer.PriceSpecification

  • 示例 1:运费是购物车小计的 5%
  • 示例 2:运费为 5 美元
  • 示例 3:运费为 5 美元 + 购物车小计的 10%
  • 示例 4:运费为 5 美元,行李费为 0.1 美元
  • 示例 5:运费为 5%,手续费为购物车小计的 2%
  • 示例 6:运费为 $5,每增加 1 公里的运费为 $1

示例 1

priceSpecification [
  {
    "@type": ["DeliveryChargeSpecification", "UnitPriceSpecification"],
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "value": "5.00", // 5%
      "unitCode": "P1" // P1 == %
    },
    "priceCurrency": "USD"
  }
]

示例 2

priceSpecification [
  {
    "@type": ["DeliveryChargeSpecification"],
    "priceCurrency": "USD",
    "price": "5.00"
  }
]

示例 3

priceSpecification [
  {
    "@type": ["DeliveryChargeSpecification", "UnitPriceSpecification"],
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "value": "10.00", // 10%
      "unitCode": "P1", // P1 == %
    },
    "priceCurrency": "USD",
    "basePrice": "5.00" // User always pays $5 in addition to 10%
  }
]

示例 4

priceSpecification [
  {
    "@type": ["DeliveryChargeSpecification"],
    "priceCurrency": "USD",
    "price": "5.10" //$5 + $0.1
  }

示例 5

priceSpecification [
  {
    "@type": ["DeliveryChargeSpecification", "UnitPriceSpecification"],
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "value": "7.00", // 5% + 2%
      "unitCode": "P1" // P1 == %
    },
    "priceCurrency": "USD"
  },
]

示例 6

priceSpecification [
  {
    "@type": ["DeliveryChargeSpecification", "UnitPriceSpecification"],
    "basePrice": 5.00, // User always pays $5
    "price": 1.00, // An additional $1.00 is added per 1km
    "priceCurrency": "USD",
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "unitCode": "MTR", // MTR == meter
      "value": "1000.0" // 1km
    }
  }
]

GeoCircle

下表介绍了 GeoCircle 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“GeoCircle”。
geoMidpoint GeoCoordinates 必需 表示 GeoCircle 中心的 GeoCoordinates
geoRadius 数字 必需 表示 GeoCircle 的大致半径(以米为单位)。

下例展示了一个 GeoCircle 元素:

示例

{
  "@type": "GeoCircle",
  "geoMidpoint": {
    "@type": "GeoCoordinates",
    "latitude": "37.7392607",
    "longitude": "-122.3895522"
  },
  "geoRadius": "4505"
}

GeoCoordinates

下表介绍了 GeoCoordinates 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“GeoCoordinates”。
latitude 数字 必需

纬度(以度为单位)。值必须介于 -90 到 90(含)之间。如果指定的值小于 -90,则设置为 -90;如果值大于 90,则设置为 90。

精度应至少为 5 位小数。

longitude 数字 必需

经度(以度为单位)。系统会对 -180 到 180 范围之外的值进行换行,使其包含在该范围内。例如,值 -190 被转换为 170。值 190 转换为 -170。这反映了经线环绕地球这一事实。

精度应至少为 5 位小数。

下例展示了一个 GeoCoordinates 元素:

示例

"geo": {
  "@type": "GeoCoordinates",
  "latitude": "35.7392607",
  "longitude": "-120.3895522"
}

GeoShape

下表介绍了 GeoShape 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“GeoShape”。
polygon 文本数组 必需

多边形或多重多边形,表示为一系列以空格分隔的点。建议第一个点和最后一个点相同,但这并非强制性要求。

多边形或多重多边形中的每个点由一个纬度点后跟一个经度点定义。您还必须按逆时针方向指定这些点。

在大多数情况下,您只会使用一个多边形。如需了解更复杂的用例,请参阅送货服务区域文档。

以下示例展示了 GeoShape 元素:

示例 1

{
  "@type": "GeoShape", // area4
  // Specify latitude first (i.e., lat long lat long ...)
  "polygon": "37.806000 -122.425592 37.775849 -122.419043 37.795547 -122.394046 37.808747 -122.412619"
},

示例 2

{
  "@type": "GeoShape", // A service area with a hole.
  // Specify latitude first (i.e., lat long lat long ...)
  "polygon": [ “37.771535 -122.506881 37.764289 -122.506669 37.766497 -122.453058”,
               “37.791707 -122.447987 37.746676 -122.449433 37.736150 -122.505944 37.780924 -122.509729”]
},

示例 3

{
  "@type": "Service",
  "@id": "http://www.provider.com/service/1",
  "areaServed": [
    {
      "@type": "GeoShape",  // Richmond District delivery area.
      // Specify latitude first (i.e., lat long lat long ...)
      "polygon": "37.785847 -122.484851 37.772757 -122.483983 37.774442 -122.458563 37.786876 -122.459474"
    },
    {
      "@type": "GeoShape",  // Haight-Ashbury delivery area.
      // Specify latitude first (i.e., lat long lat long ...)
      "polygon": "37.774804 -122.454774 37.766224 -122.452881 37.769087 -122.436043 37.773087 -122.437417"
    }  ],
...
},

下表列出了 Menu 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“Menu”。
@id 网址 必需 菜单的唯一标识符。
name 文字 选填 在用户浏览菜单时可识别 Menu 的文本。
description 文字 选填 菜单说明。
disclaimer MenuDisclaimer 选填 菜单免责声明。例如,营养信息披露和过敏原披露。
hasMenuSection 单个对象或 MenuSection 数组 选填 菜单的逻辑子分组(如晚餐、开胃菜或鱼类菜肴)。
hasMenuItem 单个对象或 MenuItem 数组 选填 Menu 中包含的 MenuItem 对象,通常是在 Menu 未按 MenuSections 细分时。
inLanguage 文字 选填 菜单内容的语言,采用 IETF BCP 47 标准的语言代码。 例如,“en-US”。

以下示例展示了 Menu 类型的用法:

示例 1

{
  "@type": "Menu",
  "@id": "http://www.provider.com/somerestaurant/menu/1",
  "hasMenuSection": {
    "@type": "MenuSection",
    "@id": "http://www.provider.com/somerestaurant/menusection/1",
    "name": "Tacos",
    "description": "Tacos inspired by India cuisine.",
    "offers": {
      "@type": "Offer",
      "availabilityStarts": "T08:00:00", // Starts at 8:00AM
      "availabilityEnds": "T22:00:00" // Ends at 10:00PM. Available 8AM-9:59:59PM
    },
    "hasMenuItem": {
      "@type": "MenuItem",
      "@id": "http://www.provider.com/somerestaurant/menuitem/1",
      "name": "Aloo Gobi Taco",
      "description": "Mexico City-style street corn tortilla taco filled with a flavorful mixture of mildly south Indian spiced cauliflower, potato, tomato, onions and bell peppers.",
      "offers": {
        "@type": "Offer",
        "sku": "offer-aloo-gobi-taco",
        "price": "3.50",
        "priceCurrency": "USD"
      },
      "nutrition": {
        "@type": "NutritionInformation",
        "calories": "170 Cal",
        "fatContent": "3 g",
        "fiberContent": "2 g",
        "proteinContent": "4 g"
      },
      "suitableForDiet": "http://schema.org/GlutenFreeDiet"
    }
  },
  "inLanguage": "English"
}

示例 2

此示例将 hasMenuItem 显示为数组。

{
  "@type": "Menu",
  "@id": "http://www.provider.com/somerestaurant/menu/1",
  "name": "Dine-In Menu",
  "description": "Menu for in-restaurant dining only.",
  "hasMenuSection": [
    {
      "@type": "MenuSection",
      "@id": "http://www.provider.com/somerestaurant/menusection/1",
      "name": "Main",
      "description": "Main course",
      "image": "http://www.provider.com/somerestaurant/main_dishes.jpg",
      "hasMenuItem": [
        {
          "@type": "MenuItem",
          "@id": "http://www.provider.com/somerestaurant/menuitem/1",
          "name": "Pizza",
          "description": "Pizza",
          "offers": {
            "@type": "Offer",
            "sku": "offer-pizza",
            "price": "7.49",
            "priceCurrency": "USD",
            "availabilityStarts": "T08:00:00", // Starts at 8:00AM
            "availabilityEnds": "T18:00:00" // Ends at 6:00PM, last order at 5:59:59PM
          }
        },
        {
          "@type": "MenuItem",
          "@id": "http://www.provider.com/somerestaurant/menuitem/2",
          "name": "Pasta",
          "description": "Pasta",
          "offers": [
            {
              "@type": "Offer",
              "sku": "offer-pasta-lunch",
              "price": "7.49",
              "priceCurrency": "USD",
              "availabilityStarts": "T08:00:00", // Starts at 8:00AM
              "availabilityEnds": "T18:00:00" // Ends at 6:00PM, last order at 5:59:59PM
            },
            {
              "@type": "Offer",
              "sku": "offer-pasta-dinner",
              "price": "10.49",
              "priceCurrency": "USD",
              "availabilityStarts": "T18:00:00", // Starts at 6:00PM
              "availabilityEnds": "T21:00:00" // Ends at 9:00PM, last order at 8:59:59PM
            }
          ]
        }
      ]
    },
    {
      "@type": "MenuSection",
      "@id": "http://www.provider.com/somerestaurant/menusection/2",
      "name": "Soups & Salads",
      "description": "Salads and a few choices of soup",
      "image": "https://www.provider.com/somerestaurant/soup_and_salad_dishes.jpg",
      "hasMenuItem": {
        "@type": "MenuItem",
        "@id": "http://www.provider.com/somerestaurant/menuitem/3",
        "name": "Pea Soup",
        "description": "Creamy pea soup topped with melted cheese and sourdough croutons.",
        "offers": {
          "@type": "Offer",
          "sku": "offer-pea-soup",
          "price": "3.49",
          "priceCurrency": "USD"
        },
        "suitableForDiet": "http://schema.org/GlutenFreeDiet"
      }
    }
  ]
}

示例 3

此示例将 hasMenuSection 显示为数组。

{
  "@type": "Menu",
  "@id": "http://www.provider.com/somerestaurant/menu/1",
  "name": "Dine-In Menu",
  "description": "Menu for in-restaurant dining only.",
  "hasMenuSection": [
    {
      "@type": "MenuSection",
      "@id": "http://www.provider.com/somerestaurant/menusection/1",
      "name": "Dinner",
      "description": "Dinner dishes",
      "hasMenuSection": [
        {
          "@type": "MenuSection",
          "@id": "http://www.provider.com/somerestaurant/menusection/2",
          "name": "Starters",
          "description": "Appetizers and such",
          "image": "https://www.provider.com/somerestaurant/starter_dishes.jpg",
          "hasMenuItem": {
            "@type": "MenuItem",
            "@id": "http://www.provider.com/somerestaurant/menuitem/1",
            "name": "Potato Skins",
            "description": "Small serving of stuffed potato skins.",
            "offers": {
              "@type": "Offer",
              "sku": "offer-potato-skins",
              "price": "7.49",
              "priceCurrency": "USD"
            },
            "suitableForDiet": "http://schema.org/GlutenFreeDiet"
          }
        },
        {
          "@type": "MenuSection",
          "@id": "http://www.provider.com/somerestaurant/menusection/3",
          "name": "Soups & Salads",
          "description": "Salads and a few choices of soup",
          "image": "https://thisisarestaurant.com/soup_and_salad_dishes.jpg",
          "hasMenuItem": {
            "@type": "MenuItem",
            "@id": "http://www.provider.com/somerestaurant/menuitem/2",
            "name": "Pea Soup",
            "description": "Creamy pea soup topped with melted cheese and sourdough croutons.",
            "offers": {
              "@type": "Offer",
              "sku": "offer-pea-soup",
              "price": "3.49",
              "priceCurrency": "USD"
            },
            "suitableForDiet": "http://schema.org/GlutenFreeDiet"
          }
        },
        {
          "@type": "MenuSection",
          "@id": "http://www.provider.com/somerestaurant/menusection/4",
          "name": "Steak",
          "description": "Steak Dishes",
          "image": "https://steak.com/steak_dishes.jpg",
          "hasMenuItem": {
            "@type": "MenuItem",
            "@id": "http://www.provider.com/somerestaurant/menuitem/3",
            "name": "Sirloin",
            "description": "Sirloin steak dish.",
            "offers": {
              "@type": "Offer",
              "sku": "offer-sirloin-steak",
              "price": "15.49",
              "priceCurrency": "USD"
            },
            "suitableForDiet": "http://schema.org/GlutenFreeDiet"
          }
        }
      ]
    },
    {
      "@type": "MenuSection",
      "@id": "http://www.provider.com/somerestaurant/menusection/5",
      "name": "Desserts",
      "description": "Dessert dishes.",
      "image": "http://www.provider.com/somerestaurant/dessert_dishes.jpg",
      "hasMenuItem": {
        "@type": "MenuItem",
        "@id": "http://www.provider.com/somerestaurant/menuitem/4",
        "name": "Chocolate Pie",
        "description": "A slice of chocolate pie.",
        "offers": {
          "@type": "Offer",
          "sku": "offer-chocolate-pie",
          "price": "3.49",
          "priceCurrency": "USD"
        }
      }
    }
  ]
}

如需查看 Menu 实体的更多示例,请参阅餐馆和菜单 Feed 示例

下表列出了 MenuDisclaimer 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“MenuDisclaimer”。
@id 网址 必需 菜单免责声明的唯一标识符。
text 文字 必需 免责声明的文字。例如,“成年人每日平均摄入能量为 8700 千焦耳。”
url 网址 选填 指向提供免责声明的更多详情的网页的网址。

以下示例展示了 MenuDisclaimer 类型的用法:

示例

{
    "@type": "Menu",
    "@id": "menu_1",
    "disclaimer": {
        "@type": "MenuDisclaimer",
        "@id": "menu_1_disclaimer_1",
        "text": "The average adult daily energy intake is 8700 kJ",
        "url": "https://partner.domain.com/menu/provider/disclaimer/more-info.html"
    }
}

表示菜单中的菜单项。下表列出了 MenuItem 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“MenuItem”。
@id 网址 必需 菜单项的唯一标识符。
name 文字 必需 在用户浏览菜单时可识别 MenuItem 的文本。
description 文字 选填 菜单项的说明。
image 网址 选填

菜单项的图片。请遵循以下图片准则:

  • 宽高比:3:2
  • 最低分辨率为 600x400 像素,72 dpi
  • 推荐分辨率:1400x960 像素 72 dpi
menuAddOn AddOnMenuSection 的数组 选填 菜单版块中可作为插件添加到菜单项中的项目。
offers Offer 的数组 必填*

提供此 MenuItem 的一项或多项优惠。说明此 MenuItem 的提供时间和价格。每个时间只能有一个优惠有效。如果价格/库存状况因时段不同而有所差异,您可以提供多项优惠。如果菜品因基本属性(例如披萨的尺寸)而不同,请使用 menuItemOptionOffer.eligibleQuantity 的默认值为 0,无上限。

以下列表显示了 MenuItem 中使用了哪些 Offer 属性。

  • 需要达到 Offer.sku
  • 需要达到 Offer.price
  • 需要达到 Offer.priceCurrency
  • 可选的 Offer.availabilityStarts
  • 可选的 Offer.availabilityEnds
  • 可选的 Offer.availableDay
  • 可选的 Offer.validFrom
  • 可选的 Offer.validThrough
  • 可选的 Offer.eligibleQuantity
  • 可选的 Offer.inventoryLevel
hasMenuItemOptions MenuItemOption 的数组 必需 此菜单项的基本选项/变体列表。应使用选项指定商品可用的各种基本变体,例如小、中和大。
suitableForDiet RestrictedDiet 的数组 选填 餐点符合所述的饮食限制(如“http://schema.org/GlutenFreeDiet”或“http://schema.org/VeganDiet”)。这是可能的值的枚举列表。
nutrition NutritionInformation 选填 菜肴的营养信息,最主要是卡路里。
hasAllergen AllergenDetails 选填 餐点的过敏原(每 gs1:AllergenDetails)。 添加 gs1 上下文以使用此属性:"@context": ["http://gs1.org/voc/", "http://schema.org"]。 然后,将 FoodBeverageTobaccoProduct 添加到 MenuItem 的类型中。
additive AdditiveDetails 数组 选填 每个 gs1:AdditiveDetails 的菜肴添加剂。 这是可能的值的枚举列表。添加 gs1 上下文以使用此属性:"@context": ["http://gs1.org/voc/", "http://schema.org"]。 然后,将 FoodBeverageTobaccoProduct 添加到 MenuItem 的类型中。
packaging PackagingDetails 选填 每个 gs1:PackagingDetails 的此 MenuItem 的打包和回收信息。 添加 gs1 上下文以使用此属性:"@context": ["http://gs1.org/voc/", "http://schema.org"]。 然后,将 FoodBeverageTobaccoProduct 添加到 MenuItem 的类型中。

以下示例展示了 MenuItem 元素:

示例 1

"hasMenuItem": {
  "@type": "MenuItem",
  "@id": "http://www.provider.com/bar/menuitem/1",
  "name": "Potato Skins",
  "description": "Small serving of stuffed potato skins.",
  "offers": {
    "@type": "Offer",
    "sku": "offer-potato-skins",
    "price": "7.49",
    "priceCurrency": "USD"
  },
  "suitableForDiet": "http://schema.org/GlutenFreeDiet"
}

示例 2

"hasMenuItem": [
  {
    "@type": "MenuItem",
    "@id": "https://www.example.com/1089/product/170067",
    "name": "Veg Grill Burrito",
    "offers": {
      "@type": "Offer",
      "sku": "offer-veg-grill-burrito",
      "price": "12.99",
      "priceCurrency": "USD"
    },
    "menuAddOn": {
      "@type": "AddOnMenuSection",
      "name": "Cheese",
      "@id": "https://www.example.com/1089/addon/1", // Points to an AddOnMenuSection
      "eligibleQuantity":
        "@type": "QuantitativeValue",
        "minValue": 0,
        "maxValue": 2 // Maximum of 2 cheeses are allowed
      }
    }
  },
  {
    "@type": "MenuItem",
    "@id": "https://www.example.com/1089/product/170018",
    "name": "Chicken Taco",
    "offers": {
      "@type": "Offer",
      "sku": "offer-chicken-taco",
      "price": "6.99",
      "priceCurrency": "USD"
    }
  }
]

示例 3

{
  "@type": "MenuItem",
  "@id": "https://www.example.com/1089/product/170067",
  "name": "Meat Combo",
  "hasMenuItemOptions": [
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "OPTION",
        "value": "Plate",
        "offers": {
          "@type": "Offer",
          "sku": "offer-meat-combo-plate",
          "price": "12.00",
          "priceCurrency": "USD"
        },
        "menuAddOn": [
          {
            "@type": "AddOnMenuSection",
            "name": "Toppings for Plate",
            "@id": "https://www.example.com/1089/addon/1",
            "eligibleQuantity": {
              "@type": "QuantitativeValue",
              "minValue": 0,
              "maxValue": 3
            },
            "hasMenuItem": [
              {
                "@type": "AddOnMenuItem",
                "@id": "https://www.example.com/1089/addon/1/a",
                "name": "Hummus",
                "offers": {
                  "@type": "Offer",
                  "sku": "offer-meat-combo-topping-hummus",
                  "price": "1.00",
                  "priceCurrency": "USD"
                }
              }
              // -- Other Items --
            ]
          }
        ]
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "OPTION",
        "value": "Sandwich"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-meat-combo-sandwich",
        "price": "10.00",
        "priceCurrency": "USD"
      },
      "menuAddOn": [
        {
          "@type": "AddOnMenuSection",
          "name": "Toppings for Sandwich",
          "@id": "https://www.example.com/1089/addon/1",
          "eligibleQuantity": {
            "@type": "QuantitativeValue",
            "minValue": 0,
            "maxValue": 2
          },
          "hasMenuItem": [
            {
              "@type": "AddOnMenuItem",
              "@id": "https://www.example.com/1089/addon/1/a",
              "name": "Hummus",
              "offers": {
                "@type": "Offer",
                "sku": "offer-meat-combo-topping-hummus",
                "price": "1.00",
                "priceCurrency": "USD"
              }
            }
            // -- Other Items --
          ]
        }
      ]
    }
  ]
}

示例 4

{
  "@type": "MenuItem",
  "@id": "https://www.example.com/1089/product/170067",
  "name": "Pepperoni Pizza",
  "hasMenuItemOptions": [
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Small"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-small",
        "price": "10.00",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Medium"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-medium",
        "price": "15.00",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Large"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-large",
        "price": "20.00",
        "priceCurrency": "USD"
      }
    }
  ]
}

示例 5

{
  "@type": ["MenuItem", "FoodBeverageTobaccoProduct"],
  "@id": "http://www.example.com/bar/menuitem/9",
  "name": "Ice Coffee",
  "offers": {
    "@type": "Offer",
    "sku": "offer-ice-coffee",
    "price": "3.99",
    "priceCurrency": "USD"
  },
  "nutrition": {
    "@type": "NutritionInformation",
    "description": "Contains preservatives and artificial flavor"
  },
  "hasAllergen": [
    {
      "@type": "AllergenDetails",
      "allergenType": "http://gs1.org/voc/AllergenTypeCode-LACTOSE",
      "allergenLevelOfContainmentCode":
        "http://gs1.org/voc/LevelOfContainmentCode-CONTAINS"
    },
    {
      "@type": "AllergenDetails",
      "allergenType": "http://gs1.org/voc/AllergenTypeCode-PEANUTS",
      "allergenLevelOfContainmentCode":
        "http://gs1.org/voc/LevelOfContainmentCode-MAY_CONTAIN"
    }
  ],
  "additive": [
    {
      "@type": "AdditiveDetails",
      "additiveName": "caffeine",
      "additiveLevelOfContainment":
        "http://gs1.org/voc/LevelOfContainmentCode-CONTAINS"
    }
  ],
  "packaging": {
    "@type": "PackagingDetails",
    "packagingRecyclingProcessType" :
      "http://gs1.org/voc/PackagingRecyclingProcessTypeCode-REUSABLE",
    "hasReturnablePackageDeposit": {
      "@type": "ReturnablePackageDepositDetails",
      "returnablePackageDepositAmount": {
        "@type": "http://gs1.org/voc/PriceSpecification",
        "http://gs1.org/voc/price": "0.10",
        "http://gs1.org/voc/priceCurrency": "USD"
      }
    }
  }
}

如需查看 MenuItem 实体的更多示例,请参阅餐馆和菜单 Feed 示例

一个选项,表示用户在选择菜品或套餐时需要做出的选择。用户必须选择一个选项,否则订单将被视为无效。例如,对于披萨,您可以选择“小”“中”或“大”。

如需查看 MenuItemOption 的示例用例,请参阅有关使用 MenuItemOption 进行自定义的指南。

下表列出了 MenuItemOption 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“MenuItemOption”。
value PropertyValue 必需 PropertyValue,包含表示选项的名称/值对。
offers Offer 的数组 必需

提供此 MenuItemOption 的一项或多项优惠。说明此菜单项选项在何时以何种价格提供。 每个时间只能有一个优惠有效。如果价格/库存状况会随时段而变化,您可以有多个有效优惠。请勿使用 Offer.eligibleQuantityMenuItemOption 是互斥的,因此 Offer.eligibleQuantity 会被忽略(如果提供)。

以下列表显示了 MenuItemOption 中使用了哪些 Offer 属性。

  • 需要达到 Offer.sku
  • 需要达到 Offer.price
  • 需要达到 Offer.priceCurrency
  • 可选的 Offer.availabilityStarts
  • 可选的 Offer.availabilityEnds
  • 可选的 Offer.availableDay
  • 可选的 Offer.validFrom
  • 可选的 Offer.validThrough
  • 可选的 Offer.eligibleQuantity
  • 可选的 Offer.inventoryLevel
menuAddOn Array of AddOnMenuSection 选填 包含可作为插件添加的允许项目的菜单部分。仅当插件特定于某个菜单项选项时,才使用此选项。否则,请使用 MenuItem.menuAddOn 属性提供插件。
suitableForDiet RestrictedDiet 的数组 选填 指明相应菜肴符合所述饮食限制的饮食的枚举列表(如“http://schema.org/GlutenFreeDiet”或“http://schema.org/VeganDiet”)。
nutrition NutritionInformation 选填 菜肴的营养信息,最主要是卡路里。
hasAllergen AllergenDetails 选填 餐点的过敏原(每 gs1:AllergenDetails)。 添加 gs1 上下文以使用此属性:"@context": ["http://gs1.org/voc/", "http://schema.org"]。 然后,将 FoodBeverageTobaccoProduct 添加到 MenuItemOption 的类型中。
additive AdditiveDetails 数组 选填 每个 gs1:AdditiveDetails 的菜肴添加剂。 这是可能的值的枚举列表。添加 gs1 上下文以使用此属性:"@context": ["http://gs1.org/voc/", "http://schema.org"]。 然后,将 FoodBeverageTobaccoProduct 添加到 MenuItemOption 的类型中。
packaging PackagingDetails 选填 此 MenuItem 的打包和回收信息(根据 gs1:PackagingDetails) 添加 gs1 上下文以使用此属性:"@context": ["http://gs1.org/voc/", "http://schema.org"]。 然后,将 FoodBeverageTobaccoProduct 添加到 MenuItemOption 的类型中。

下例显示了 MenuItemOption 元素:

示例 1

{
  "@type": "MenuItem",
  "@id": "https://www.example.com/1089/product/170067",
  "name": "Pepperoni Pizza",
  "hasMenuItemOptions": [
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Small"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-small",
        "price": "10.00",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Medium"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-medium",
        "price": "15.00",
        "priceCurrency": "USD"
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "SIZE",
        "value": "Large"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-large",
        "price": "20.00",
        "priceCurrency": "USD"
      }
    }
  ]
}

示例 2

{
  "@type": "MenuItem",
  "@id": "https://www.example.com/1089/product/170067",
  "name": "Meat Combo",
  "hasMenuItemOptions": [
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "OPTION",
        "value": "Plate",
        "offers": {
          "@type": "Offer",
          "sku": "offer-meat-combo-plate",
          "price": "12.00",
          "priceCurrency": "USD"
        },
        "menuAddOn": [
          {
            "@type": "AddOnMenuSection",
            "name": "Toppings for Plate",
            "@id": "https://www.example.com/1089/addon/1",
            "eligibleQuantity": {
              "@type": "QuantitativeValue",
              "minValue": 0,
              "maxValue": 3
            },
            "hasMenuItem": [
              {
                "@type": "AddOnMenuItem",
                "@id": "https://www.example.com/1089/addon/1/a",
                "name": "Hummus",
                "offers": {
                  "@type": "Offer",
                  "sku": "offer-meat-combo-topping-hummus",
                  "price": "1.00",
                  "priceCurrency": "USD"
                }
              }
              // -- Other Items --
            ]
          }
        ]
      }
    },
    {
      "@type": "MenuItemOption",
      "value": {
        "@type": "PropertyValue",
        "name": "OPTION",
        "value": "Sandwich"
      },
      "offers": {
        "@type": "Offer",
        "sku": "offer-meat-combo-sandwich",
        "price": "10.00",
        "priceCurrency": "USD"
      },
      "menuAddOn": [
        {
          "@type": "AddOnMenuSection",
          "name": "Toppings for Sandwich",
          "@id": "https://www.example.com/1089/addon/1",
          "eligibleQuantity": {
            "@type": "QuantitativeValue",
            "minValue": 0,
            "maxValue": 2
          },
          "hasMenuItem": [
            {
              "@type": "AddOnMenuItem",
              "@id": "https://www.example.com/1089/addon/1/a",
              "name": "Hummus",
              "offers": {
                "@type": "Offer",
                "sku": "offer-meat-combo-topping-hummus",
                "price": "1.00",
                "priceCurrency": "USD"
              }
            }
            // -- Other Items --
          ]
        }
      ]
    }
  ]
}

菜单部分,用于表示菜单中的特定部分。下表列出了 MenuSection 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“MenuSection”。
@id 网址 必需 菜单部分的唯一标识符。
name 文字 必需 当用户浏览菜单时,用于标识 MenuSection 的文本。
description 文字 选填 菜单部分的说明。
hasMenuSection MenuSection 的数组 选填 MenuSection 的逻辑子分组。例如,“晚餐”菜单部分可以有多个子菜单版块,如“家禽菜”或“素食”。
hasMenuItem MenuItem 的数组 选填 MenuSection 中包含的菜单项。
offers Offer 的数组 选填

使用 Offer.availabilityStartsOffer.availabilityEnds 指示提供此 MenuSection 的时间段。请勿使用 Offer.eligibleQuantity

以下列表显示了 MenuSection 中使用的 Offer 属性:

  • 可选的 Offer.availabilityStarts
  • 可选的 Offer.availabilityEnds
  • 可选的 Offer.availableDay
  • 可选的 Offer.validFrom
  • 可选的 Offer.validThrough
image 网址 选填 菜单部分的图片。

以下示例展示了 MenuSection 实体:

示例 1

{
  "@type": "MenuSection",
  "@id": "http://www.provider.com/bar/menusection/4",
  "name": "Steak",
  "description": "Steak Dishes",
  "image": "https://steak.com/steak_dishes.jpg",
  "hasMenuItem": {
    "@type": "MenuItem",
    "@id": "http://www.provider.com/bar/menuitem/3",
    "name": "Sirloin",
    "description": "Sirloin steak dish.",
    "offers": {
      "@type": "Offer",
      "sku": "offer-sirloin-steak",
      "price": "15.49",
      "priceCurrency": "USD"
    },
    "suitableForDiet": "http://schema.org/GlutenFreeDiet"
  }
}

示例 2

"hasMenuSection": [
  {
    "@type": "MenuSection",
    "@id": "https://www.example.com/1089/categorization/25114480",
    "name": "Main Items",
    "hasMenuItem": [
      {
        "@type": "MenuItem",
        "@id": "https://www.example.com/1089/product/170067",
        "name": "Veg Grill Burrito",
        "offers": {
          "@type": "Offer",
          "sku": "offer-veg-grill-burrito",
          "price": "12.99",
          "priceCurrency": "USD"
        },
        "menuAddOn": {
          "@type": "AddOnMenuSection",
          "name": "Cheese",
          "@id": "https://www.example.com/1089/addon/1", // Points to an AddOnMenuSection
          "eligibleQuantity":
            "@type": "QuantitativeValue",
            "minValue": 0,
            "maxValue": 2 // Maximum of 2 cheeses are allowed
          }
        }
      },
      {
        "@type": "MenuItem",
        "@id": "https://www.example.com/1089/product/170018",
        "name": "Chicken Taco",
        "offers": {
          "@type": "Offer",
          "sku": "offer-chicken-taco",
          "price": "6.99",
          "priceCurrency": "USD"
        }
      }
    ]
  },
  {
    "@type": "AddOnMenuSection",
    "@id": "https://www.example.com/1089/addon/1",
    "name": "AddOnCheese",
    "hasMenuItem": [
      {
        "@type": "AddOnMenuItem",
        "@id": "https://www.example.com/1089/addon/a",
        "name": "Swiss",
        "offers": {
          "@type": "Offer",
          "sku": "offer-swiss",
          "price": "2.99",
          "priceCurrency": "USD"
        }
      },
      {
        "@type": "AddOnMenuItem",
        "@id": "https://www.example.com/1089/addon/b",
        "name": "Mozarella",
        "offers": {
          "@type": "Offer",
          "sku": "offer-mozzarella",
          "price": "1.99",
          "priceCurrency": "USD"
        }
      }
    ]
  }
]

如需查看 MenuSection 实体的更多示例,请参阅餐馆和菜单 Feed 示例

NutritionInformation

下表介绍了 NutritionInformation 类型的属性。测量单位区分大小写。例如,可以接受“Cal”,但不能接受“cal”。

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“NutritionInformation”。
description 文字 选填 自由文本中的营养信息。例如,“包含防腐剂”。
calories 文字 选填

卡路里数(以 Cal、kcal 或 kJ 为单位),使用以下格式:

number Cal_kcal_OR_kJ

例如,“240 卡”。

carbohydrateContent 文字 选填

碳水化合物的含量,通常以 g 为单位,格式如下:

number g_OR_mg

例如,“7 g”。

cholesterolContent 文字 选填

胆固醇含量(通常以毫克为单位),格式如下:

number g_OR_mg

例如,“12 mg”。

fatContent 文字 选填

脂肪含量,通常以 g 为单位,格式如下:

number g_OR_mg

例如,“42 g”。

fiberContent 文字 选填

纤维的克或毫克数,使用以下格式:

number g_OR_mg
proteinContent 文字 选填

蛋白质的 g 或 mg 数量,使用以下格式:

number g_OR_mg
saturatedFatContent 文字 选填

克或毫克饱和脂肪的数量,使用以下格式:

number g_OR_mg
servingSize 文字 选填 食用份量(以毫升、升、克或千克为单位),以体积或质量的数量表示。
sodiumContent 文字 选填

mg 或 g 钠的数量,使用以下格式:

number g_OR_mg
sugarContent 文字 选填

糖的克数或毫克数,使用以下格式:

number g_OR_mg
transFatContent 文字 选填

使用以下格式表示的反式脂肪的克或毫克数:

number g_OR_mg
unsaturatedFatContent 文字 选填

不饱和脂肪含量,通常以 g 为单位,格式如下:

number g_OR_mg

以下示例展示了 NutritionInformation 元素:

示例 1

"nutrition": {
  "@type": "NutritionInformation",
  "calories": "170 Cal",
  "fatContent": "3 g",
  "fiberContent": "2 g",
  "proteinContent": "4 g"
},

示例 2

{
  "@type": ["MenuItem", "FoodBeverageTobaccoProduct"],
  "@id": "http://www.example.com/bar/menuitem/7",
  "name": "Peach Ice Tea",
  "description": "A 0.5l bottle of peach ice tea.",
  "offers": {
    "@type": "Offer",
    "sku": "offer-peach-ice-tea",
    "price": "2.49",
    "priceCurrency": "USD"
  },
  "nutrition": {
              "@type": "NutritionInformation",
              "description": "Contains preservatives and artificial flavor"
  }
},

邀约

菜单项优惠。下表介绍了 Offer 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“Offer”。
sku 文字 基于条件

商品的唯一标识符。可以是 Offer 中唯一的任何文本值。sku 值在结账和提交中引用为 lineitem 中的 offerId

此属性仅用于以下优惠类型:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuOption.Offer
price 文字 基于条件

所提供商品的价格。例如,不带货币符号的“6.00”。

只有以下优惠类型才需要此属性:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuOption.Offer

它不适用于以下优惠类型:

  • AddOnMenuSection.Offer
  • MenuSection.Offer
  • Service.Offer
priceCurrency 文字 基于条件

附加到 PriceSpecification 及其子类型时,价格或价格组成部分的货币(采用由 3 个字母表示的 ISO 4217 格式)。

只有以下优惠类型才需要此属性:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuOption.Offer

它不适用于以下优惠类型:

  • AddOnMenuSection.Offer
  • MenuSection.Offer
  • Service.Offer
availabilityStarts DateTimeTime 选填 优惠的生效日期和时间,或者只提供优惠的生效时间。 例如,如果煎饼在早上 7:00 开始供应,则此字段的值可能如下所示:“2017-05-01T07:00:00-07:00”。如需了解详情,请参阅日期和时间格式
availabilityEnds DateTimeTime 选填 优惠不可用的日期和时间,或仅提供优惠的时间。此时间不参与测试。例如,如果煎饼的售价在上午 10 点结束,那么最后一块煎饼可以在上午 9:59:59 供应。此字段的值可能如下所示:“2017-05-01T10:00:00-07:00”。如需了解详情,请参阅日期和时间格式
availableDay DayOfWeek 的数组 选填

此商品在一周中的哪几天供应。有效值包括:

  • “星期一”
  • “星期二”
  • “星期三”
  • “星期四”
  • “星期五”
  • “星期六”
  • “星期日”

如果您在一周中的不同日期有不同的可用性,请使用多个 Offer 对象,如下面的示例所示。

validFrom DateTime 选填

指定价格的有效日期和时间(包括时区)。例如,意大利面午餐时为 8 美元,晚餐时为 10 美元。如需了解详情,请参阅日期和时间格式

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuOption.Offer
  • AddOnMenuSection.Offer
  • MenuSection.Offer

此属性未用于以下优惠类型:

  • Service.Offer
validThrough DateTime 选填

指定价格的失效日期和时间(包括时区)。例如,意大利面在午餐时的价格为 8 美元,晚餐时的价格为 10 美元。validThrough 的时间不包括在内:例如,如果该时间设置为下午 6 点,则时间有效到下午 5:59:59。如需了解详情,请参阅日期和时间格式

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuOption.Offer
  • AddOnMenuSection.Offer
  • MenuSection.Offer

此属性未用于以下优惠类型。

  • Service.Offer
eligibleQuantity QuantitativeValue 选填

此商品的订购数量。例如,一家餐馆可能要求至少订购 10 份披萨才能送餐上门。

此值是可选的。默认情况下,没有上限,但餐厅可以指定一个上限。最低限制仅在用户选择项目时才适用。

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuOption.Offer

此属性未用于以下优惠类型。

  • AddOnMenuSection.Offer
  • MenuSection.Offer
  • Service.Offer
aggregateRating AggregateRating 选填

基于项的一系列评价或评分的总体评分。

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • MenuItem.Offer

此属性未用于以下类型。

  • AddOnMenuSection.Offer
  • MenuItemOption.Offer
  • MenuSection.Offer
  • Service.Offer
inventoryLevel QuantitativeValue 选填

商品当前的大致库存水平。

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • MenuItem.Offer
  • MenuItemOption.Offer

此属性未用于以下优惠类型:

  • AddOnMenuSection.Offer
  • MenuSection.Offer
  • Service.Offer
priceSpecification DeliveryChargeSpecification 数组或 PaymentChargeSpecification 数组 选填

Service.Offer 中使用时,它指示有关运费的详细信息。如果有多个 DeliveryChargeSpecification 对象适用,系统会应用最具体的对象。请使用互斥的 DeliveryChargeSpecification 对象以避免歧义。

此属性可用于以下优惠类型:

  • Service.Offer

此属性未用于以下优惠类型:

  • AddOnMenuItem.Offer
  • AddOnMenuSection.Offer
  • MenuItem.Offer
  • MenuOption.Offer
  • MenuSection.Offer
offeredBy Restaurant ID 数组 选填

表示提供此 Offer 的餐厅。

如果未指定,此 Offer 将提供给所有餐馆。

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • AddOnMenuSection.Offer
  • MenuItem.Offer
  • MenuItemOption.Offer
  • MenuSection.Offer

此属性未用于以下优惠类型:

  • Service.Offer
applicableFulfillmentMethod 文本数组 选填

表示履行此 Offer 的服务类型。可能的值为“DELIVERY”或“TAKEOUT”。

如果未指定,此 Offer 将由配送和导出来履单。

此属性可用于以下优惠类型:

  • AddOnMenuItem.Offer
  • AddOnMenuSection.Offer
  • MenuItem.Offer
  • MenuItemOption.Offer
  • MenuSection.Offer

此属性未用于以下优惠类型:

  • Service.Offer
@id 网址 已弃用 商品的唯一标识符。自 2019 年 4 月 25 日起已弃用,请按上文所述替换为 sku

以下示例展示了 Offer 元素:

示例 1

以下示例展示了一个简单的优惠:

{
  "@type": "Offer",
  "@id": "https://www.provider.com/menu/74962/139/offer",
  "price": "10",
  "priceCurrency": "USD"
}

示例 2

以下示例优惠显示了周末上午 8 点到 10 点的可用性:

{
  "@type": "Offer",
  "@id": "https://www.provider.com/menu/74962/140/offer",
  "price": "10",
  "priceCurrency": "USD",
  "availabilityStarts": "T08:00:00-07:00",  // Only available from 8-9:59:59 AM
  "availabilityEnds": "T10:00:00-07:00",
  "availableDay": ["Saturday", "Sunday"]  // Only on weekends.
}

示例 3

以下示例显示的是星期一、星期三和星期五上午 9-10:59:59 以及在星期二和星期四上午 8-11:59:59 的可用性:

{
  "@type": "Offer",
  "@id": "https://www.provider.com/menu/74962/140/offer",
  "price": "10",
  "priceCurrency": "USD",
  "availabilityStarts": "T09:00:00-07:00",
  "availabilityEnds": "T11:00:00-07:00",
  "availableDay": ["Monday", "Wednesday", "Friday"]
}, {
  "@type": "Offer",
  "@id": "https://www.provider.com/menu/74962/141/offer",
  "price": "10",
  "priceCurrency": "USD",
  "availabilityStarts": "T08:00:00-07:00",
  "availabilityEnds": "T12:00:00-07:00",
  "availableDay": ["Tuesday", "Thursday"]
}

示例 4

以下示例展示了附加菜单项的符合条件的数量设置,以便用户最多可订购 2 份该菜品:

{
  "@type": "AddOnMenuItem",
  "@id": "https://www.example.com/1089/addon/a",
  "name": "Ranch",
  "offers": {
    "@type": "Offer",
    "@id": "https://www.example.com/1089/addon/a/offer",
    "price": "2.99",
    "priceCurrency": "USD"
    "eligibleQuantity": {
         "@type": "QuantitativeValue",
         "maxValue": 2
     }
  }
}

示例 5

以下示例展示了特定地点的配送优惠:

{
  "@type": "Offer",
  "@id": "https://www.provider.com/menu/74962/139/offer",
  "price": "10",
  "priceCurrency": "USD",
  "applicableFulfillmentMethods": ["DELIVERY"],
  "offeredBy": [
    {
      "@type": "Restaurant",
      "@id": "https://www.provider.com/location/1",
    }
  ]
}

OpeningHoursSpecification

定义订购服务何时可用。通常,opens 的值小于 closes 的值。使用 openscloses 属性时,请遵循以下准则:

  • openscloses 属性是可选的,但强烈建议用于指明何时可以排序。定义服务时间的最佳实践是添加一个 deliveryHours 数组,其中包含具有 openscloses 属性的 ServiceDeliveryHoursSpecification。然后,如果您想要为提前排序提供更有限的时间范围,则可以在 deliveryHours 中添加一个具有自己的 openscloses 属性的 AdvanceServiceDeliveryHoursSpecification 对象。
  • 如果未明确指定 openscloses,系统会假定订购服务每天随时都可用。
  • 必须为服务指定当地时间。请勿在 openscloses 值中添加时区。如果指定了时区,Google 会忽略此信息。
  • 如果 openscloses 相同,则我们假定餐馆营业 0 分钟。
  • 如果 opens 大于 closes,则将结束营业时间解读为第二天。例如,如果将开门时间设为 1 月 1 日下午 5 点,打烊时间是 2 点,则系统认为该餐厅 1 月 2 日凌晨 2 点打烊。
  • closes 此时间不在此时间范围内。因此,如果此排序窗口的开始和关闭时间分别设置为上午 10 点和下午 4 点,则最后一个订单是下午 3:59:59。

下表介绍了 OpeningHoursSpecification 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“OpeningHoursSpecification”。
@id 网址 选填 OpeningHoursSpecification 的标识符。
dayOfWeek DayOfWeek 数组 选填

这些营业时间有效的星期几。可接受的值包括“星期一”“星期二”“星期三”“星期四”“星期五”“星期六”和“星期天”。例如:

"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
]

如果您未指定星期几,则 OpeningHoursSpecification 适用于所有日期。

opens Time 选填

Restaurant 规范中使用时,此属性表示餐馆在一周中的指定日期开业。例如,凌晨 6:30 会被指定为“T06:30:00”。

Service 规范中使用时,它表示一天中的特定时间起始点,可以下单的用户。它指定了在线系统开启时的开始营业时间,并允许用户下单。在这些在线系统的营业时间内,您可以使用 deliveryHours 指定用户可以订购特殊类型的外卖的营业时间/结束营业时间。

必须为服务指定当地时间。请勿在 opens 值中添加时区。如果指定了时区,Google 会忽略此信息。

如需了解详情,请参阅日期和时间格式

closes Time 选填

Service 规范中使用时,此属性表示一天中的特定时间,如果超过这一时间,用户将无法下单。它指定了在线系统正常运行时的打烊时间,并允许用户下单。在这些在线系统的营业时间内,您可以使用 deliveryHours 指定用户可以订购特殊类型的外卖的营业时间/结束营业时间。

必须为服务指定当地时间。请勿在 closes 值中添加时区。如果指定了时区,Google 会忽略此信息。

如需了解详情,请参阅日期和时间格式

validFrom DateTime 选填

Restaurant 规范中使用时,此属性用于指明由 openscloses 指定的餐馆营业时间的有效日期。

例如,如果给定的营业时间适用于 2017 年全年,则将 validFrom 设置为“2017-01-01T00:00:00-07:00”,将 validThrough 设置为“2017-12-31T23:59:59-07:00”。

Service 规范中使用时,validFrom 表示可向用户下订单的开始日期。

如果 Feed 中未指定此属性,Google 会假定该餐馆或服务每日营业。

除了日期之外,还需要提供值的时间和时区部分。

对于时区,请使用餐馆或服务的时区。

如需了解详情,请参阅日期和时间格式

validThrough DateTime 选填

Restaurant 中使用时,openscloses 指定的开始营业时间的日期无效。

例如,如果给定的营业时间适用于 2017 年全年,则将 validFrom 设置为“2017-01-01T00:00:00-07:00”,将 validThrough 设置为“2017-12-31T23:59:59-07:00”。

Service 规范中使用时,validThrough 表示在结束日期过后便不能再下单。

如果 Feed 中未指定此属性,Google 会假定该餐馆或服务每日营业。

除了日期之外,还需要提供日期时间中的时间和时区部分。

对于时区,请使用餐馆或服务的时区。

validThrough 此时间不在此时间范围内。例如,如果该时间设置为下午 6 点,则时间最长为下午 5:59:59。

如需了解详情,请参阅日期和时间格式

deliveryHours ServiceDeliveryHoursSpecification 的数组或 AdvanceServiceDeliveryHoursSpecification 的数组 基于条件

送货或外带时间规范。

除非餐馆已停业,否则必须设置此参数(也就是说,已设置 openscloses 且彼此相等。

  • ServiceDeliveryHoursSpecification:在开始/结束营业时间内,您可以设置“开始营业时间”和“结束营业时间”,以便用户尽快下单。
  • AdvanceServiceDeliveryHoursSpecification:您可以设置在开始/结束营业时间内,让用户可提前下单。

以下示例展示了 OpeningHoursSpecification 元素:

示例 1

// Ordering times for Monday through Friday
{
  "@type": "OpeningHoursSpecification",
  "deliveryHours": [
    {
      "@type": "AdvanceServiceDeliveryHoursSpecification",
      "deliveryLeadTime": {
        "@type": "QuantitativeValue",
        "value": "60",
        "unitCode": "MIN"
      },
      "dayOfWeek": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ],
      "opens": "T12:00:00", // Advance ordering begins at noon
      "closes": "T23:59:59", // Advance ordering ends at midnight
      "validFrom": "2017-01-01T00:00:00-07:00",
      "validThrough": "2018-12-31T23:59:59-07:00"
    },
    {
      "@type": "ServiceDeliveryHoursSpecification",
      "deliveryLeadTime": {
        "@type": "QuantitativeValue",
        "value": "60",
        "unitCode": "MIN"
      },
      "dayOfWeek": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ],
      "opens": "T10:00:00", // ASAP ordering begins at 10AM
      "closes": "T14:00:00", // ASAP ordering ends at 2PM
      "validFrom": "2017-01-01T00:00:00-07:00",
      "validThrough": "2018-12-31T23:59:59-07:00"
    }
  ]
},

示例 2

// Ordering times for Saturday and Sunday
{
  "@type": "OpeningHoursSpecification",
  "deliveryHours": [
    {
      // In this case advance orders are unavailable on Saturday and Sunday
      "@type": "ServiceDeliveryHoursSpecification",
      "deliveryLeadTime": {
        "@type": "QuantitativeValue",
        "value": "60",
        "unitCode": "MIN"
      },
      "dayOfWeek": [
        "Saturday",
        "Sunday"
      ],
      "opens": "T12:00:00", // ASAP orders start at noon
      "closes": "T23:59:59", // ASAP orders end at midnight
      "validFrom": "2017-01-01T00:00:00-07:00",
      "validThrough": "2018-12-31T23:59:59-07:00"
    }
  ]
}

示例 3

"hoursAvailable": {
  "@type": "OpeningHoursSpecification",
  "validFrom": "2016-02-01T00:00:00-07:00",
  "validThrough": "2016-03-01T00:00:00-07:00",
  "opens": "T08:00:00",  // Ordering begins at 8:00AM and ends at 6:00PM.
                         // ASAP and and advance orders are restricted to this
                         // time frame since the user won't be able to place
                         // orders outside of this window.
  "closes": "T18:00:00",
  "deliveryHours": {
    "@type": "ServiceDeliveryHoursSpecification",
    "deliveryLeadTime": {
      "@type": "QuantitativeValue",
      "value": "60",
      "unitCode": "MIN"
    }
  }
},

示例 4

// List hours available for 2017 and 2018
"hoursAvailable": [
  {
    "@type": "OpeningHoursSpecification",
    // Array containing advance order hours for each day
    "deliveryHours": [
      {
        // Open 10:00AM to 9:29:59PM on Mondays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "deliveryLeadTime": {
          "@type": "QuantitativeValue",
          "value": "60",
          "unitCode": "MIN"
        },
        "dayOfWeek": [
          "Monday"
        ],
        "opens": "T10:00:00",
        "closes": "T21:30:00",
        "validFrom": "2017-01-01T00:00:00-07:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      },
      {
        // Open 10:00AM to 9:29:59PM on Tuesdays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "deliveryLeadTime": {
          "@type": "QuantitativeValue",
          "value": "60",
          "unitCode": "MIN"
        },
        "dayOfWeek": [
          "Tuesday"
        ],
        "opens": "T10:00:00",
        "closes": "T21:30:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      },
      {
        // Open 10:00AM to 9:29:59PM on Wednesdays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "deliveryLeadTime": {
          "@type": "QuantitativeValue",
          "value": "60",
          "unitCode": "MIN"
        },
        "dayOfWeek": [
          "Wednesday"
        ],
        "opens": "T10:00:00",
        "closes": "T21:30:00",
        "validFrom": "2017-01-01T00:00:00-07:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      },
      {
        // Open 10:00AM to 9:29:59PM on Thursdays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "dayOfWeek": [
          "Thursday"
        ],
        "opens": "T10:00:00",
        "closes": "T21:30:00",
        "validFrom": "2017-01-01T00:00:00-07:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      },
      {
        // Open 10:00AM to 11:29:59PM on Fridays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "deliveryLeadTime": {
          "@type": "QuantitativeValue",
          "value": "60",
          "unitCode": "MIN"
        },
        "dayOfWeek": [
          "Friday"
        ],
        "opens": "T10:00:00",
        "closes": "T23:30:00",
        "validFrom": "2017-01-01T00:00:00-07:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      },
      {
        // Open 10:00AM to 11:29:59PM on Saturdays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "deliveryLeadTime": {
          "@type": "QuantitativeValue",
          "value": "60",
          "unitCode": "MIN"
        },
        "dayOfWeek": [
          "Saturday"
        ],
        "opens": "T10:00:00",
        "closes": "T23:30:00",
        "validFrom": "2017-01-01T00:00:00-07:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      },
      {
        // Open 11:00AM to 6:59:59PM on Sundays
        "@type": "AdvanceServiceDeliveryHoursSpecification",
        "deliveryLeadTime": {
          "@type": "QuantitativeValue",
          "value": "60",
          "unitCode": "MIN"
        },
        "dayOfWeek": [
          "Sunday"
        ],
        "opens": "T11:00:00",
        "closes": "T19:00:00",
        "validFrom": "2017-01-01T00:00:00-07:00",
        "validThrough": "2018-12-31T23:59:59-07:00"
      }
    ]
  }
],

PackagingDetails

添加 gs1 上下文以使用此类型:"@context": ["http://gs1.org/voc/", "http://schema.org"]。然后,将 FoodBeverageTobaccoProduct 添加到 MenuItemMenuItemOption 的类型中。

下表介绍了 PackagingDetails 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“PackagingDetails”。
packagingRecyclingProcessType 文字 选填 包装回收流程类型(请参阅 gs1:PackagingRecyclingProcessTypeCode)。例如 http://gs1.org/voc/PackagingRecyclingProcessTypeCode-RECYCLABLEhttp://gs1.org/voc/PackagingRecyclingProcessTypeCode-REUSABLE
hasReturnablePackageDeposit ReturnablePackageDepositDetails 选填 可退货包裹的存款详细信息,请参阅 gs1:ReturnablePackageDepositDetails。 例如,瓶子和罐子会有可退回的包裹押金。

以下示例展示了 PackagingDetails 类型的用法:

{
  "@type": ["MenuItem", "FoodBeverageTobaccoProduct"],
  "@id": "http://www.example.com/bar/menuitem/5",
  "name": "Sparkling Water",
  "description": "A 0.5l bottle of sparking water.",
  "offers": {
    "@type": "Offer",
    "sku": "offer-sparkling-water",
    "price": "1.49",
    "priceCurrency": "USD"
  },
  "packaging": {
    "@type": "PackagingDetails",
    "packagingRecyclingProcessType" :
      "http://gs1.org/voc/PackagingRecyclingProcessTypeCode-REUSABLE",
    "hasReturnablePackageDeposit": {
      "@type": "ReturnablePackageDepositDetails",
      "returnablePackageDepositAmount": {
        "@type": "http://gs1.org/voc/PriceSpecification",
        "http://gs1.org/voc/price": "0.05",
        "http://gs1.org/voc/priceCurrency": "USD"
      }
    }
  }
},

PaymentChargeSpecification

下表介绍了 PaymentChargeSpecification 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“PaymentChargeSpecification”。
@id 网址 选填 PaymentChargeSpecification 的标识符。
price 数字 必需 扣款总额。例如,“6.00”,不带货币符号。
priceCurrency 文字 必需 价格的 ISO 4217 货币代码,由 3 个字母组成。例如,“USD”。
eligibleTransactionVolume PriceSpecification 选填 此付款费用规范有效的交易量(以货币单位表示),例如表示最低交易量。
eligibleQuantity QuantitativeValue 选填 付款费用有效的订购数量。例如,您可以使用此属性要求订单中的商品数量必须达到最低要求。
validFrom DateTime 选填 指定的付款扣款生效的日期和时间(包括时区)。例如,“2017-05-01T07:00:00-07:00”。如需了解详情,请参阅日期和时间格式
validThrough DateTime 选填 指定的付款费用无效的日期和时间(包括时区)。例如,“2017-05-01T07:30:00-07:00”。 validThrough 的时间不包括在内:例如,如果该时间设置为下午 6 点,则时间最长为下午 5:59:59。如需了解详情,请参阅日期和时间格式

以下示例展示了 PaymentChargeSpecification 元素:

示例

"priceSpecification": [{
  "@type": "PaymentChargeSpecification",
  "@id": "http://www.provider.com/paymentCharge/bar",
  "priceCurrency": "USD",
  "price": "6.00", // Charges $6 for processing fee
  "eligibleQuantity": {
    "@type": "QuantitativeValue",
    "minValue": 2 // Minimum of two items required
  }
}]

除了 "@type": ["PaymentChargeSpecification"] 之外,对象还可以使用 UnitPriceSpecification ("@type": ["PaymentChargeSpecification", "UnitPriceSpecification"]) 进行扩展。该扩展为以百分比计算的服务费提供了额外的两个属性。

属性 类型 必要性 说明
referenceQuantity QuantitativeValue 必需 特定价格适用的参考数量。例如,如果 referenceQuantity 为 10,且 unitCode 为“P1”,则得出订单价值的 10%。目前仅支持 unitCode“P1”。
basePrice 数字 选填 referenceQuantity 以外的基本费用。例如,如果 referenceQuantity 为 10,unitCode 为“P1”,basePrice 为 5(美元),则总价值为 $5 + 订单价值的 10%。默认值为 0。

外卖费用示例

Google 允许您使用服务实体的 Offer.PriceSpecification 预先向用户指定各种费用。

请注意,我们目前仅支持一个 PaymentChargeSpecification。将所有类型的费用合并到单个 PaymentChargeSpecification

如果没有费用,系统会省略 Offer.PriceSpecification

  • 示例 1:服务费为购物车小计的 5%
  • 示例 2:服务费为 5 美元
  • 示例 3:行李费为 0.1 美元,服务费为购物车小计的 5%
  • 示例 4:行李费为 0.1 美元,服务费为 1 美元
  • 示例 5:服务费为 5%,所需小费为购物车小计的 10%

示例 1

priceSpecification [
  {
    "@type": ["PaymentChargeSpecification", "UnitPriceSpecification"],
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "value": "5.00", // 5%
      "unitCode": "P1" // P1 == %
    },
    "priceCurrency": "USD"
  }
]

示例 2

priceSpecification [
  {
    "@type": ["PaymentChargeSpecification"],
    "priceCurrency": "USD",
    "price": "5.00"
  }
]

示例 3

priceSpecification [
  {
    "@type": ["PaymentChargeSpecification", "UnitPriceSpecification"],
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "value": "5.00", // 5%
      "unitCode": "P1", // P1 == %
    },
    "priceCurrency": "USD",
    "basePrice": "0.10" // Bag fee $0.1
  }
]

示例 4

priceSpecification [
  {
    "@type": ["PaymentChargeSpecification"],
    "priceCurrency": "USD",
    "price": "1.10" //$1 + $0.1
  }
]

示例 5

priceSpecification [
  {
    "@type": ["PaymentChargeSpecification", "UnitPriceSpecification"],
    "referenceQuantity": {
      "@type": "QuantitativeValue",
      "value": "15.00", // 5% + 10%
      "unitCode": "P1" // P1 == %
    },
    "priceCurrency": "USD"
  }
]

地点

下表介绍了 Place 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“Place”。
address PostalAddress 必需 地点的地址。

以下示例展示了地点元素:

示例

{
  "@type": "Place", // area2
  "address": {
    "@type": "PostalAddress",
    "postalCode": "94041",
    "addressCountry": "US"
  }
},

PostalAddress

下表介绍了 PostalAddress 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“PostalAddress”。
addressLocality 文字 必填* 市行政区或城市。例如,“San Francisco”。
addressRegion 文字 必填* 地区或州。例如,“CA”。
postalCode 文字 必填* 邮政编码。例如,"94102"。
streetAddress 文字 选填 街道地址。例如:"1600 Amphitheatre Pkwy"。
addressCountry 文字 必需 双字母 ISO 3166-1 alpha-2 国家/地区代码。例如,"US"。

传送提供商可以列出这些属性,以指定提供服务的 Service.areaServed

Restaurant.address 中使用时,PostalAddress 中列出的所有属性都是必需的。

下例展示了一个 PostalAddress 元素:

示例

"address": {
  "@type": "PostalAddress",
  "streetAddress": "12345 Bar Avenue",
  "addressLocality": "San Francisco",
  "addressRegion": "CA",
  "postalCode": "94124",
  "addressCountry": "US"
},

PriceSpecification

下表介绍了 PriceSpecification 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“PriceSpecification”。
@id 网址 选填 PriceSpecification 的标识符。
minPrice 数字 选填 价格在一定范围内时的最低价格。
maxPrice 数字 选填 指定价格范围时的最高价格。
priceCurrency 文字 必需 价格的 ISO 4217 货币代码,由 3 个字母组成。例如,“USD”。
eligibleQuantity QuantitativeValue 选填 价格说明有效的订购数量。 例如,价格可能是每磅 2 美元,或一美元对应 2 件商品。

下例展示了一个 PriceSpecification 元素:

示例 1

"eligibleTransactionVolume": {
  "@type": "PriceSpecification",
  "minPrice": "20.00", // Minimum order price for delivery is $20
  "priceCurrency": "USD"
}

PropertyValue

用于描述 MenuItemOption 中选项的属性值对。

下表列出了 PropertyValue 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“PropertyValue”。
name 文字 必需

选项的名称或类型。

以下是 MenuItem 中使用的有效名称:

  • “SIZE”:MenuItem 的大小。例如“小”、“中”或“大”。
  • “OPTION”:除尺寸以外的任何变体(例如可沙拉或三明治的菜肴)。如果您无法区分“SIZE”和“OPTION”,请使用“OPTION”。

AddOnMenuItem 中使用时的有效名称:

  • “APPLICABLE_ITEM_OPTION”:插件的选项,仅当与具有相应“SIZE/OPTION”的 MenuItem 一起使用时才适用。
  • “PIZZA_SIDE”:对于披萨,该插件仅适用于部分披萨/整块披萨(例如左侧、右侧或整个披萨上的蘑菇馅料)。
  • “SIZE”:用于指定附加内容大小的选项(例如,将大薯条作为餐食组合的附加内容)。
  • “OPTION”:除尺寸以外的任何变体。如果您无法区分“SIZE”和“OPTION”,则使用“OPTION”。
value 文字 必需

选项的值。值可以是任何字符串,并按原样显示。以下是有效值:

  • “PIZZA_SIDE”:对于披萨,相应值应为“PIZZA_SIDE_LEFT”“PIZZA_SIDE_RIGHT”或“PIZZA_SIDE_WHOLE”。
  • “APPLICABLE_ITEM_OPTION”:此值应显示在父级 MenuItem 的 menuItemOptions 的相应“OPTION/SIZE”选项之一中。

QuantitativeValue

下表介绍了 QuantitativeValue 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“QuantitativeValue”。
value 数字 选填 定量价值或属性值节点的值。
unitCode Text 或 URL 选填

采用 UN/CEFACT 通用代码或网址形式的衡量单位。

使用 UN/CEFACT 通用代码以外的代码时,可以使用前缀后跟英文冒号。

maxValue 数字 选填 某些特征或属性的上限值。
minValue 数字 选填 某些特征或属性的较低值。

以下示例展示了 QuantitativeValue 类型的用法:

示例 1

"deliveryLeadTime": {
  "@type": "QuantitativeValue",
  "value": "60",
  "unitCode": "MIN"
}

示例 2

"menuAddOn": {
  "@type": "AddOnMenuSection",
  "name": "Cheese",
  "@id": "https://www.example.com/1089/addon/1", // Points to an AddOnMenuSection
  "eligibleQuantity":
    "@type": "QuantitativeValue",
    "minValue": 0,
    "maxValue": 2 // Maximum of 2 cheeses are allowed
  }
}

示例 3

"priceSpecification": [
  {
    "@type": "DeliveryChargeSpecification",
    "@id": "http://www.provider.com/defaultdeliveryfee/foo",
    "price": "10.0",
    "priceCurrency": "USD",
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "minValue": 3  // Minimum of 3 items required for delivery
    }
  },
  {
    "@type": "DeliveryChargeSpecification",
    "@id": "http://www.provider.com/deliveryfee/foo/1",
    "price": "20.0",
    "priceCurrency": "USD",
    "validFrom":"T18:00:00", // Valid from 6:00PM
    "validThrough":"T22:00:00", // Valid to 9:59:59PM
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "minValue": 3  // Minimum of 3 items required for delivery
    }
  }
]

餐馆

下表列出了 Restaurant 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“Restaurant”。
@id 网址 必需 餐馆或送餐服务提供商的唯一标识符。例如“http://www.provider.com/326”,其中“326”是餐馆的唯一标识符。
name 文字 必需 用于在排序过程中识别 Restaurant 的文本。
url 网址 必需 您网域上代表餐馆的网址。例如,“http://www.provider.com/somerestaurant”。
sameAs 网址 选填 餐馆的官方网站。例如,“http://www.somerestaurant.com”。
email 文字 选填 餐馆的联系电子邮件地址。
description 文字 选填 餐馆的说明。
telephone 文字 必需

电话号码,格式如下:

"[+][country_code][phone_#_with_area_code]"

例如,“+16501234567”。

priceRange 文字 选填 价格范围。例如,"$$" ($-Inexpensive, $$-Medium, $$$-Expensive, $$$$-Very Expensive).
logo URL Optional Logo of the restaurant in PNG, JPG, or GIF format. For example, "http://www.somerestaurant.com/logo.png".
image URL Optional Image of the restaurant.
servesCuisine Array of Text Optional Food types that are served at the restaurant. For example, ["sushi","Asian fusion"].
address PostalAddress Required* Address of the restaurant.
geo GeoCoordinates Optional* Geographic coordinates of the restaurant.
suitableForDiet Array of RestrictedDiet Optional Dietary restrictions this restaurant accommodates (like kosher, vegan, or gluten-free diets). It is an enumerated list.
aggregateRating AggregateRating Optional Overall rating, based on a collection of reviews or ratings of the restaurant.
additionalProperty Array of name value string pairs Optional

A restaurant imprint is a section of additional information about the restaurant, such as legal name, legal address, and registration number. This information can be formatted using "\n".

For example "additionalProperty": [{"name": "imprint", "value": "first row\nsecondrow\n"},]

The following examples show the usage of the Restaurant type:

Example 1

{
  "@type": "Restaurant",
  "@id": "http://www.provider.com/somerestaurant",
  "url": "www.provider.com/somerestaurant",
  "name": "Some Restaurant",
  "sameAs": "http://www.somerestaurant.com",
  "image": "http://www.somerestaurant.com/image-of-some-restaurant.jpg",
  "description": "This is the Some Restaurant located on 345 Spear St. San Francisco, 94105 CA. It serves Indian-Mexican fusion cuisine",
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "San Francisco",
    "addressRegion": "CA",
    "postalCode": "94105",
    "streetAddress": "345 Spear St",
    "addressCountry": "US"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": "37.391115",
    "longitude": "-122.081099"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.4",
    "reviewCount": "89"
  },
  "priceRange": "$$",
  "telephone": "+16501234567", // 国家/地区代码 (+1) 为必填项
  "servesCuisine": [
    "印度印度-墨西哥融合"
  ]
},
  
  

示例 2

{
  "@type": "Restaurant",
  "@id": "http://www.example.com/threebrotherstacos",
  "name": "Three Brothers Tacos",
  "address": {
        "@type": "PostalAddress",
        "addressLocality": "Mountain View",
        "addressRegion": "CA",
        "postalCode": "94041",
        "streetAddress": "123 Foo St",
        "addressCountry": "US"
  },
  "additionalProperty": [
    {"name": "imprint", "value": "Three Brothers Tacos\n123 FooSt\nMountain View\nCA 94041, United States\nemail: contact@threebrotherstacos.com\n\nCommercial Register: 123456789"}
  ]
}

如需查看 Restaurant 实体的更多示例,请参阅餐馆和菜单 Feed 示例

ReturnablePackageDepositDetails

要使用此类型,请添加 gs1 上下文:“@context”:

["http://gs1.org/voc/", "http://schema.org"]

然后,将 FoodBeverageTobaccoProduct 添加到相应 MenuItemMenuItemOption 的类型。

下表介绍了 ReturnablePackageDepositDetails 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“ReturnablePackageDepositDetails”。
returnablePackageDepositAmount gs1:PriceSpecification 选填 此商品的存款金额(依据 gs1:PriceSpecification)。例如,每罐可存入 0.25 美元。

以下示例展示了 ReturnablePackageDepositDetails 类型的用法:

{
  "@type": ["MenuItem", "FoodBeverageTobaccoProduct"],
  "@id": "http://www.example.com/bar/menuitem/5",
  "name": "Sparkling Water",
  "description": "A 0.5l bottle of sparking water.",
  "offers": {
    "@type": "Offer",
    "sku": "offer-sparkling-water",
    "price": "1.49",
    "priceCurrency": "USD"
  },
  "packaging": {
    "@type": "PackagingDetails",
    "packagingRecyclingProcessType" :
      "http://gs1.org/voc/PackagingRecyclingProcessTypeCode-REUSABLE",
    "hasReturnablePackageDeposit": {
      "@type": "ReturnablePackageDepositDetails",
      "returnablePackageDepositAmount": {
        "@type": "http://gs1.org/voc/PriceSpecification",
        "http://gs1.org/voc/price": "0.05",
        "http://gs1.org/voc/priceCurrency": "USD"
      }
    }
  }
},

服务

描述由送餐组织将端到端订购操作从餐馆交付到某个地理位置。

下表介绍了 Service 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需

Feed 类型。

  • Service:此类型适用于所有有效的服务 Feed。
  • DisabledService:仅当您因意外事件而必须停用服务实体且您不知道何时重新建立服务时才使用此类型。
@id 网址 必需 执行方式服务的标识符。例如,“http://www.provider.com/service/1”。
description 文字 选填 商品的简介。
serviceType 文字 必需 提供的服务类型。可能的值为“DELIVERY”或“TAKEOUT”。
provider Restaurant 必需 对餐馆唯一标识符的引用。例如,“http://www.provider.com/somerestaurant”。
areaServed GeoShapePlaceGeoCircle 的数组 基于条件 提供服务的地理区域。默认情况下,此字段为选填字段,但如果 serviceType 为“DELIVERY”,则此字段为必填字段。
hoursAvailable OpeningHoursSpecification 的数组 必需 提供此服务的时段。
specialOpeningHoursSpecification OpeningHoursSpecificationServiceDeliveryHoursSpecificationAdvanceServiceDeliveryHoursSpecification 的数组 选填

替换更常规的 OpeningHoursSpecification 或执行方式时间的时间。您通常使用此字段定义节假日以及其他类型的临时停业或营业时间变动。

使用 validFromvalidThrough 属性定义特殊日期范围。指定这些属性时必须提供时间和时区。

offers Offer 的数组 基于条件

指定餐馆的外卖服务详情。默认情况下,此字段是可选的;但如果 serviceType 为“DELIVERY”,则此字段为必填字段。

在 Service 中,Offer.priceSpecification 属性是可选的。此处未使用其他 Offer 属性。

hasOfferCatalog [Menu,OfferCatalog] 必需

为此服务指定菜单。您可以为每项服务(例如外卖、送餐和餐饮)提供不同的菜单。

您必须为该类型同时指定 MenuOfferCatalog。例如:

"hasOfferCatalog": {
"@type": ["Menu", "OfferCatalog"],
"@id": "https://www.provider.com/restaurant/menu/1"
}
additionalProperty {name, value} 的数组 选填

可选的服务配置信息。这些项应为一个具有与可选字段名称相对应的键 name 的对象。键 value 是该字段的上下文相关值。

如需详细了解具体名称和值,请参阅 ServingConfig 参考文档。

"additionalProperty": [{
  "name": "disableOrderInstructions",
  "value": false
}, {
  "name": "disableMenuItemSpecialInstructions",
  "value": false
}, {
  "name": "disableTipWidget",
  "value": false
}, {
  "name": "disablePromoWidget",
  "value": false
}, {
  "name": "menuItemSpecialInstructionsMaxLength",
  "value": 256
}, {
  "name": "orderInstructionsMaxLength",
  "value": 256
}]
potentialAction 网址 选填

包含从端到端点餐体验迁移到重定向时将使用的送餐/外卖服务网址。例如,"potentialAction": { "url": "https://fopatestagent.com/ordering/restaurant-1/delivery" }

以下示例展示了 Service 类型的用法:

示例

{
  "@type": "Service",
  "@id": "http://www.provider.com/service/1",
  "serviceType": "DELIVERY",
  "provider": {
    "@type": "Restaurant",
    "@id": "http://www.provider.com/threebrotherstacos"
  },
  "potentialAction": {
    "url": "https://foprovider.com/ordering/restaurant-1/delivery"
  },
  "hoursAvailable": [
    // Ordering times for Monday through Friday
    {
      "@type": "OpeningHoursSpecification",
      "deliveryHours": [
        {
          "@type": "AdvanceServiceDeliveryHoursSpecification",
          "deliveryLeadTime": {
            "@type": "QuantitativeValue",
            "value": "60",
            "unitCode": "MIN"
          },
          "dayOfWeek": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday"
          ],
          "opens": "T12:00:00", // Advance ordering begins at noon
          "closes": "T23:59:59", // Advance ordering ends at midnight
          "validFrom": "2017-01-01T00:00:00-07:00",
          "validThrough": "2018-12-31T23:59:59-07:00"
        },
        {
          "@type": "ServiceDeliveryHoursSpecification",
          "deliveryLeadTime": {
            "@type": "QuantitativeValue",
            "value": "60",
            "unitCode": "MIN"
          },
          "dayOfWeek": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday"
          ],
          "opens": "T10:00:00", // ASAP ordering begins at 10AM
          "closes": "T14:00:00", // ASAP ordering ends at 2PM
          "validFrom": "2017-01-01T00:00:00-07:00",
          "validThrough": "2018-12-31T23:59:59-07:00"
        }
      ]
    },
    // Ordering times for Saturday and Sunday
    {
      "@type": "OpeningHoursSpecification",
      "deliveryHours": [
        {
          // In this case advance orders are unavailable on Saturday and Sunday
          "@type": "ServiceDeliveryHoursSpecification",
          "deliveryLeadTime": {
            "@type": "QuantitativeValue",
            "value": "60",
            "unitCode": "MIN"
          },
          "dayOfWeek": [
            "Saturday",
            "Sunday"
          ],
          "opens": "T12:00:00", // ASAP orders start at noon
          "closes": "T23:59:59", // ASAP orders end at midnight
          "validFrom": "2017-01-01T00:00:00-07:00",
          "validThrough": "2018-12-31T23:59:59-07:00"
        }
      ]
    }
  ],
  "hasOfferCatalog": {
    "@type": ["Menu", "OfferCatalog"],
    "@id": "https://www.provider.com/menu/1"
  },
  "areaServed": [{
      "@type": "GeoCircle", // area1
      "geoMidpoint": {
        "@type": "GeoCoordinates",
        "latitude": "42.362757",
        "longitude": "-71.087109"
      },
      "geoRadius": "10000"
    },
    {
      "@type": "Place", // area2
      "address": {
        "@type": "PostalAddress",
        "postalCode": "94041",
        "addressCountry": "US"
      }
    },
    {
      "@type": "GeoShape", // area3
      // Specify latitude first (i.e., lat long lat long ...)
      "polygon": "37.418128 -122.098167 37.382755 -122.118968 37.368551 -122.047978 37.400949 -122.048106 37.418128 -122.098167"
    },
    {
      "@type": "GeoShape", // area4
      // Specify latitude first (i.e., lat long lat long ...)
      "polygon": "37.806000 -122.425592 37.775849 -122.419043 37.795547 -122.394046 37.808747 -122.412619"
    },
    {
      "@type": "GeoCircle", // area5
      "geoMidpoint": {
        "@type": "GeoCoordinates",
        "latitude": "37.7392607",
        "longitude": "-122.3895522"
      },
      "geoRadius": "4505"
    }
  ],
  "offers": {
    "@type": "Offer",
    "priceSpecification": [{
        "@type": "DeliveryChargeSpecification",
        "@id": "http://www.provider.com/threebrotherstacos/deliveryfee/1",
        "price": "8.00", // Charges $8 for area5
        "priceCurrency": "USD",
        "eligibleTransactionVolume": {
          "@type": "PriceSpecification",
          "minPrice": "20.00",
          "priceCurrency": "USD"
        },
        "eligibleRegion": [ // area5
          {
            "@type": "GeoCircle",
            "geoMidpoint": {
              "@type": "GeoCoordinates",
              "latitude": "37.7392607",
              "longitude": "-122.3895522"
            },
            "geoRadius": "4505"
          }
        ]
      },
      {
        "@type": "DeliveryChargeSpecification",
        "@id": "http://www.provider.com/threebrotherstacos/defaultdeliveryfee",
        "price": "6.00", // Charges $6 when delivered from Foo restaurant to area1, area2, area3 and area4 (Default charge)
        "priceCurrency": "USD",
        "eligibleTransactionVolume": {
          "@type": "PriceSpecification",
          "minPrice": "20.00", // Minimum order price for delivery is $20
          "priceCurrency": "USD"
        }
      }
    ]
  }
},

如需查看 Service 实体的更多示例,请参阅服务 Feed 示例

ServiceDeliveryHoursSpecification

表示用户安排“尽快”配送订单和外卖的履单时间。

通常,opens 的值小于 closes 的值。使用 openscloses 属性时,请遵循以下准则:

  • openscloses 属性对于 ServiceDeliveryHoursSpecification 而言是可选的,但我们强烈建议您添加这些属性。
  • 必须为服务指定当地时间。请勿在 openscloses 值中添加时区。如果指定了时区,Google 会忽略时区信息。
  • 如果未明确指定 openscloses,我们将假定“尽快”排序每天都可用。
  • 如果 openscloses 相同,我们假定“尽快”排序不可用。
  • 如果 opens 大于 closes,则将结束营业时间解读为第二天。例如,如果将开门时间设为 1 月 1 日下午 5 点,打烊时间是 2 点,则系统认为该餐厅 1 月 2 日凌晨 2 点打烊。

下表介绍了 ServiceDeliveryHoursSpecification 类型的属性:

媒体资源 类型 必要性 说明
@type 文字 必需 始终为“ServiceDeliveryHoursSpecification”。
validFrom DateTime 选填

用户尽快履行订单的日期和时间(包括时区)。例如,“2017-05-01T07:00:00-07:00”。如果未设置此属性,则系统假定它每天都有效。

如需了解详情,请参阅日期和时间格式

validThrough DateTime 选填

超过这个日期和时间(包括时区)后,用户将无法履行用户的 ASAP 订单。例如,“2017-05-01T07:00:00-07:00”。如果未设置此属性,则系统假定它每天都有效。

validThrough 此时间不在此时间范围内。例如,如果该时间设置为下午 6 点,则时间最长为下午 5:59:59。

如需了解详情,请参阅日期和时间格式

opens Time 选填

送货服务开始为用户尽快履行订单的时间。例如,“T10:30:00”。

必须为服务指定当地时间。请勿在 opens 值中添加时区。如果指定了时区,Google 会忽略此信息。

如需了解详情,请参阅日期和时间格式

closes Time 选填

用户 ASAP 订单的送货服务已不再可用。例如,“T23:59:59”。

closes 此时间不在此时间范围内。因此,如果您将此 ServiceDeliveryHoursSpecification 的打开/关闭时间设置为上午 10 点和下午 4 点,则最后一个订单是下午 3:59:59。

必须为服务指定当地时间。请勿在 closes 值中添加时区。如果指定了时区,Google 会忽略此信息。

如需了解详情,请参阅日期和时间格式

dayOfWeek DayOfWeek 的数组 选填

用户的“尽快”订单可在星期几使用此服务。以下是有效值:

  • “星期一”
  • “星期二”
  • “星期三”
  • “星期四”
  • “星期五”
  • “星期六”
  • “星期日”

如果您未指定一周中的任何一天,则 ServiceDeliveryHoursSpecification 会应用于所有日期。

deliveryLeadTime QuantitativeValue 选填 下单后预计送货时间(以分钟为单位)。我们强烈建议您设置此属性。将 QuantitativeValuevalue 字段设置为分钟,并将 unitCode 设置为“MIN”。

下例展示了一个 ServiceDeliveryHoursSpecification 元素:

示例 1

{
  "@type": "ServiceDeliveryHoursSpecification",
  "opens": "T08:00:00",
  "closes": "T17:00:00",
  "deliveryLeadTime": {
    "@type": "QuantitativeValue",
    "value": "60", // If no exact deliveryLeadTime, put a maximum time
    "unitCode": "MIN"
  }
},

示例 2

{
  "@type": "ServiceDeliveryHoursSpecification",
  "opens": "T08:00:00",
  "closes": "T17:00:00",
  "deliveryLeadTime": {
    "@type": "QuantitativeValue",
    "minValue": "30",
    "maxValue": "50",
    "unitCode": "MIN"
  }
}
    

枚举

RestrictedDiet

RestrictedDiet 类型具有以下可能的值:

  • http://schema.org/DiabeticDiet
  • http://schema.org/GlutenFreeDiet
  • http://schema.org/HalalDiet
  • http://schema.org/HinduDiet
  • http://schema.org/KosherDiet
  • http://schema.org/LowCalorieDiet
  • http://schema.org/LowFatDiet
  • http://schema.org/LowLactoseDiet
  • http://schema.org/LowSaltDiet
  • http://schema.org/VeganDiet
  • http://schema.org/VegetarianDiet