本页面提供了 Schema.org 酒店结构化数据标记的技术规格和词汇参考。
概览
酒店价格结构化数据提供了一种机器可读的标准化格式,用于解释、验证和显示您网站上列出的酒店价格,无论您的图文并茂如何。这包括基本价格、费率、客房规格、明细费用和税费以及预订政策。
Google 建议您使用 Schema.org 提供的标准化结构化数据为网页添加注释,以便从网页中准确提取价格。
标准结构化数据可提高抓取工具的可靠性、增加价格准确性验证次数、支持直接调试价格准确性问题并保持一致的价格准确性得分,从而实现大规模的价格准确性验证。
如果您不熟悉结构化数据,请详细了解结构化数据词汇表和格式。
默认情况下,Google 酒店推荐使用微数据格式为网页添加注释,以便进行酒店价格准确性检查。独立结构化数据提取(包括 JSON-LD 格式)已弃用,不再用于价格准确性验证;新的和迁移的实现必须遵循抓取工具导航和价格标记指南。请注意,此弃用仅适用于酒店价格准确性验证,不会影响 Google 范围内结构化数据的其他用途(例如 Google 搜索富媒体搜索结果)。如需详细了解常规搜索功能支持的格式,请参阅支持的格式。
本文档提供了酒店微数据属性的 Schema.org 词汇参考。
Hotel 结构化数据用于为网页中酒店特有的字段添加注释。Hotel 结构化数据具有以下属性:
makesOffer属性
HotelRoom 结构化数据是可选的,可用于在网页中为特定于客房的字段添加注释(自动价格准确性验证仅要求在 Hotel.makesOffer 下提供酒店级入住总价)。
HotelRoom 结构化数据具有以下属性:
offers属性availability属性
导航属性用于向抓取工具解释互动元素和页面状态。如需了解详情,请参阅导航标记。
酒店结构化数据
以下属性适用于 Hotel 实体。
name 和 address 属性
name 和 address 属性用于为酒店的名称和位置添加注释。以下是 name 和 address 属性:
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">hotel-name</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">1234 Main St.</span>,
<span itemprop="addressLocality">City Name</span>,
<span itemprop="addressRegion">State Name</span>
<span itemprop="postalCode">01234</span>
<span itemprop="addressCountry">XX</span>
</div>
</div>
语法
name 和 address 属性使用以下语法:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">hotel-name</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">1234 Main St.</span>,
<span itemprop="addressLocality">City Name</span>,
<span itemprop="addressRegion">State Name</span>
<span itemprop="postalCode">01234</span>
<span itemprop="addressCountry">XX</span>
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "hotel-name",
"identifier": "hotel-id-1234",
"address": {
"@type": "PostalAddress",
"addressCountry": "XX",
"addressLocality": "City Name",
"addressRegion": "State Name",
"postalCode": "01234",
"streetAddress": "1234 Main St."
},
"makesOffer": {
"@type": ["Offer", "LodgingReservation"]
...
}
}
属性
以下是 name 和 address 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| Hotel.name | Required | string | 酒店的名称。 直接封装可见的酒店名称文本(例如 |
| Hotel.identifier | Required | string | 合作伙伴的酒店 ID。 标识符必须是每家酒店的唯一字符串,并且应与价格 Feed 中使用的字符串完全一致。 |
| Hotel.address | Optional | PostalAddress | 酒店的地址或位置。 |
姓名和地址示例
以下是添加 name 和 address 注解的基本示例:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<h1 itemprop="name">Mountain Hotel</h1>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">Technikerstrasse 21</span>,
<span itemprop="addressLocality">Innsbruck</span>,
<span itemprop="addressRegion">Tyrol</span>
<span itemprop="postalCode">6020</span>
<span itemprop="addressCountry">AT</span>
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "Mountain Hotel",
"identifier": "hotel-id-1234",
"address": {
"@type": "PostalAddress",
"addressCountry": "AT",
"addressLocality": "Innsbruck",
"addressRegion": "Tyrol",
"postalCode": "6020",
"streetAddress": "Technikerstrasse 21"
},
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
}
}
makesOffer 个房源
makesOffer 注解用于标记酒店行程。
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="YYYY-MM-DD">YYYY-MM-DD</time>
Check-out: <time itemprop="checkoutTime" content="YYYY-MM-DD">YYYY-MM-DD</time>
<meta itemprop="availability" content="https://schema.org/InStock"/>
...
</div>
语法
makesOffer 属性使用以下语法:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">hotel-name</span>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="YYYY-MM-DDTHH:mm:ss">YYYY-MM-DD[THH:mm:ss]</time>
Check-out: <time itemprop="checkoutTime" content="YYYY-MM-DDTHH:mm:ss">YYYY-MM-DD[THH:mm:ss]</time>
<meta itemprop="availability" content="https://schema.org/InStock"/>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
...
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "hotel-name",
"identifier": "hotel-id-1234",
"address": { ... },
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"availability": "https://schema.org/InStock",
"priceSpecification": { ... }
}
}
属性
以下是 makesOffer 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| makesOffer | Required | Offer and LodgingReservation | 指定行程的酒店优惠。指定入住人数( 在最终结账页面上,仅标记与在 Google 上选择的房价对应的单个所选优惠。 |
| LodgingReservation.checkinTime | Required | DateTime | 入住日期 ( 在 |
| LodgingReservation.checkoutTime | Required | DateTime | 用户所在时区的退房日期 ( 在 |
makesOffer 示例
以下是为酒店优惠添加注释的基本示例。如需在最终结账页上进行自动价格准确性验证,请仅为所选的单个优惠添加代码(显示多优惠数组仅供旧版参考)。指定的价格金额包含所有适用税费。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">Mountain Hotel</span>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1200.74</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "Mountain Hotel",
"identifier": "hotel-id-1234",
"address": { ... },
"makesOffer": [
{
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
},
{
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1200.74,
"priceCurrency": "USD"
}
}
]
}
Hotel priceSpecification 个房源
此属性用于为酒店或酒店客房的价格信息添加注释,并捆绑在 Offer 范围内。
CompoundPriceSpecification(包含总住宿费用 price [包括所有强制性税费和其他费用] 以及 priceCurrency)是必需的。用于基本费率、折扣或个别税费(例如 ResortFee、GenericTax 和 ServiceFee)的明细子 UnitPriceSpecification (priceComponent) 元素是可选的,但建议使用,以简化问题排查。添加可选的 priceComponent 元素时,父级 CompoundPriceSpecification 容器必须同时封装总 price 和所有子级 priceComponent 元素。
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<!-- Optional itemized breakdown -->
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<meta itemprop="priceComponentType" content="GenericTax"/>
</div>
</div>
语法
Hotel priceSpecification 属性使用以下语法:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">hotel-name</span>
...
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name"></span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<meta itemprop="priceComponentType" content="GenericTax"/>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Discount</span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<meta itemprop="priceComponentType" content="Discount"/>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
...
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
...
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "",
"price": "float",
"priceCurrency": "currency"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": "float",
"priceCurrency": "currency",
"priceComponentType": "GenericTax",
"potentialAction": {
"@type": "https://schema.org/PayAction",
"recipient": {
"@type": "OnlineBusiness",
"name": "name-of-the-business"
}
}
},
{
"@type": "UnitPriceSpecification",
"name": "Discount",
"price": "float",
"priceCurrency": "currency",
"priceComponentType": "Discount"
}
]
}
}
}
属性
以下是 hotel priceSpecification 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| Hotel.Offer.priceSpecification.price | Required | float | 住宿总价,包括所有强制性税费(即使是必须在酒店支付的强制性费用,不包括可选的加购项)。 仅将可见的价格数字本身封装在 |
| Hotel.Offer.priceSpecification.priceCurrency | Required | currency | 指定价格对应的货币代码,由 3 个字母组成。例如:"USD"。 |
| Hotel.Offer.priceSpecification.priceComponent | Optional | UnitPriceSpecification[] | 酒店的总价明细,包括税费和其他费用。 价格结构化数据分为两种类型:
如果您选择添加可选的 |
| Hotel.Offer.priceSpecification.priceComponent. potentialAction | Optional | PayAction | 酒店付款点。酒店付款流程包括在预订网站上结账时以及在酒店办理入住时收取的费用。 您应使用与 Google 支持
|
示例
以下是酒店价格规范示例。
价格
以下是将价格结构化数据添加到网页的基本示例。如需在最终结账页上进行自动价格准确性验证,请仅标记所选的单个优惠(显示多优惠数组仅供旧版参考)。
如果您选择指定 address 属性,则必须指定 PostalAddress 类型(例如 addressCountry、postalCode、streetAddress)和其他字段。指定的价格金额包含所有适用税费。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">ACME Hotel</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">Technikerstrasse 21</span>,
<span itemprop="addressLocality">Innsbruck</span>,
<span itemprop="addressRegion">Tyrol</span>
<span itemprop="postalCode">6020</span>
<span itemprop="addressCountry">AT</span>
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1200.74</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"identifier": "hotel-id-1234",
"address": {
"@type": "PostalAddress",
"addressCountry": "AT",
"addressLocality": "Innsbruck",
"addressRegion": "Tyrol",
"postalCode": "6020",
"streetAddress": "Technikerstrasse 21"
},
"makesOffer": [
{
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
},
{
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1200.74,
"priceCurrency": "USD"
}
}
]
}
价格明细
以下是包含价格明细的 priceSpecification 属性示例。基本费率、税费(例如一般税费)和折扣使用 UnitPriceSpecification 组件定义。请务必将 priceComponentType 字段设置为与 UnitPriceSpecification 组件对应的值。
应在 CompoundPriceSpecification 属性中指定住宿晚数的总价。应在 priceComponent 属性中指定价格明细。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<h1 itemprop="name">ACME Hotel</h1>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">123 Main street</span>,
<span itemprop="addressLocality">Mountain View</span>,
<span itemprop="addressRegion">Santa Clara</span>
<span itemprop="postalCode">94040</span>
<span itemprop="addressCountry">US</span>
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
Total Price: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
<!-- Price Components -->
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Base Rate</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1150</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">172.74</span>
<meta itemprop="priceComponentType" content="GenericTax" />
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Discount</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">-100</span>
<meta itemprop="priceComponentType" content="Discount" />
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"identifier": "hotel-id-1234",
"address": {...},
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "",
"price": 1150,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": 172.74,
"priceCurrency": "USD",
"priceComponentType": "GenericTax"
},
{
"@type": "UnitPriceSpecification",
"name": "Discount",
"price": -100,
"priceCurrency": "USD",
"priceComponentType": "Discount"
}
]
}
}
}
付款点
以下是使用 PayAction 的收件人类型时的 potentialAction 规范示例。
套餐总价为 1,170 美元,在线网站在预订时收取总价的一部分,即 1,150 美元(使用 "@type": "OnlineBusiness" 指定),用户必须在酒店入住时支付剩余的 20 美元(使用 "@type": "Hotel" 指定)。
您必须指定 potentialAction 组件,才能细分预订时和在酒店支付的款项。如果未指定,payAction 会将预订时的支付方式解读为默认支付方式。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">ACME Hotel</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
Price Due: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1170</span>
<!-- Paid Online -->
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1150</span>
<div itemprop="potentialAction" itemscope itemtype="https://schema.org/PayAction">
<div itemprop="recipient" itemscope itemtype="https://schema.org/OnlineBusiness">
<span itemprop="name">myonlinebusiness</span>
</div>
</div>
</div>
<!-- Paid at Hotel -->
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">20</span>
<div itemprop="potentialAction" itemscope itemtype="https://schema.org/PayAction">
<div itemprop="recipient" itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">The Langham, Boston</span>
</div>
</div>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"identifier": "hotel-id-1234",
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1170,
"priceCurrency": "USD",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"price": 1150,
"priceCurrency": "USD",
"potentialAction": {
"@type": "https://schema.org/PayAction",
"recipient": {
"@type": "OnlineBusiness",
"name": "myonlinebusiness"
}
}
},
{
"@type": "UnitPriceSpecification",
"price": 20,
"priceCurrency": "USD",
"potentialAction": {
"@type": "https://schema.org/PayAction",
"recipient": {
"@type": "Hotel",
"name": "The Langham, Boston",
"address": { ... }
}
}
}
]
}
}
}
hasMerchantReturnPolicy 个房源
此属性用于在行程中添加商家退款政策注释。
<div itemprop="hasMerchantReturnPolicy" itemscope itemtype="https://schema.org/MerchantReturnPolicy">
<link itemprop="returnPolicyCategory" href="https://schema.org/MerchantReturnFiniteReturnWindow"/>
<link itemprop="refundType" href="https://schema.org/FullRefund"/>
<meta itemprop="merchantReturnDays" content="YYYY-MM-DDTHH:mm:ss"/>
<meta itemprop="restockingFee" content="0"/>
</div>
语法
hasMerchantReturnPolicy 的语法如下:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
...
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
<div itemprop="hasMerchantReturnPolicy" itemscope itemtype="https://schema.org/MerchantReturnPolicy">
<link itemprop="returnPolicyCategory" href="https://schema.org/MerchantReturnFiniteReturnWindow"/>
<link itemprop="refundType" href="https://schema.org/FullRefund"/>
<meta itemprop="merchantReturnDays" content="YYYY-MM-DDTHH:mm:ss"/>
<meta itemprop="restockingFee" content="0"/>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
...
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"priceSpecification": { ... },
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"refundType": "https://schema.org/FullRefund",
"merchantReturnDays": "YYYY-MM-DD[THH:mm:ss]",
"restockingFee": 0
}
}
}
属性
以下是 hasMerchantReturnPolicy 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| Offer.hasMerchantReturnPolicy | Optional | MerchantReturnPolicy | 商家退款政策。合作伙伴应使用 如果未指定 |
退货政策示例
以下是酒店结构化数据的基本示例,其中包含客房详情以及含税费和其他费用的总价。此示例表示,在 2023 年 12 月 18 日晚上 11 点(世界协调时间)之前,可以免费取消住宿。合作伙伴应使用 "MerchantReturnPolicy.restockingFee" 来指明不退还全额住宿费用的取消政策。restockingFee 默认为 $0。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">ACME Hotel</span>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
<div itemprop="hasMerchantReturnPolicy" itemscope itemtype="https://schema.org/MerchantReturnPolicy">
<link itemprop="returnPolicyCategory" href="https://schema.org/MerchantReturnFiniteReturnWindow"/>
<link itemprop="refundType" href="https://schema.org/FullRefund"/>
Cancellation Deadline: <time itemprop="merchantReturnDays" content="2023-12-18T23:00:00">2023-12-18 23:00:00</time>
Fee: $<span itemprop="restockingFee">0</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"identifier": "hotel-id-1234",
"description": "Beautiful resort in the outskirts of the city",
"address": {...},
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-12-15 16:00:00",
"checkoutTime": "2023-12-20 11:00:00",
"priceSpecification": {...},
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"refundType": "https://schema.org/FullRefund",
"merchantReturnDays": "2023-12-18 23:00:00",
"restockingFee": 0
}
}
}
eligibleCustomerType 个房源
此属性可用于为酒店会员客户提供的奖励计划添加注释。
<meta itemprop="eligibleCustomerType" content="RewardsMember"/>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
</div>
语法
eligibleCustomerType 属性的语法如下:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
...
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="eligibleCustomerType" content="RewardsMember"/>
...
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
...
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"eligibleCustomerType": "RewardsMember",
"priceSpecification": { ... }
}
}
属性
以下是 eligibleCustomerType 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| Offer.eligibleCustomerType | Optional | BusinessEntityType | 为客户提供的会员回馈活动或会员奖励。 许多酒店页面会同时显示会员价和公开价,以鼓励用户注册其会员回馈活动。您可以通过设置Offer.eligibleCustomerType 属性来指定仅限特定受众群体(例如会员)享受的费率。 |
示例
以下是奖励会员价的示例。
会员房价
以下是会员回馈活动的会员价或封闭价格规范的基本示例。客户是酒店的“奖励会员”。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">ACME Hotel</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<!-- Address details -->
</div>
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<span itemprop="name">RewardsMember</span>
<meta itemprop="eligibleCustomerType" content="RewardsMember"/>
Check-in: <time itemprop="checkinTime" content="2023-12-15T16:00:00">Dec 15, 2023 4:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-12-20T11:00:00">Dec 20, 2023 11:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
Total: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1342.74</span>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Base rate</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1069.98</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">172.74</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">ResortFee</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">100</span>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"identifier": "hotel-id-1234",
"address": {...},
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"name": "RewardsMember",
"checkinTime": "2023-12-15 16:00:00",
"checkoutTime": "2023-12-20 11:00:00",
"eligibleCustomerType": "RewardsMember",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1342.74,
"priceCurrency": "USD",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "Base rate",
"price": 1069.98,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": 172.74,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "ResortFee",
"price": 100,
"priceCurrency": "USD"
}
]
}
}
}
会员价和常规价
以下是常规价格和会员价价格注释的示例。系统会先列出会员价格,然后列出常规价格。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">ACME Hotel</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<!-- Address details -->
</div>
<!-- Member Rate -->
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<span itemprop="name">RewardsMember</span>
<meta itemprop="eligibleCustomerType" content="RewardsMember"/>
Check-in: <time itemprop="checkinTime" content="2023-12-15T16:00:00">Dec 15, 2023 4:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-12-20T11:00:00">Dec 20, 2023 11:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
Total: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1342.74</span>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Base rate</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1069.98</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">172.74</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">ResortFee</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">100</span>
</div>
</div>
</div>
<!-- Regular Rate -->
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<span itemprop="name">regularRate</span>
Check-in: <time itemprop="checkinTime" content="2023-12-15T16:00:00">Dec 15, 2023 4:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-12-20T11:00:00">Dec 20, 2023 11:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
Total: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1572.24</span>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Base rate</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1369.98</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">202.26</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">ResortFee</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">100</span>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"identifier": "hotel-id-1234",
"address": {...},
"makesOffer": [
{
"@type": ["Offer", "LodgingReservation"],
"name": "RewardsMember",
"checkinTime": "2023-12-15 16:00:00",
"checkoutTime": "2023-12-20 11:00:00",
"eligibleCustomerType": "RewardsMember",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1342.74,
"priceCurrency": "USD",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "Base rate",
"price": 1069.98,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": 172.74,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "ResortFee",
"price": 100,
"priceCurrency": "USD"
}
]
}
},
{
"@type": ["Offer", "LodgingReservation"],
"name": "regularRate",
"checkinTime": "2023-12-15 16:00:00",
"checkoutTime": "2023-12-20 11:00:00",
"priceSpecification": {
"price": 1572.24,
"priceCurrency": "USD",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "Base rate",
"price": 1369.98,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": 202.26,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "ResortFee",
"price": 100,
"priceCurrency": "USD"
}
]
}
}
]
}
HotelRoom结构化数据
以下属性适用于 HotelRoom 实体。
offers 个房源
offers 注解用于标记客房行程。您应使用 offers 属性来指定 HotelRoom。
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="hotel-room-id-1234"/>
Check-in: <time itemprop="checkinTime" content="YYYY-MM-DD">YYYY-MM-DD</time>
Check-out: <time itemprop="checkoutTime" content="YYYY-MM-DD">YYYY-MM-DD</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
...
</div>
</div>
语法
offers 属性的语法如下:
微数据
<div itemscope itemtype="https://schema.org/HotelRoom">
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="YYYY-MM-DDTHH:mm:ss">YYYY-MM-DD[THH:mm:ss]</time>
Check-out: <time itemprop="checkoutTime" content="YYYY-MM-DDTHH:mm:ss">YYYY-MM-DD[THH:mm:ss]</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
...
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "HotelRoom",
"identifier": "hotel-room-id-1234",
"offers": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency",
...
}
}
}
属性
以下是 offers 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| offers | Required | Offer and LodgingReservation | 指定行程的客房价格规范。
|
| LodgingReservation.checkinTime | Required | DateTime | 用户所在时区的入住时间。如果未提及您的时区,则系统会考虑酒店时区。 |
| LodgingReservation.checkoutTime | Required | DateTime | 用户所在时区的退房时间。如果未提及您的时区,则系统会考虑酒店时区。 |
offers 示例
微数据
<div itemscope itemtype="https://schema.org/HotelRoom">
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="rate-plan-id-of-member-rate"/>
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "HotelRoom",
"identifier": "hotel-room-id-1234",
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
}
}
bed 和 occupancy 属性
bed 属性用于标注客房内的床型和床位数量。occupancy 属性用于标注房间内的房客人数。您可以使用 HotelRoom 属性指定 bed 和 occupancy 属性。
<div itemscope itemtype="https://schema.org/Hotel">
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<meta itemprop="identifier" content="hotel-room-id"/>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">integer</span>
<span itemprop="typeOfBed">KING</span>
</div>
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">integer</span>
</div>
</div>
</div>
语法
bed 和 occupancy 属性具有以下语法:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">hotel-name</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">room-name</span>
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<!-- Bed Details -->
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">integer</span>
<span itemprop="typeOfBed">KING</span>
</div>
<!-- Occupancy -->
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">integer</span>
</div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "hotel-name",
"identifier": "hotel-id-1234",
"containsPlace": {
"@type": ["HotelRoom", "Product"],
"name": "room-name",
"identifier": "hotel-room-id-1234",
"bed": {
"@type": "BedDetails",
"numberOfBeds": "integer",
"typeOfBed": "KING"
},
"occupancy": {
"@type": "QuantitativeValue",
"value": "integer"
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency",
"priceComponent": {
"@type": "UnitPriceSpecification",
"name": "",
"price": "float",
"priceCurrency": "currency"
},
...
}
}
}
}
bed 和 occupancy 属性只能使用 HotelRoom 属性进行设置。您可以通过 containsPlace 属性将特定于客房的信息(包括客房级房价)添加到 Hotel 属性中。请参阅 Hotel 和 HotelRoom 规范示例。
属性
以下是 bed 和 occupancy 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| HotelRoom.bed | Optional (Recommended) | bed | 住宿中包含的床位类型以及客房内的入住人数。 支持的值如下:
|
| HotelRoom.occupancy | Optional (Recommended) | QuantitativeValue | 酒店客房的入住人数。入住人数的类型为 |
| containsPlace | Optional (Recommended) | LocationFeatureSpecification | 它用于注释与特定客房关联的客房级房价。它还可用于指定客房内的设施。 详细了解如何在
amenityFeature 属性中使用 |
示例
以下是床位和入住人数规范的示例。
HotelRoom 示例
以下是房间规格的床位和入住人数的基本示例。
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<span itemprop="name">Deluxe Room, 1 King Bed</span>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">KING</span>
</div>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">SINGLE</span>
</div>
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">2</span>
</div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="rate-plan-id-of-member-rate"/>
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": ["HotelRoom", "Product"],
"name": "Deluxe Room, 1 King Bed",
"identifier": "hotel-room-id-1234",
"bed": [
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "KING"
},
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "SINGLE"
}
],
"occupancy": {
"@type": "QuantitativeValue",
"value": 2
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
}
}
Hotel 和 HotelRoom 示例
以下是为 Hotel 和 HotelRoom 属性以及 bed、occupancy 和 priceSpecification 添加注解的示例。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">hotel-name</span>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Deluxe Room, 1 King Bed</span>
<meta itemprop="identifier" content="hotel-room-id"/>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">KING</span>
</div>
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">2</span>
</div>
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Minibar</span>
<meta itemprop="value" content="true"/>
</div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="rate-plan-id-of-member-rate"/>
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "hotel-name",
"identifier": "hotel-id-1234",
"containsPlace": {
"@type": ["HotelRoom", "Product"],
"name": "Deluxe Room, 1 King Bed",
"identifier": "hotel-room-id",
"bed": {
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "KING"
},
"occupancy": {
"@type": "QuantitativeValue",
"value": 2
},
"amenityFeature": {
"@type": "LocationFeatureSpecification",
"name": "Minibar",
"value": true
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
}
}
}
HotelRoom priceSpecification 个房源
酒店客房价格说明与酒店价格说明类似。不同之处在于,客房价格是使用 Product.offers 属性(而非 Hotel.makesOffer 属性)指定的。
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<!-- Optional itemized breakdown -->
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
</div>
</div>
语法
酒店客房的 priceSpecification 属性采用以下语法:
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
...
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name"></span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<meta itemprop="priceComponentType" content="GenericTax"/>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Discount</span>
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">float</span>
<meta itemprop="priceComponentType" content="Discount"/>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": ["HotelRoom", "Product"],
...
"bed": {
"@type": "BedDetails",
"numberOfBeds": "integer",
"typeOfBed": "KING"
},
"occupancy": {
"@type": "QuantitativeValue",
"value": "integer"
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
...
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "",
"price": "float",
"priceCurrency": "currency"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": "float",
"priceCurrency": "currency",
"priceComponentType": "GenericTax"
},
{
"@type": "UnitPriceSpecification",
"name": "Discount",
"price": "float",
"priceCurrency": "currency",
"priceComponentType": "Discount"
}
]
}
}
}
属性
以下是 HotelRoom priceSpecification 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| HotelRoom.offers.priceSpecification.price | Required | float | 每间客房的总住宿价格,包括所有强制性税费(即使是必须在酒店支付的强制性费用,不包括可选的附加服务)。 仅将可见的价格数字本身封装在 |
| HotelRoom.offers.priceSpecification.priceCurrency | Required | currency | 指定价格对应的货币代码,由 3 个字母组成。例如:"USD"。 |
| HotelRoom.offers.priceSpecification.priceComponent | Optional | UnitPriceSpecification[] | 酒店客房和入住人数的总价明细(包括税费和其他费用),其中优惠与
|
示例
以下是 HotelRoom 价格规范的示例。
房间总价示例
以下是定义住宿晚数总价和每位入住者价格的基本示例。
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Deluxe Room King, 1 Single Bed</span>
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">KING</span>
</div>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">SINGLE</span>
</div>
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">2</span>
</div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1232.74</span>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": ["HotelRoom", "Product"],
"name": "Deluxe Room King, 1 Single Bed",
"identifier": "hotel-room-id-1234",
"bed": [
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "KING"
},
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "SINGLE"
}
],
"occupancy": {
"@type": "QuantitativeValue",
"value": 2
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1232.74,
"priceCurrency": "USD"
}
}
}
房间价格明细示例
以下是按客房或方案定价的示例。价格明细是针对客房类型(例如 Deluxe 客房)、bed 和 occupancy 类型(例如 KING 和 SINGLE 床位)以及 2 位客人的入住人数定义的。
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Deluxe Room King, 1 Single Bed</span>
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="rate-plan-id-of-member-rate"/>
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">KING</span>
</div>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">SINGLE</span>
</div>
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">2</span>
</div>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
Total: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Base rate</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1150</span>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">GenericTax</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">172.74</span>
<meta itemprop="priceComponentType" content="GenericTax"/>
</div>
<div itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">Discount</span>: <span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">-100</span>
<meta itemprop="priceComponentType" content="Discount"/>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": ["HotelRoom", "Product"],
"name": "Deluxe Room King, 1 Single Bed",
"identifier": "hotel-room-id-1234",
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"bed": [
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "KING"
},
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "SINGLE"
}
],
"occupancy": {
"@type": "QuantitativeValue",
"value": 2
},
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "Base rate",
"price": 1150,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": 172.74,
"priceCurrency": "USD",
"priceComponentType": "GenericTax"
},
{
"@type": "UnitPriceSpecification",
"name": "Discount",
"price": -100,
"priceCurrency": "USD",
"priceComponentType": "Discount"
}
]
}
}
}
includesObject 个房源
此属性用于标注酒店或客房提供的特定房价服务,例如餐饮选项和代客泊车服务。您可以在 Hotel 或 HotelRoom 属性中为 includesObject 添加注解。
<div itemprop="includesObject" itemscope itemtype="https://schema.org/TypeAndQuantityNode">
<div itemprop="typeOfGood" itemscope itemtype="https://schema.org/Service">
<span itemprop="name">Valet</span>
</div>
</div>
<div itemprop="includesObject" itemscope itemtype="https://schema.org/TypeAndQuantityNode">
<meta itemprop="amountOfThisGood" content="float"/>
<meta itemprop="unitText" content="currency"/>
<div itemprop="typeOfGood" itemscope itemtype="https://schema.org/FoodService">
<span itemprop="name">MealCredit</span>
</div>
</div>
语法
includesObject 具有以下语法,适用于客房内提供的特定费率服务:
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
...
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
<div itemprop="includesObject" itemscope itemtype="https://schema.org/TypeAndQuantityNode">
<div itemprop="typeOfGood" itemscope itemtype="https://schema.org/Service">
<span itemprop="name">Valet</span>
</div>
</div>
<div itemprop="includesObject" itemscope itemtype="https://schema.org/TypeAndQuantityNode">
<meta itemprop="amountOfThisGood" content="float"/>
<meta itemprop="unitText" content="currency"/>
<div itemprop="typeOfGood" itemscope itemtype="https://schema.org/FoodService">
<span itemprop="name">MealCredit</span>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
...
"@type": ["HotelRoom", "Product"],
...
"offers": {
"@type": ["Offer", "LodgingReservation"],
...
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency"
},
"includesObject": [
{
"@type": "TypeAndQuantityNode",
"typeOfGood": {
"@type": "Service",
"name": "Valet"
}
},
{
"@type": "TypeAndQuantityNode",
"amountOfThisGood": "float",
"unitText": "currency",
"typeOfGood": {
"@type": "FoodService",
"name": "MealCredit"
}
}
]
}
}
属性
includesObject 具有以下属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| Offer.includesObject | Optional | TypeAndQuantityNode | 酒店或客房内提供的服务。
基础级优惠中可能还会包含特定于费率的功能,或者这些功能可能会被指定为加购项,需要额外付费。
|
includesObject 示例
以下是代客泊车和餐饮服务的费率特定功能的基本示例。应使用 Offer.includesObject 属性指定特定于费率的功能。TypeAndQuantityNode.typeOfGood 上的名称字段应用于指明服务类型。
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Deluxe Room, 1 King Bed</span>
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="rate-plan-id-of-member-rate"/>
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
<!-- Included Services -->
<div itemprop="includesObject" itemscope itemtype="https://schema.org/TypeAndQuantityNode">
<div itemprop="typeOfGood" itemscope itemtype="https://schema.org/Service">
<span itemprop="name">Valet</span>
</div>
</div>
<div itemprop="includesObject" itemscope itemtype="https://schema.org/TypeAndQuantityNode">
<meta itemprop="amountOfThisGood" content="50"/>
<meta itemprop="unitText" content="USD"/>
<div itemprop="typeOfGood" itemscope itemtype="https://schema.org/FoodService">
<span itemprop="name">MealCredit</span>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": ["HotelRoom", "Product"],
"name": "Deluxe Room, 1 King Bed",
"identifier": "hotel-room-id-1234",
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
},
"includesObject": [
{
"@type": "TypeAndQuantityNode",
"typeOfGood": {
"@type": "Service",
"name": "Valet"
}
},
{
"@type": "TypeAndQuantityNode",
"amountOfThisGood": 50,
"unitText": "USD",
"typeOfGood": {
"@type": "FoodService",
"name": "MealCredit"
}
}
]
}
}
availability 个房源
Offer.availability 属性用于为酒店 (Hotel.makesOffer) 或酒店客房 (HotelRoom.offers) 的已售罄或不可用行程添加注释。
<div itemprop="makesOffer" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="YYYY-MM-DD">YYYY-MM-DD</time>
Check-out: <time itemprop="checkoutTime" content="YYYY-MM-DD">YYYY-MM-DD</time>
<meta itemprop="availability" content="https://schema.org/SoldOut"/>
Sold Out
</div>
语法
availability 属性的语法如下:
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
...
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
...
<meta itemprop="availability" content="https://schema.org/SoldOut"/>
Sold Out
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
...
"@type": ["HotelRoom", "Product"],
"name": "room-type",
"identifier": "hotel-room-id-1234",
"bed": {
"@type": "BedDetails",
"numberOfBeds": "integer",
"typeOfBed": "KING"
},
"occupancy": {
"@type": "QuantitativeValue",
"value": "integer"
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"availability": "https://schema.org/SoldOut"
}
}
属性
以下是 availability 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| Offer.availability | Optional | ItemAvailability | 酒店或客房的空房情况。 费率是从 没有 如果优惠已添加有效 |
availability 示例
以下是一个基本示例,用于显示酒店客房不可用。您应添加指定客房的床位类型、床位数和入住人数详情。
微数据
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Deluxe Room, 1 King Bed</span>
<meta itemprop="identifier" content="hotel-room-id-1234"/>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">KING</span>
</div>
<div itemprop="bed" itemscope itemtype="https://schema.org/BedDetails">
<span itemprop="numberOfBeds">1</span>
<span itemprop="typeOfBed">SINGLE</span>
</div>
<div itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Occupancy: <span itemprop="value">2</span>
</div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<meta itemprop="availability" content="https://schema.org/SoldOut"/>
Sold Out
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": ["HotelRoom", "Product"],
"name": "Deluxe Room, 1 King Bed",
"identifier": "hotel-room-id-1234",
"bed": [
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "KING"
},
{
"@type": "BedDetails",
"numberOfBeds": 1,
"typeOfBed": "SINGLE"
}
],
"occupancy": {
"@type": "QuantitativeValue",
"value": 2
},
"offers": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"availability": "https://schema.org/SoldOut"
}
}
amenityFeature 个房源
您可以使用 amenityFeature 属性以 Hotel 或 HotelRoom 类型指定便利设施。您应使用 containsPlace 属性指定客房内提供的设施。
<div itemscope itemtype="https://schema.org/Hotel">
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">HotTub</span>
<div itemprop="hoursAvailable" itemscope itemtype="https://schema.org/OpeningHoursSpecification">
<time itemprop="opens" content="HH:mm:ss">HH:mm:ss</time>
<time itemprop="closes" content="HH:mm:ss">HH:mm:ss</time>
</div>
</div>
<div itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom">
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Minibar</span>
<meta itemprop="value" content="true"/>
</div>
</div>
</div>
语法
amenityFeature 和 containsPlace 属性具有以下语法:
微数据
<div itemscope itemtype="https://schema.org/Hotel">
...
<!-- Hotel Amenity -->
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">HotTub</span>
<div itemprop="hoursAvailable" itemscope itemtype="https://schema.org/OpeningHoursSpecification">
<time itemprop="opens" content="HH:mm:ss">HH:mm:ss</time>
<time itemprop="closes" content="HH:mm:ss">HH:mm:ss</time>
</div>
</div>
<div itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom">
<!-- Room Amenity -->
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Minibar</span>
<meta itemprop="value" content="boolean"/>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
...
"amenityFeature": {
"@type": "LocationFeatureSpecification",
"name": "HotTub",
"hoursAvailable": {
"@type": "OpeningHoursSpecification",
"opens": "HH:mm:ss",
"closes": "HH:mm:ss"
}
},
"containsPlace": {
"@type": "HotelRoom",
"amenityFeature": {
"@type": "LocationFeatureSpecification",
"name": "Minibar",
"value": "boolean"
}
}
}
设施
name 媒体资源中允许并定义了以下酒店设施。
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| amenityFeature.AC | Optional | boolean | 房源是否有空调。 |
| amenityFeature.AirportShuttle | Optional | boolean | 房主是否提供往返机场或其他交通站点的交通服务。 |
| amenityFeature.Balcony | Optional | boolean | 住宿是否有阳台。 |
| amenityFeature.BeachAccess | Optional | boolean | 房源是否可通往房源附近的公共海滩。 |
| amenityFeature.ChildFriendly | Optional | boolean | 房源是否适合儿童。 |
| amenityFeature.Crib | Optional | boolean | 房源是否提供婴儿床。 |
| amenityFeature.Elevator | Optional | boolean | 房源是否有电梯。 |
| amenityFeature.FirePlace | Optional | boolean | 住宿是否有壁炉。 |
| amenityFeature.FreeBreakfast | Optional | boolean | 房源是否为所有客人提供免费早餐。使用费率功能指明是否仅针对特定费率方案包含早餐。 |
| amenityFeature.GymFitnessEquipment | Optional | boolean | 房源是否有健身房或任何健身器材。 |
| amenityFeature.Heating | Optional | boolean | 住宿场所是否有供暖。 |
| amenityFeature.HotTub | Optional | boolean | 房源是否有热水浴缸。 |
| amenityFeature.InstantBookable | Optional | boolean | 房源是否可通过退房流程立即预订。备用选项是等待批准。 |
| amenityFeature.IroningBoard | Optional | boolean | 房源是否提供熨衣板。 |
| amenityFeature.Kitchen | Optional | boolean | 住宿是否有厨房。 |
| amenityFeature.Microwave | Optional | boolean | 住宿是否提供微波炉。 |
| amenityFeature.OpenAirBath(Hotels only) | Optional | boolean | 住宿是否配有露天浴池。如果是在客房级别指定,则浴室应为私人浴室,仅供客房住客使用。 |
| amenityFeature.OutdoorGrill | Optional | boolean | 房源是否有烧烤架。 |
| amenityFeature.OvenStove | Optional | boolean | 房源是否有炉灶。 |
| amenityFeature.Patio | Optional | boolean | 房源是否有露台。 |
| amenityFeature.Pool | Optional | boolean | 住宿场所是否有泳池。 |
| amenityFeature.PrivateBeachAccess | Optional | boolean | 房源是否有专属非公共海滩。 |
| amenityFeature.SelfCheckinCheckout | Optional | boolean | 房源是否支持自助入住和退房。 |
| amenityFeature.WasherDryer | Optional | boolean | 住宿是否提供洗衣机。 |
| amenityFeature.Wifi | Optional | boolean | 房源是否有 Wi-Fi。 |
| amenityFeature.Smoking | Optional | boolean | 住宿是否允许吸烟。 |
| amenityFeature.InternetType | Optional | Enum | 房源提供的互联网类型。 支持的值包括:
|
| amenityFeature.ParkingType | Optional | Enum | 房源提供的停车类型。 支持的值包括:
|
| amenityFeature.PoolType | Optional | Enum | 房源提供的泳池类型。 支持的值包括:
|
| amenityFeature.RoomStyle | Optional | Enum | 指明客房是否为日式设计。 支持的值包括:
|
| amenityFeature.LicenseNum | Required | string | 在全球某些地区需要显示的房源商家许可号码。如果存在多个许可,可以重复添加,建议添加许可的所有者或授权机构。例如 |
属性
以下是 amenityFeature 属性:
| 属性 | 是否必需? | 类型 | 说明 |
|---|---|---|---|
| amenityFeature | Optional | LocationFeatureSpecification | 酒店或客房内提供的设施。您可以使用 您可以在 |
| containsPlace | Optional | LocationFeatureSpecification | 酒店或客房内为所有酒店房客提供的酒店设施。可以使用
|
酒店设施示例
以下是一个基本示例,展示了一家酒店的泳池开放时间为上午 10 点至晚上 10 点,且酒店内没有健身房。酒店客房禁烟,并配有迷你吧。
微数据
<div itemscope itemtype="https://schema.org/Hotel">
<span itemprop="name">ACME Hotel</span>
<!-- Amenities -->
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">HotTub</span>
<div itemprop="hoursAvailable" itemscope itemtype="https://schema.org/OpeningHoursSpecification">
Open from <time itemprop="opens" content="10:00:00">10:00</time>
to <time itemprop="closes" content="22:00:00">22:00</time>
</div>
</div>
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">GymFitnessEquipment</span>:
<meta itemprop="value" content="false"/> No
</div>
<div itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom">
<!-- Room Amenities -->
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Minibar</span>:
<meta itemprop="value" content="true"/> Yes
</div>
<div itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Smoking</span>:
<meta itemprop="value" content="false"/> No
</div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation">
<meta itemprop="identifier" content="rate-plan-id-of-member-rate"/>
Check-in: <time itemprop="checkinTime" content="2023-03-10T15:00:00">Mar 10, 2023 3:00 PM</time>
Check-out: <time itemprop="checkoutTime" content="2023-03-16T10:00:00">Mar 16, 2023 10:00 AM</time>
<div itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">1222.74</span>
</div>
</div>
</div>
</div>
JSON-LD(已弃用)
{
"@context": "https://schema.org",
"@type": "Hotel",
"name": "ACME Hotel",
"address": { ... },
"amenityFeature": [
{
"@type": "LocationFeatureSpecification",
"name": "HotTub",
"hoursAvailable": {
"@type": "OpeningHoursSpecification",
"opens": "10:00:00",
"closes": "22:00:00"
}
},
{
"@type": "LocationFeatureSpecification",
"name": "GymFitnessEquipment",
"value": false
}
],
"containsPlace": {
"@type": "HotelRoom",
"amenityFeature": [
{
"@type": "LocationFeatureSpecification",
"name": "Minibar",
"value": true
},
{
"@type": "LocationFeatureSpecification",
"name": "Smoking",
"value": false
}
],
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "rate-plan-id-of-member-rate",
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": 1222.74,
"priceCurrency": "USD"
}
}
}
}
导航标记
带有 data-nav- 前缀的自定义 HTML5 属性用于为互动元素添加注释并声明页面状态,以便抓取工具在预订流程中导航。
语法
导航标记使用以下属性语法:
属性
<body data-nav-stage="stage_name">
<div data-nav-loading-indicator="true">Loading...</div>
...
<button data-nav-criticalpath="true"
data-nav-interactiontype="CLICK"
data-nav-interactionorder="1">
Action
</button>
</body>
属性
以下是导航属性:
| 属性 | 值 | 说明 |
|---|---|---|
| data-nav-stage | landing, room-selection, checkout, confirmation | 为抓取工具声明活跃漏斗状态。附加到 <body> 或高级封装容器。 |
| data-nav-stage-final | true, false | 预订流程中在输入个人信息或付款信息之前可访问的最终页面的必需指示符 (data-nav-stage-final="true"),系统会从该页面中提取价格微数据(默认值为 false)。如果您的漏斗有条件地跳过中间步骤(例如可选的加购内容页面),则该路径中的最终步骤页面必须包含 data-nav-stage-final="true" 和价格微数据。此外,在声明 SoldOut 优惠时,请在着陆页上设置 data-nav-stage-final="true"(不含 data-nav-criticalpath="true" 元素)。 |
| data-nav-criticalpath | true | 标记中间页面上的一个强制性互动元素(按钮或链接),抓取工具必须点击该元素才能进入最终预约页面。必须与 data-nav-interactiontype="CLICK" 和 data-nav-interactionorder 配对。如果某个网页未标记为 data-nav-stage-final="true" 且不包含 data-nav-criticalpath="true" 元素,则抓取工具会返回错误。请勿将 data-nav-criticalpath="true" 放置在最终付款提交按钮上。 |
| data-nav-interactiontype | CLICK | 声明互动操作。CLICK 适用于按钮、链接或其他可点击元素。 |
| data-nav-interactionorder | integer | 当需要在同一页面上执行多次关键路径点击时,提供执行序列("1"、"2" 等)。数字越小,执行顺序越靠前。避免在自适应桌面设备和移动设备容器中出现具有相同顺序编号的重复可见元素。 |
| data-nav-loading-indicator | true | 标记临时加载遮罩、旋转图标或骨架元素。抓取工具会等待此元素从页面中消失,然后再评估导航或价格元素。 |
导航示例
以下是导航标记示例。
点击导航
以下是声明漏斗阶段的点击导航的基本示例。
<body data-nav-stage="room-selection" data-nav-stage-final="false">
<h1>Select Your Room</h1>
<!-- Crawler needs to click this to proceed -->
<button data-nav-criticalpath="true"
data-nav-interactiontype="CLICK"
data-nav-interactionorder="1">
Select & Proceed
</button>
</body>
多步骤导航
以下是中间着陆页上的多步导航示例,包括关闭遮挡内容的 Cookie 意见征求对话框、展开折叠菜单以及点击前进(非遮挡横幅不需要添加标记)。
<div data-nav-stage="landing" data-nav-stage-final="false">
<!-- Intermediate page: navigation tags advance the crawler to the final stage where price microdata is extracted -->
<!-- Step 1: dismiss a blocking cookie dialog (non-blocking banners need no tag) -->
<div class="cookie-banner">
<p>We use cookies to improve your experience.</p>
<button data-nav-criticalpath="true"
data-nav-interactiontype="CLICK"
data-nav-interactionorder="1">Accept cookies</button>
</div>
<!-- Step 2: Open accordion to reveal pricing (Crucial for making prices visible in Mobile UIs) -->
<div data-nav-criticalpath="true"
data-nav-interactiontype="CLICK"
data-nav-interactionorder="2"
class="accordion-header">
<span>View Room Rates</span>
</div>
<!-- Step 3: Book the room -->
<div class="accordion-content">
<button data-nav-criticalpath="true"
data-nav-interactiontype="CLICK"
data-nav-interactionorder="3">
Book Now
</button>
</div>
</div>
最终页面声明
以下是声明预订流程最后一页的示例。
<!-- Marks this as the final confirmation page where price is extracted -->
<!-- Hotel, LodgingReservation info, and Offer price are expected to be included in this page -->
<div data-nav-stage="confirmation" data-nav-stage-final="true">
<h1>Grand View Hotel</h1>
<!-- Price and other details here -->
</div>