本頁面提供 Schema.org 飯店結構化資料標記的技術規格和詞彙參考資料。
總覽
飯店價格結構化資料提供可供機器讀取的標準化格式,用於說明、驗證及顯示網站上列出的飯店價格,不受視覺版面配置影響。包括基本價格、費率、房型規格、逐項列出的費用和稅金,以及預訂政策。
Google 建議您使用 Schema.org 提供的標準化結構化資料,為網頁加上註解,以便準確擷取網頁中的價格。
標準結構化資料可提高檢索器的可靠性、增加價格準確度驗證次數、直接偵錯價格準確度問題,並維持一致的價格準確度分數,進而擴大價格準確度驗證規模。
如果您是第一次使用結構化資料,請參閱這篇文章,進一步瞭解結構化資料詞彙和格式。
Google 飯店預設建議使用微資料格式,為網頁加上註解,以檢查飯店價格準確度。JSON-LD 格式已淘汰,無法用於價格準確度驗證。請注意,這項建議僅適用於飯店價格準確度驗證,不會影響 Google 上的其他結構化資料用途 (例如 Google 搜尋複合式搜尋結果)。如要進一步瞭解一般搜尋功能支援的格式,請參閱支援的格式。這份文件提供詳細的參考內容,專門說明如何在飯店中導入結構化資料。
Hotel 結構化資料用於註解網頁中特定飯店的欄位。Hotel 結構化資料具有下列屬性:
makesOffer屬性
HotelRoom 結構化資料用於註解網頁中特定房間的欄位。
HotelRoom 結構化資料具有下列屬性:
offers屬性availability屬性
導覽屬性可用於向檢索器說明互動式元素和網頁狀態。詳情請參閱「導覽標記」。
飯店結構化資料
下列屬性適用於飯店實體。
name 和 address 屬性
name 和 address 屬性用於註解飯店名稱和位置。以下是 name 和 address 屬性:
"@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."
},
語法
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。 每個飯店的 ID 必須是不重複的字串,且應與價格動態饋給中使用的字串完全相符。 |
| 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 註解可用來標記飯店行程。
"makesOffer": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"availability": "https://schema.org/InStock",
...
}
語法
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 | 指定行程的飯店優惠。
|
| LodgingReservation.checkinTime | Required | DateTime | 使用者時區的入住時間。如果未提及時區,系統會採用飯店時區。 |
| LodgingReservation.checkoutTime | Required | DateTime | 使用者時區的退房時間。如果未提及時區,系統會採用飯店時區。 |
makesOffer 範例
以下是為飯店優惠加上註解的基本範例。你可以為行程指定多個方案,但應先指定 Google 顯示的費率,再指定其他費率。價格金額包含所有適用稅金。
微資料
<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 資源
這項屬性用於註解飯店或飯店房間的價格資訊。如要註解價格和稅金,還需要另外兩個屬性。您應使用 CompoundPriceSpecification 指定總定價資訊,例如基本費率、稅金和折扣。使用 UnitPriceSpecification 指定額外稅金或特殊類型的費用,例如 ResortFee、GenericTax 和 ServiceFee。priceSpecification
屬性會與 Offer 屬性一併提供。
{
...
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency",
"priceComponent": [
{
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": "float",
"priceCurrency": "currency"
},
...
]
}
}
語法
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 | 飯店總價,包含稅金和相關費用。 到達網頁上應一併標註 Google 房價和完整的房價詳細資料。註解費率詳細資料可協助你完成價格準確度檢查。Google 接受飯店層級和房型層級的價格。 |
| Hotel.Offer.priceSpecification.priceCurrency | Required | currency | 指定價格的三字母貨幣代碼。例如:"USD"
。 |
| Hotel.Offer.priceSpecification.priceComponent | Optional | UnitPriceSpecification[] | 飯店的總價明細,包括稅金和相關費用。 價格結構化資料分為兩種類型:
您必須在 |
| Hotel.Offer.priceSpecification.priceComponent. potentialAction | Optional | PayAction | 飯店付款點。飯店付款流程包括在預訂網站退房時和在飯店入住時收取的價格。 你應使用與 Google 支援下列兩種
|
範例
以下是飯店價格規格的範例。
價格
以下是將價格結構化資料加入網頁的基本範例。makesOffer 屬性可包含多項飯店層級的優惠。
如果您選擇指定 address 屬性,則必須提供 PostalAddress 類型,例如 addressCountry、postalCode、streetAddress 和其他欄位。Google 顯示的費率應列在 makesOffer 屬性的第一位。指定價格已含所有適用稅金。
微資料
<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 規格範例。
套裝行程總價為 $1170 美元,線上網站會在預訂時收取部分費用 ($1150 美元),如 "@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 資源
這項屬性用於在行程中註解商家退款政策。
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"refundType": "https://schema.org/FullRefund",
"merchantReturnDays": "YYYY-MM-DD[THH:mm:ss]",
"restockingFee": 0
}
語法
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 資源
這項屬性可用於註解提供給飯店會員顧客的獎勵方案。
"eligibleCustomerType": "RewardsMember",
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency"
}
語法
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": "currency"
},
{
"@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="currency">$</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="currency">$</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": "currency"
},
{
"@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": "currency"
},
{
"@type": "UnitPriceSpecification",
"name": "ResortFee",
"price": 100,
"priceCurrency": "USD"
}
]
}
}
]
}
HotelRoom結構化資料
下列屬性適用於 HotelRoom 實體。
offers 資源
offers 註解可用來標記房型行程。您應使用 offers 屬性進行 HotelRoom 規格。
"offers": {
"@type": ["Offer", "LodgingReservation"],
"identifier": "hotel-room-id-1234",
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"priceSpecification": {...}
}
語法
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 屬性用於註解房間內的房客人數。bed 和 occupancy 屬性可以使用 HotelRoom 屬性指定。
"@type": "Hotel",
"identifier": "hotel-id-1234",
"containsPlace": {
"@type": ["HotelRoom", "Product"],
"identifier": "hotel-room-id",
"bed": {
"@type": "BedDetails",
"numberOfBeds": "integer",
"typeOfBed": "KING"
},
"occupancy": {
"@type": "QuantitativeValue",
"value": "integer"
}
}
語法
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 屬性。
"priceSpecification": {
"@type": "CompoundPriceSpecification",
"price": "float",
"priceCurrency": "currency",
"priceComponent": {
"@type": "UnitPriceSpecification",
"name": "GenericTax",
"price": "float",
"priceCurrency": "currency"
}
...
}
語法
飯店客房的 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 屬性:
| 屬性 | 是否必要? | 類型 | 說明 |
|---|---|---|---|
| Hotel.Offer.priceSpecification.price | Required | float | 每間客房的價格,包括 到達網頁上應一併標註 Google 房價和完整的房價詳細資料。註解費率詳細資料可協助你完成價格準確度檢查。Google 接受飯店層級和房型層級的價格。 |
| Hotel.Offer.priceSpecification.priceCurrency | Required | currency | 指定價格的三字母貨幣代碼。例如:"USD"
。 |
| Hotel.Offer.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。
{
"includesObject": [
{
"@type": "TypeAndQuantityNode",
"typeOfGood": {
"@type": "Service",
"name": "Valet"
}
},
{
"@type": "TypeAndQuantityNode",
"amountOfThisGood": "float",
"unitText": "currency",
"typeOfGood": {
"@type": "FoodService",
"name": "MealCredit"
}
}
]
}
語法
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 屬性用於註解飯店客房的售完行程。
"offers": {
"@type": ["Offer", "LodgingReservation"],
"checkinTime": "YYYY-MM-DD[THH:mm:ss]",
"checkoutTime": "YYYY-MM-DD[THH:mm:ss]",
"availability": "https://schema.org/SoldOut"
}
語法
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 itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<!-- Price Specification details -->
</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"],
"checkinTime": "2023-03-10 15:00:00",
"checkoutTime": "2023-03-16 10:00:00",
"availability": "https://schema.org/SoldOut",
"priceSpecification": {...}
}
}
amenityFeature 資源
您可以使用 amenityFeature 屬性,在 Hotel 或 HotelRoom 類型中指定設施。您應使用 containsPlace 屬性指定房內提供的設施。
{
"@type": "Hotel",
"amenityFeature": [
{
"@type": "LocationFeatureSpecification",
"name": "HotTub",
"hoursAvailable": {
"@type": "OpeningHoursSpecification",
"opens": "HH:mm:ss",
"closes": "HH:mm:ss"
}
},
{
"@type": "LocationFeatureSpecification",
"name": "GymFitnessEquipment",
"value": "boolean"
}
],
"containsPlace": {
"@type": "HotelRoom",
"amenityFeature": [
{
"@type": "LocationFeatureSpecification",
"name": "Minibar",
"value": true
},
{
"@type": "LocationFeatureSpecification",
"name": "Smoking",
"value": false
}
]
}
}
語法
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">
...
<button data-nav-criticalpath="true"
data-nav-interactiontype="CLICK"
data-nav-interactionorder="1">
Action
</button>
...
<button data-nav-close="true">Dismiss</button>
</body>
屬性
導覽屬性如下:
| 屬性 | 值 | 說明 |
|---|---|---|
| data-nav-stage | landing, room-selection, checkout, confirmation | 向檢索器宣告有效的漏斗狀態。附加至 <body> 或高階包裝函式。 |
| data-nav-stage-final | true, false | 流程最後一頁的指標 (預設為 false)。如果頁面上沒有 data-nav-criticalpath="true" 元素,檢索器會自動將該頁面視為流程的最後一頁。 |
| data-nav-criticalpath | true, false | 標記檢索器必須互動的元素,才能到達最終預訂頁面。如果頁面上沒有 data-nav-criticalpath="true" 元素,檢索器會自動將該頁面視為流程的最後一頁。 |
| data-nav-interactiontype | CLICK, SELECT | 指定互動動作。CLICK適用於按鈕/連結。SELECT 適用於下拉式選單/單選按鈕群組。 |
| data-nav-interactionorder | integer | 提供多步驟導覽的執行順序。系統會優先執行數字較小的規則。 |
| data-nav-close | true | 標記彈出式視窗、Cookie 通知橫幅疊加層或追加銷售強制回應中的關閉按鈕。 |
導覽範例
以下是導覽標記的範例。
點擊導覽
以下是點擊導覽的基本範例,宣告漏斗階段。
<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">
<!-- Hotel, LodgingReservation info, and Offer price are expected to be included in this page -->
<!-- Step 1: Accept cookies -->
<div class="cookie-banner">
<p>We use cookies to improve your experience.</p>
<button data-nav-close="true"
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>