我们如何工作

我们如何工作

本文档简要概述了 schema.org 开发和更改 schema 的过程。它伴随着 关于 schema.org 页面,该页面描述了项目的组织结构。

另请参阅:关于 schema.org

概述

在使用 Schema.org 在 Web 内容中建模酒店相关信息时,有三个核心对象:

  • 住宿业务,例如酒店、旅馆、度假村或露营地):本质上是容纳机构实际单位的场所和本地业务(例如酒店房间)。
  • 住宿,即机构的相关单位(例如酒店房间、套房、公寓、会议室、露营地等)。这些是实际提供出租的对象。
  • 报价,以特定金额和特定使用类型(例如入住)出租酒店房间(或其他住宿形式)的报价,通常进一步受提前预订要求和其他条款和条件的约束。

在 Schema.org 中,酒店房间的报价使用与任何其他产品或服务报价相同的模式,例如电视机或焊接服务。但是,酒店房间不是 ProductService 的子类。为了启用报价描述,使用了 Schema.org 的多类型实体 (MTE) 功能。

当定义住宿实例时,即由 LodgingBusiness 提供的住宿时,它被描述为同时是适当的住宿类型 Product。因此,例如酒店将为 HotelRoom 提供 Offer,该房间也被标识为 Product。价格和条款和条件不是酒店或酒店房间的属性,而是报价的属性。

MTE 的标记非常简单:

微数据:

1
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">

RDFa:

1
<div vocab="https://schema.org/" typeof="HotelRoom Product">

JSON-LD:

1
2
"@context": "https://schema.org/",
"@type": ["HotelRoom","Product"],

在出租住宿的情况下,重要的是将 businessFunction 属性附加到 offer 并将值设置为 LeaseOut,除非您要出售财产。这允许在 schema.org 中重用和扩展相同的类型用于房地产报价。

基本模型

下面的图表说明了描述酒店房间报价和其他住宿形式报价的基本模式。

所有住宿类型都是 Place 的子类。要将它们用作报价的主题,您应该使用 MTE 技术,将您的实例分配为同时是住宿子类和产品。所有住宿业务类型都是 LocalBusiness 的子类,后者本身是 PlaceOrganization 的子类。

住宿与其所属的本地业务之间的关系通过 containedInPlace(从酒店房间到酒店)或 containsPlace(从酒店到酒店房间)属性表示。报价与报价中包含的房间之间的关系可以通过 offers 属性(从房间产品到报价)或 itemOffered(从报价到房间)表示。

住宿业务与其房间报价之间的关系通过 makesOffer 属性(从酒店到报价)或 offeredBy 属性(从报价到酒店)表示。

当报价包括不仅仅是裸露房间(例如餐食)或多个夜晚时,我们使用 includesObject 属性和一个或多个 TypeAndQuantityNode 节点。

Schema.org 描述酒店房间报价的模式

住宿业务类型

目前,有明确的类型用于以下种类的住宿业务:

此列表将来可能会扩展。对于其他形式,可以使用通用类型 LodgingBusinessadditionalType 属性允许使用外部标识符来指示此类情况下的确切类型。

住宿类型

对于住宿种类,以下更具体的类型可用:

此列表将来可能会扩展。对于其他形式,可以使用通用类型 AccommodationadditionalType 属性允许使用外部标识符来指示此类情况下的确切类型。

最小示例

最基本的形式,我们可以只建模酒店的基本信息,如照片和星级评分,但没有个人房间费率和可用性信息:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">Technikerstrasse 21</span>
<span itemprop="postalCode">6020</span>
<span itemprop="addressLocality">Innsbruck</span>
<span itemprop="addressRegion">Tyrol</span>,
<span itemprop="addressCountry">Austria</span>
</div>
Phone: <span itemprop="telephone">+43 512 8000-0</span>
<img itemprop="photo" src="../media/hotel_front.png" alt="Front view of the hotel" />
Star rating: <span itemprop="starRating" itemscope itemtype="https://schema.org/Rating">
<meta itemprop="ratingValue" content="4">****
</span>
Room rates: <span itemprop="priceRange">$100 - $240</span>
</div>

有关描述酒店的其他属性的完整列表,请参阅 Hotel 页面。下面更详细地解释了热门属性。

