民宿 (VacationRental
) 结构化数据
如果您向民宿商家信息页面添加结构化数据,Google 搜索便能够以更丰富的方式显示商家信息。用户可以直接在搜索结果中查看商家信息,例如名称、说明、图片、位置、评分、评价等。
开始之前
本文中的说明适用于相应人士已与 Google 技术支持客户经理联系且有权访问 Hotel Center 的网站。如果您想要集成民宿商家信息,但 Google 尚未与您联系,请使用民宿意向调查表与我们联系。
此功能仅适用于符合特定资格条件的网站,并且需要执行额外步骤才能完成集成。如需详细了解如何在 Google 上列出您的民宿,请参阅集成入门指南。
How to add structured data
Structured data is a standardized format for providing information about a page and classifying the page content. If you're new to structured data, you can learn more about how structured data works.
Here's an overview of how to build, test, and release structured data.
- Add the required properties. Based on the format you're using, learn where to insert structured data on the page.
- Follow the guidelines.
- Validate your code using the Rich Results Test and fix any critical errors. Consider also fixing any non-critical issues that may be flagged in the tool, as they can help improve the quality of your structured data (however, this isn't necessary to be eligible for rich results).
- Deploy a few pages that include your structured data and use the URL Inspection tool to test how Google sees the page. Be sure that your page is
accessible to Google and not blocked by a robots.txt file, the
noindex
tag, or login requirements. If the page looks okay, you can ask Google to recrawl your URLs. - To keep Google informed of future changes, we recommend that you submit a sitemap. You can automate this with the Search Console Sitemap API.
示例
下面是一个 JSON-LD 格式的民宿商家信息简单示例。
<html> <head> <title>My Beautiful Vacation Rental</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "VacationRental", "additionalType": "HolidayVillageRental", "brand": { "@type": "Brand", "name": "brandIdName" }, "containsPlace": { "@type": "Accommodation", "additionalType": "EntirePlace", "bed": [{ "@type": "BedDetails", "numberOfBeds" : 1, "typeOfBed": "Queen" }, { "@type": "BedDetails", "numberOfBeds" : 2, "typeOfBed": "Single" }], "occupancy": { "@type": "QuantitativeValue", "value" : 2 }, "amenityFeature": [ { "@type": "LocationFeatureSpecification", "name": "ac", "value": true }, { "@type": "LocationFeatureSpecification", "name": "airportShuttle", "value": true }, { "@type": "LocationFeatureSpecification", "name": "balcony", "value": true }, { "@type": "LocationFeatureSpecification", "name": "beachAccess", "value": true }, { "@type": "LocationFeatureSpecification", "name": "childFriendly", "value": true } ], "floorSize": { "@type": "QuantitativeValue", "value" : 75, "unitCode": "MTK" }, "numberOfBathroomsTotal": 1, "numberOfBedrooms": 3, "numberOfRooms": 5 }, "identifier": "abc123", "latitude": "42.12345", "longitude": "101.12345", "name": "My Beautiful Vacation Rental", "address": { "addressCountry": "US", "addressLocality": "Mountain View", "addressRegion": "California", "postalCode": "94043", "streetAddress": "1600 Amphitheatre Pkwy, Unit 6E" }, "aggregateRating": { "ratingValue": 4.5, "ratingCount": 10, "reviewCount": 3, "bestRating": 5 }, "image": [ "https://example.com/mylisting/unit_image1.png", "https://example.com/mylisting/unit_image2.png", "https://example.com/mylisting/unit_image3.png", "https://example.com/mylisting/unit_image4.png", "https://example.com/mylisting/unit_image5.png", "https://example.com/mylisting/unit_image6.png", "https://example.com/mylisting/unit_image7.png", "https://example.com/mylisting/unit_image8.png" ], "checkinTime": "18:00:00+08:00", "checkoutTime": "11:00:00+08:00", "description": "A great Vacation Rental in the perfect neighborhood.", "knowsLanguage": ["en-US", "fr-FR"], "review": [{ "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": 4, "bestRating": 5 }, "author": { "@type": "Person", "name": "Lillian Ruiz" }, "datePublished": "2024-12-01", "contentReferenceTime": "2024-11-17" }, { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "5", "bestRating": "5" }, "author": { "@type": "Person", "name": "John S." }, "datePublished": "2024-10-01", "contentReferenceTime": "2024-09-28" } ] } </script> </head> <body></body> </html>
资格要求指南
民宿结构化数据必须遵循以下指南,才能在 Google 搜索中使用。
结构化数据类型定义
下表列出了使用 schema.org/VacationRental 标记民宿商家信息的属性和用法。为使您的结构化数据能够显示,您必须为其添加必需的属性。您还可添加建议的属性,以便添加与您的内容相关的更多信息,进而提供更好的用户体验。
VacationRental
如需了解 VacationRental
的完整定义,请访问 schema.org/VacationRental。
必需属性 | |
---|---|
containsPlace
|
民宿商家信息必须包含一个 Accommodation 以标记其他详细信息,例如床位、入住人数、客房数和 |
containsPlace.occupancy
|
有关民宿商家信息中允许入住人数上限的信息。 "occupancy": { "@type": "QuantitativeValue", "value" : 5 } |
containsPlace.occupancy.value
|
民宿商家信息中允许入住的人数值。 |
identifier
|
房源的唯一标识符。 其他指南:
|
image
|
重复 一张或多张商家信息图片。商家信息必须至少包含 8 张照片(以下每个类别至少 1 张照片):卧室、浴室和公共区域。 此外,还需遵循房源商家信息图片要求。 |
latitude (或 geo.latitude )
|
商家所在位置的纬度。精度必须至少为 5 位小数。 |
longitude (或 geo.longitude )
|
商家所在位置的经度。精度必须至少为 5 位小数。 |
name
|
民宿商家信息的名称。 |
建议的属性 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
additionalType
|
民宿商家信息的类型。以下是一些建议的值:
这些值的完整定义请参阅住宿商家类别。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address
|
民宿的完整实际位置。 提供民宿的街道地址、城市、州/省或地区以及邮政编码。如果适用,请提供单元号或公寓号。 请注意,邮政信箱或其他仅限邮寄的地址不属于完整的实际地址。 "address": { "addressCountry": "US", "addressLocality": "Mountain View", "addressRegion": "California", "postalCode": "94043", "streetAddress": "1600 Amphitheatre Pkwy, Apartment 4E" } |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address.addressCountry
|
民宿商家所属的国家/地区,使用两个字母的 ISO 3166-1 alpha-2 国家/地区代码。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address.addressLocality
|
民宿商家所在的城市。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address.addressRegion
|
商家信息中的州、地区或省的名称。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address.postalCode
|
民宿商家的邮政编码。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
address.streetAddress
|
民宿商家信息中的完整街道地址,包括单元号或公寓号(如适用)。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
aggregateRating
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
brand
|
与此房源相关的品牌 ID。如需详细了解如何将房源与品牌相关联,以及如何将品牌图标和显示名称与相应的品牌 ID 相关联,请参阅 Hotel Center 文档。 "brand": { "@type": "Brand", "name" : "brandIdName" } |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkinTime
|
房客最早入住住宿场所的时间,采用 ISO 8601 格式。 示例: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkoutTime
|
房客最晚入住住宿场所的时间,采用 ISO 8601 格式。 示例: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.additionalType
|
此住宿的客房类型。请使用以下某个值:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.amenityFeature
|
房源是否提供特定功能或酒店设施。布尔值示例遵循以下模式: "amenityFeature": { "@type": "LocationFeatureSpecification", "name" : "featureName", "value": true }布尔值 为
非布尔值 对于 非布尔值遵循以下模式: "amenityFeature": { "@type": "LocationFeatureSpecification", "name" : "featureName", "value": "detail" }
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.bed
|
重复 商家信息中的床位类型和数量信息。 "bed": [{ "@type": "BedDetails", "numberOfBeds" : 1, "typeOfBed": "Queen" }, { "@type": "BedDetails", "numberOfBeds" : 2, "typeOfBed": "Single" }] |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.bed.numberOfBeds
|
商家信息中的床位数。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.bed.typeOfBed
|
商家信息中的床位类型。以下是一些建议的值:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.floorSize
|
住宿场所的大小。必须使用
"floorSize": { "@type": "QuantitativeValue", "value" : 75, "unitCode": "MTK" } |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.numberOfBathroomsTotal
|
商家信息中的总浴室数。请遵循 RESO 中所述的房地产惯例,并使用浴室数量的简单总和。例如,如果房源有两个标准浴室和一个半套浴室,则浴室总数为 2.5。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.numberOfBedrooms
|
商家信息中的卧室总数。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
containsPlace.numberOfRooms
|
商家信息中的客房总数。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description
|
对房源的说明。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
knowsLanguage
|
屋主可以使用的语言。请使用符合 IETF BCP 47 标准的语言代码,例如 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
review
|
商家信息的一条或多条用户评价。请遵循评价摘要指南,并查看评价属性的必要属性和建议属性列表。 "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "4", "bestRating": "5" }, "datePublished": "2023-02-09" "author": { "@type": "Person", "name": "Lillian R" } } |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
review.contentReferenceTime
|
作者入住的开始日期。 |
使用 Search Console 监控富媒体搜索结果
Search Console 是一款工具,可帮助您监控网页在 Google 搜索结果中的显示效果。即使没有注册 Search Console,您的网页也可能会显示在 Google 搜索结果中,但注册 Search Console 能够帮助您了解 Google 如何查看您的网站并做出相应的改进。建议您在以下情况下查看 Search Console:
首次部署结构化数据后
等 Google 将网页编入索引后,请在相关的富媒体搜索结果状态报告中查看是否存在问题。 理想情况下,有效项目数量会增加,而无效项目数量不会增加。如果您发现结构化数据存在问题,请执行以下操作:
发布新模板或更新代码后
如果对网站进行重大更改,请监控结构化数据无效项目的增幅。- 如果您发现无效项目增多了,可能是因为您推出的某个新模板无法正常工作,或者您的网站以一种新的错误方式与现有模板交互。
- 如果您发现有效项目减少了(但无效项目的增加情况并不对应),可能是因为您的网页中未再嵌入结构化数据。请通过网址检查工具了解导致此问题的原因。
定期分析流量时
请使用效果报告分析您的 Google 搜索流量。数据将显示您的网页在 Google 搜索结果中显示为富媒体搜索结果的频率、用户点击该网页的频率以及网页在搜索结果中的平均排名。您还可以使用 Search Console API 自动提取这些结果。问题排查
如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。
- 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
- Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南。
- 您的结构化数据可能存在错误。请参阅结构化数据错误列表。
- 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告。
- 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
- 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查。
- 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答。
- 在 Google 搜索中心论坛中发帖提问。