本頁面提供參考資料,說明如何為飯店價格資料新增結構化資料標記。
總覽
系統會使用飯店價格結構化資料,詳細說明、驗證及顯示網站上列出的飯店價格,不受使用者介面影響。這也包括基本價格、費率、房型、費用和稅金,以及價格相關欄位。
Google 建議合作夥伴使用 schema.org 提供的標準化結構化資料,為網頁加上註解,讓檢索器能準確擷取網頁價格。
這樣一來,就能提升檢索器的可靠性,進而擴大價格準確度驗證範圍。好處是價格準確度驗證次數會增加,且能直接偵錯價格準確度問題,價格準確度分數也會保持一致。
如果您是第一次使用結構化資料,請參閱這篇文章,進一步瞭解結構化資料詞彙和格式。
Google 飯店建議使用 JSON-LD 格式為網頁加上註解。如要進一步瞭解其他可接受的格式,請參閱「支援的格式」。這份說明文件提供詳細的參考內容,專門介紹飯店結構化資料的實作方式。
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 屬性使用下列語法:
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 註解的基本範例:
{
"@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 屬性使用下列語法:
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 顯示的費率,再指定其他費率。指定價格金額包含所有適用稅金。
{
"@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 屬性使用下列語法:
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"
}
]
}
}
}
微資料
<div itemscope itemtype="https://schema.org/Hotel">
<meta itemprop="name" content="hotel-name"/>
...
<div itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation" itemprop="makesOffer">
...
<div itemscope itemtype="https://schema.org/CompoundPriceSpecification" itemprop="priceSpecification">
<meta itemprop="price" content="float"/>
<meta itemprop="priceCurrency" content="currency"/>
<div itemscope itemtype="https://schema.org/UnitPriceSpecification" itemprop="priceComponent">
<meta itemprop="name" content=""/>
<meta itemprop="price" content="float"/>
<meta itemprop="priceCurrency" content="currency"/>
</div>
<div itemscope itemtype="https://schema.org/UnitPriceSpecification" itemprop="priceComponent">
<meta itemprop="name" content="GenericTax" />
<meta itemprop="price" content="float"/>
<meta itemprop="priceCurrency" content="currency"/>
<meta itemprop="priceComponentType" content="GenericTax"/>
</div>
<div itemscope itemtype="https://schema.org/UnitPriceSpecification" itemprop="priceComponent">
<meta itemprop="name" content="Discount"/>
<meta itemprop="price" content="float"/>
<meta itemprop="priceCurrency" content="currency"/>
<meta itemprop="priceComponentType" content="Discount"/>
</div>
</div>
</div>
</div>
屬性
以下是 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 支援下列兩種
|
範例
JSON-LD 範例
價格
以下是將價格結構化資料加入網頁的基本範例。makesOffer 屬性可包含多項飯店層級的優惠。
如果您選擇指定 address 屬性,則必須提供 PostalAddress 類型 (例如 addressCountry、postalCode、streetAddress) 和其他欄位。Google 顯示的費率應優先列在 makesOffer 屬性中。指定的價格金額包含所有適用稅金。
{
"@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 屬性中指定。
{
"@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 會將預訂時的付款方式解讀為預設付款方式。
{
"@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": { ... }
}
}
}
]
}
}
}
微資料範例
價格明細
以下是 priceSpecification 屬性的範例,其中包含價格明細。基本費率、一般稅金和折扣等稅金,都是使用 UnitPriceSpecification 元件定義。請記得將 name 屬性設為與 UnitPriceSpecification 元件對應的值。
入住期間的總價應在 CompoundPriceSpecification 屬性中指定。價格明細應在 priceComponent 屬性中指定。
<div itemscope itemtype="https://schema.org/Hotel">
<meta itemprop="name" content="ACME Hotel"/>
<meta itemprop="identifier" content="hotel-id-1234"/>
<div itemscope itemtype="https://schema.org/PostalAddress" itemprop="address">
<meta itemprop="addressCountry" content="US" />
<meta itemprop="addressLocality" content="Mountain View" />
<meta itemprop="addressRegion" content="Santa Clara" />
<meta itemprop="postalCode" content="94040" />
<meta itemprop="streetAddress" content="123 Main street" />
</div>
<div itemscope itemtype="https://schema.org/Offer https://schema.org/LodgingReservation" itemprop="makesOffer">
<meta itemprop="checkinTime" content="2023-03-10 15:00:00" />
<meta itemprop="checkoutTime" content="2023-03-16 10:00:00"/>
<div itemscope itemtype="https://schema.org/CompoundPriceSpecification" itemprop="priceSpecification">
<meta itemprop="price" content="1222.74" />
<meta itemprop="priceCurrency" content="USD" />
<div itemscope itemtype="https://schema.org/UnitPriceSpecification" itemprop="priceComponent">
<meta itemprop="name" content="" />
<meta itemprop="price" content="1150" />
<meta itemprop="priceCurrency" content="USD" />
</div>
<div itemscope itemtype="https://schema.org/UnitPriceSpecification" itemprop="priceComponent">
<meta itemprop="name" content="GenericTax" />
<meta itemprop="price" content="172.74" />
<meta itemprop="priceCurrency" content="USD" />
<meta itemprop="priceComponentType" content="GenericTax" />
</div>
<div itemscope itemtype="https://schema.org/UnitPriceSpecification" itemprop="priceComponent">
<meta itemprop="name" content="Discount" />
<meta itemprop="price" content="-100" />
<meta itemprop="priceCurrency" content="USD" />
<meta itemprop="priceComponentType" content="Discount" />
</div>
</div>
</div>
</div>
hasMerchantReturnPolicy 資源
這項屬性用於在行程中註解商家退款政策。
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"refundType": "https://schema.org/FullRefund",
"merchantReturnDays": "YYYY-MM-DD[THH:mm:ss]",
"restockingFee": 0
}
語法
hasMerchantReturnPolicy 的語法如下:
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。
{
"@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 屬性的語法如下:
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 屬性。 |
範例
會員費率
以下是會員價或設限房價的基本範例,適用於會員方案。顧客是飯店的「會員」。
{
"@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"
}
]
}
}
}
會員價和一般費率
以下範例同時顯示一般價格和會員價格的註解。會員價格會列在一般價格之前。
{
"@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 結構化資料
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 屬性的語法如下:
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
以下是指定 HotelRoom 屬性中 offers 的基本範例。
{
"@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 屬性的語法如下:
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
以下是房間規格的床位和入住人數基本範例。
{
"@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。
{
"@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 屬性語法如下:
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[] | 飯店客房的總價明細,包括稅金和費用,以及與
|
範例
客房總價
以下是定義住宿天數總價和每人價格的基本範例。
{
"@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 位房客。
{
"@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 的語法如下,適用於房內提供的特定費率服務:
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 | 飯店或客房提供的服務。 費率專屬功能包含在 基本層級的優惠也可能包含特定費率的功能,或以加購內容的形式提供,但須額外付費。
|
範例
服務
以下是代客停車和餐飲服務的費率專屬功能基本範例。請使用 "Offer.includesObject" 屬性指定費率專屬功能。"TypeAndQuantityNode.typeOfGood" 的名稱欄位應指出服務類型。
{
"@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 屬性的語法如下:
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 | 飯店或客房的空房情形。 匯率是從
如果沒有 如果優惠已使用有效的 |
範例
可用性
以下是顯示飯店客房無法預訂的基本範例。請務必提供指定客房的床型、床位數和入住人數詳細資料。
{
"@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 屬性的語法如下:
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 點,飯店不提供健身房。飯店客房為禁菸房,並設有迷你吧。
{
"@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"
}
}
}
}