注意: 在下面的内容中,我们专注于酒店相关的示例,但其他类型的住宿业务的模式是相同的。只需使用更具体的类型(例如 CampgroundMeetingRoom)。

酒店信息

如果您的网站提供有关酒店的更多详细信息,您可以使用许多其他属性使用 schema.org 标记它们。下面,我们突出了一些突出的属性。

地理位置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">Technikerstrasse 21</span>
<span itemprop="postalCode">6020</span>
<span itemprop="addressLocality">Innsbruck</span>
<span itemprop="addressRegion">Tyrol</span>,
<span itemprop="addressCountry">Austria</span>
</div>
<div itemprop="geo" itemscope itemtype="https://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="47.2649990" />
<meta itemprop="longitude" content="11.3428720" />
</div>
</div>

电话和传真

1
2
3
4
5
6
7
8
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Phone: <span itemprop="telephone">+43 512 8000-0</span>
Fax: <span itemprop="faxNumber">+43 512 8000-99</span>
</div>

星级评分

星级评分是住宿质量的流行指标。在许多国家,它们由专门的公共或私人机构授予,并基于通常指定最低设施的明确标准。

简单

您可以简单地将星级评分标记为数值。

示例: 4 星级酒店

1
2
3
4
5
6
7
8
9
10
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Star rating: <span itemprop="starRating" itemscope itemtype="https://schema.org/Rating">
<meta itemprop="ratingValue" content="4">****
</span>
Room rates: <span itemprop="priceRange">$100 - $240</span>
</div>

高级:星级评分的类型

如果可用,指定星级评分的来源是有意义的,例如授予机构的名称。在这种情况下,使用 rating 和其 author 属性来指示进行评分评估的一方(例如 HOTREC、DEHOGA、WHR 或 Hotelstars)。

示例: DEHOGA 评定的 4 星级酒店

1
2
3
4
5
6
7
8
9
10
11
12
13
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Star rating: <span itemprop="starRating" itemscope itemtype="https://schema.org/Rating">
<span itemprop="author" itemscope itemtype="https://schema.org/Organization">
<span itemprop="name">DEHOGA</span>
</span>
<meta itemprop="ratingValue" content="4">****
</span>
Room rates: <span itemprop="priceRange">$100 - $240</span>
</div>

照片和标志

1
2
3
4
5
6
7
8
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<img itemprop="logo" src="../media/logo.png" alt="hotel logo" />
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<img itemprop="photo" src="../media/hotel_front.png" alt="Front view of the hotel" />
</div>

地图

1
2
3
4
5
6
7
8
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<a itemprop="hasMap" href="https://www.google.com/maps?ie=UTF8&hq&ll=47.1234,11.1234&z=13">
Click here for a map.</a>
</div>

营业时间(接待处)

您可以使用 openingHoursopeningHoursSpecification 属性来指示酒店接待处的营业时间。

1
2
3
4
5
6
7
8
9
10
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Reception opening hours:
<meta itemprop="openingHours" content="Mo-Fr 07:00-23:00">Mon-Fri 07.00-23.00
<meta itemprop="openingHours" content="Sa 08:00-23:00">Saturdays 08.00-23.00
<meta itemprop="openingHours" content="Sun 08:00-12:00">Sundays 08.00-12.00
</div>

评论和评分

您可以使用 review / Review 附加个人(客户)评论,并使用 aggregateRating / AggregateRating 使用聚合评分。

注意: 官方酒店星级评分不是评论,应使用 starRating 属性。

房间数量

示例: 拥有 60 个卧室的酒店

1
2
3
4
5
6
7
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<span itemprop="numberOfRooms">60</span> rooms.
</div>

示例: 拥有 45 个双人间和 15 个单人间的酒店

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<span itemprop="numberOfRooms" itemscope itemtype="https://schema.org/QuantitativeValue">
<span itemprop="value">45</span>
<span itemprop="unitText">double rooms</span>
</span>
<span itemprop="numberOfRooms" itemscope itemtype="https://schema.org/QuantitativeValue">
<span itemprop="value">15</span>
<span itemprop="unitText">single rooms</span>
</span>
</div>

翻新和成立日期

