民宿 (VacationRental
) 结构化数据
如果您向民宿商家信息页面添加结构化数据,Google 搜索便能够以更丰富的方式显示商家信息。用户可以直接在搜索结果中查看商家信息,例如名称、说明、图片、位置、评分、评价等。
开始之前
本文中的说明适用于相应人士已与 Google 技术支持客户经理联系且有权访问 Hotel Center 的网站。如果您想要集成民宿商家信息,但 Google 尚未与您联系,请使用民宿意向调查表与我们联系。
此功能仅适用于符合特定资格条件的网站,并且需要执行额外步骤才能完成集成。如需详细了解如何在 Google 上列出您的民宿,请参阅集成入门指南。
如何添加结构化数据
结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的运作方式。
下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab。
- 添加必要属性。根据您使用的格式,了解在网页上的什么位置插入结构化数据。
- 遵循指南。
- 使用富媒体搜索结果测试验证您的代码,并修复所有严重错误。此外,您还可以考虑修正该工具中可能会标记的任何非严重问题,因为这些这样有助于提升结构化数据的质量(不过,要使内容能够显示为富媒体搜索结果,并非必须这么做)。
- 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、
noindex
标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址。 - 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图。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
|
作者入住的开始日期。 |
Monitor rich results with Search Console
Search Console is a tool that helps you monitor how your pages perform in Google Search. You don't have to sign up for Search Console to be included in Google Search results, but it can help you understand and improve how Google sees your site. We recommend checking Search Console in the following cases:
- After deploying structured data for the first time
- After releasing new templates or updating your code
- Analyzing traffic periodically
After deploying structured data for the first time
After Google has indexed your pages, look for issues using the relevant Rich result status report. Ideally, there will be an increase of valid items, and no increase in invalid items. If you find issues in your structured data:
- Fix the invalid items.
- Inspect a live URL to check if the issue persists.
- Request validation using the status report.
After releasing new templates or updating your code
When you make significant changes to your website, monitor for increases in structured data invalid items.- If you see an increase in invalid items, perhaps you rolled out a new template that doesn't work, or your site interacts with the existing template in a new and bad way.
- If you see a decrease in valid items (not matched by an increase in invalid items), perhaps you are no longer embedding structured data in your pages. Use the URL Inspection tool to learn what is causing the issue.
Analyzing traffic periodically
Analyze your Google Search traffic using the Performance Report. The data will show you how often your page appears as a rich result in Search, how often users click on it and what is the average position you appear on search results. You can also automatically pull these results with the Search Console API.问题排查
如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。
- 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
- Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南。
- 您的结构化数据可能存在错误。请参阅结构化数据错误列表。
- 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告。
- 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
- 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查。
- 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答。
- 在 Google 搜索中心论坛中发帖提问。