对于成立日期,使用 foundingDate。对于翻新活动的相关信息,使用 additionalProperty 并将年份放入其 value 属性中,并将细节放入其描述中。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Founded: <span itemprop="foundingDate">1985</span>
Last Renovation: <span itemprop="additionalProperty"
itemscope itemtype="https://schema.org/PropertyValue">
<meta itemprop="name" content="renovation">
<span itemprop="value">2001</span>
<span itemprop="description">The three-month project involved a complete update
of all guestrooms, guest bathrooms and public spaces, including a redesign of
the hotel&apos;s restaurant.</span>
</span>
</div>

组织成员资格

使用 memberOf 链接到值得注意的组织。

1
2
3
4
5
6
7
8
9
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Member of the <span itemprop="memberOf" itemscope itemtype="https://schema.org/Organization">
<span itemprop="name">Austrian Tourist Partner Association</span>.
</span>
</div>

酒店连锁

使用 parentOrganization 将连锁酒店链接到运营公司。

1
2
3
4
5
6
7
8
9
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
An <span itemprop="parentOrganization" itemscope itemtype="https://schema.org/Organization">
<span itemprop="name">ACME Hotel</span>.
</span>
</div>

酒店特色和服务

桑拿和健身房

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Hotel Features:
<ul>
<li itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Sauna</span>
<meta itemprop="value" content="True">
</li>
<li itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Gym</span>
<meta itemprop="value" content="True">
</li>
</ul>
</div>

带营业时间的桑拿

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Hotel Features:
<ul>
<li itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Sauna</span>
<meta itemprop="value" content="True">
<div itemprop="hoursAvailable" itemtype="https://schema.org/OpeningHoursSpecification">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Thursday" />(Open Thursdays
<time itemprop="opens" content="16:00:00"> 4:00 PM</time> -
<time itemprop="closes" content="21:00:00"> 9:00 PM</time>)
</div>
</li>
</ul>
</div>

入住和退房时间

1
2
3
4
5
6
7
8
9
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<img itemprop="logo" src="../media/logo.png" alt="hotel logo" />
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Check-in: <meta itemprop="checkinTime" content="14:00:00">2:00 PM
Check-out: <meta itemprop="checkoutTime" content="11:00:00">11:00 AM
</div>

语言

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
We speak:
<ul>
<li itemprop="availableLanguage" itemscope itemtype="https://schema.org/Language">
<span itemprop="name">English</span>
</li>
<li itemprop="availableLanguage" itemscope itemtype="https://schema.org/Language">
<span itemprop="name">German</span>
</li>
</ul>
</div>

房间信息

一些酒店只指示可用房间类别的基本信息,如图像和文本描述(例如”好莱坞双人间”)或甚至个别房间(特别是在小型家庭经营的酒店中)。Schema.org 提供支持描述房间并将其链接到酒店。这也是如果您想要描述实际房间报价所需要的。

基本模式:描述和图片

您可以通过 containsPlace 属性将酒店链接到其房间(或套房或客用公寓),或者通过反向 containedInPlace 将房间链接到其所属的酒店。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Room types:
<ul>
<li itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom">
<span itemprop="name">Double Room</span>
<span itemprop="description">Our double rooms are spacious and comfortable.</span>
<img href="../images/double_room.png" />
</li>
<li itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
<img href="../images/single_room.png" />
</li>
</ul>
</div>

床铺和入住

您可以在 HotelRoom 实体中添加更多细节,如床铺类型和入住人数。入住人数可以是单个值(使用 value)或范围(使用 minValuemaxValue)。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div itemscope itemtype="https://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
Room types:
<ul>
<li itemprop="containsPlace" itemscope itemtype="https://schema.org/HotelRoom">
<span itemprop="name">Double Room</span>
<span itemprop="description">Our double rooms are spacious and comfortable.</span>
Bed type: <span itemprop="bed">Olympic Queen bed</span>
Occupancy: <span itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Up to <span itemprop="maxValue">2</span>
<meta itemprop="unitCode" content="IE">people
</span>
</li>
</ul>
</div>

特色和服务

房间特色,如”迷你吧”、”wifi”或”空调”可以使用 amenityFeature 属性和 LocationFeatureSpecification 实体表示,这是 property-value 的特殊形式。amenityFeature 属性不声明房间特色是否免费或额外收费。

房间特色

示例: 房间有迷你吧和 wifi。费用可能适用也可能不适用。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div itemscope itemtype="https://schema.org/HotelRoom">
<span itemprop="name">Double Room</span>
<span itemprop="description">Our double rooms are spacious and comfortable.</span>
Room Features:
<ul>
<li itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Mini-bar</span>
<meta itemprop="value" content="True">
</li>
<li itemprop="amenityFeature" itemscope itemtype="https://schema.org/LocationFeatureSpecification">
<span itemprop="name">Wifi</span>
<meta itemprop="value" content="True">
</li>
</ul>
</div>

注意: 对于建模可选房间特色的费用,您可以将房间的 Offer 链接到特色或服务的报价,通过 addOn 属性。

报价和定价

Schema.org 中的一个关键原则是事物没有价格,而是授予您对事物的某些权利的报价有价格。因此,schema.org 中酒店报价的所有商业方面都属于 Offer 类型。在下面的内容中,我们展示了相关 schema.org 元素的用法。请注意 MTE 的使用,将住宿实例分配为同时是 Product

基本模式

示例: 单人间每晚 99 美元

1
2
3
4
5
6
7
8
9
10
11
12
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

每间房价格 vs. 每人价格

您可以通过选择适当的单位代码来指示每间房或每人的房间价格。”IE”是联合国/CEFACT 人员代码,”DAY”是天数/夜晚的代码。对于每人价格信息,您应该将入住人数指示为单个值。

示例: 双人间每晚每人 49 美元,基于双人入住

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Double Room</span>
<span itemprop="description">Our double rooms are cosy and comfortable.</span>
Occupancy: <span itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
<span itemprop="value">2</span>
<meta itemprop="unitCode" content="IE">people
</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="49.00">$49.00
<meta itemprop="priceCurrency" content="USD">
<!-- IE is the UN/CEFACT Code for person -->
<meta itemprop="unitCode" content="IE">per person (based on double occupancy)
</span>
</span>
</div>

价格范围

您可以使用 minPricemaxPrice 属性来指示房间的价格范围。

示例: 单人间每晚成本在 99 美元到 179 美元之间。

1
2
3
4
5
6
7
8
9
10
11
12
13
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="minPrice" content="99.00">$99.00 -
<meta itemprop="maxPrice" content="179.00">179.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

报价的有效性

您可以通过时间以以下方式之一约束价格的有效性:

预订期

示例: 只有在 2015 年 10 月 1 日至 12 月 31 日之间进行预订时,价格才有效。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
Price valid if booked between: <meta itemprop="validFrom" content="2015-10-01">October 1 -
<meta itemprop="validThrough" content="2015-12-31">December 31, 2015
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

提前预订要求

示例: 房间必须提前七天预订。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
Must be booked at least <span itemprop="advanceBookingRequirement"
itemscope itemtype="https://schema.org/QuantitativeValue">
<span itemprop="minValue">7</span>
<meta itemprop="unitCode" content="DAY"> days before the stay
</span>
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

符合条件的日期

示例: 价格仅对 2016 年 1 月 15-31 日的住宿有效。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
For stays between: <meta itemprop="availabilityStarts" content="2016-01-15">January 15 -
<meta itemprop="availabilityEnds" content="2016-01-31">31, 2016
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

季节性定价

示例: 夏季和冬季的不同价格

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate:
<span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
Summer <meta itemprop="availabilityStarts" content="2016-06-01"> (June 1 -
<meta itemprop="availabilityEnds" content="2016-10-31">October 31)
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="69.00">$69.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
<span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
Winter <meta itemprop="availabilityStarts" content="2016-11-01"> (November 1 -
<meta itemprop="availabilityEnds" content="2017-05-31">May 31)
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

复合价格

对于某些类型的住宿,价格有多个组成部分,例如度假屋的每周费用和平坦的清洁和服务费用。CompoundPriceSpecification 类型为此服务。

示例: 每周 400 美元,外加每次住宿 100 美元的清洁费

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div itemscope itemtype="https://schema.org/Apartment https://schema.org/Product">
<span itemprop="name">Seaside Apartment</span>
<span itemprop="description">Our seaside apartments are perfect for small families with children.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/CompoundPriceSpecification">
<span itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="400.00">$400.00
<meta itemprop="priceCurrency" content="USD">
<!-- WEE is the UN/CEFACT Code for week -->
<meta itemprop="unitCode" content="WEE"> per week
</span>plus a
<span itemprop="priceComponent" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<span itemprop="name">cleaning fee</span> of
<meta itemprop="price" content="100.00">$100.00
<meta itemprop="priceCurrency" content="USD">
<!-- C62 is the UN/CEFACT Code for no unit -->
<meta itemprop="unitCode" content="C62"> per stay
</span>
</span>
</span>
</div>

入住

给定房间费率的入住人数可以通过 occupancy(总入住人数)指示。对于细节(例如成人 vs. 儿童的数量),您可以使用 QuantitativeValuename 属性。

示例: 套房每晚 249 美元,最多可容纳两名成人和两名儿童

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<div itemscope itemtype="https://schema.org/Suite https://schema.org/Product">
<span itemprop="name">Deluxe Suite</span>
<span itemprop="description">Our deluxe suites are ideal for longer stays or families.</span>
Occupancy: <span itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
Up to <span itemprop="maxValue">2</span>
<meta itemprop="unitCode" content="IE">
<span itemprop="name">adults</span>
</span> and
<span itemprop="occupancy" itemscope itemtype="https://schema.org/QuantitativeValue">
<span itemprop="maxValue">2</span>
<meta itemprop="unitCode" content="IE">
<span itemprop="name">children</span>
</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="249.00">$249.00
<meta itemprop="priceCurrency" content="USD">
<!-- DAY is the UN/CEFACT Code for day/night -->
<meta itemprop="unitCode" content="DAY">per night
</span>
</span>
</div>

最短住宿时间

示例: 房间费率仅对至少三晚的住宿有效。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div itemscope itemtype="https://schema.org/HotelRoom https://schema.org/Product ">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
Rate: <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<!-- DAY is the UN/CEFACT Code for day/night -->
<meta itemprop="unitCode" content="DAY"> per night
</span> for stays of at least
<span itemprop="eligibleDuration" itemscope itemtype="https://schema.org/QuantitativeValue">
<span itemprop="minValue">3</span>
<meta itemprop="unitCode" content="DAY"> nights
</span>
</span>
</div>

取消规则和条款和条件

取消政策信息和其他条款和条件细节应放入 Offerdescription 属性中。

可选服务的费用

可选服务的价格信息应放入附加的 Offer 中,并通过 addOn 属性从基础报价链接。

餐食和食品服务

餐食信息可以通过创建具有多个 TypeAndQuantityNode 元素和 FoodService 的产品捆绑包附加到 Offer

示例: 包含早餐的单人间

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<div itemscope itemtype="https://schema.org/Offer">
<link itemprop="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<span itemprop="name">Single room with breakfast</span>
<span itemprop="priceSpecification" itemscope itemtype="https://schema.org/UnitPriceSpecification">
<meta itemprop="price" content="99.00">$99.00
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="unitCode" content="DAY">per night
</span>
<span itemprop="includesObject" itemscope itemtype="TypeAndQuantityNode">
<span itemprop="typeOfGood" itemscope itemtype="https://schema.org/HotelRoom">
<span itemprop="name">Single Room</span>
<span itemprop="description">Our single rooms are cosy and comfortable.</span>
</span>
</span>
<span itemprop="includesObject" itemscope itemtype="TypeAndQuantityNode">
<span itemprop="typeOfGood" itemscope itemtype="https://schema.org/FoodService">
<span itemprop="name">Breakfast</span>
<span itemprop="description">Our famous healthy starter breakfast is included.</span>
</span>
</span>
</div>

致谢

非常感谢 Martin Hepp 贡献了此文档的初始版本,并领导了 schema.org 酒店/住宿词汇的设计。

Schema.org 中用于描述酒店的元素基于 STI 住宿本体,见 http://ontologies.sti-innsbruck.at/acco/ns.html 了解详情。许多类和属性定义受到启发或基于维基百科的抽象,自由的百科全书。


我们如何工作
https://www.gjxx.dev/schema/documents/howwework/
作者
gjxx
发布于
2025年10月16日
许可协议