本頁面說明屬性和子元素的說明、值和規定。這些值僅適用於度假民宿房源。
一般 XML 結構的格式與飯店房源資訊動態饋給類似。請參閱「飯店清單 XML 參考資料」。
如未附上下列必要項目,系統會自動停用房源資訊:
- 必要 XML 子元素:
id、name、latitude、longitude、address。 - 必要屬性:
capacity和website。請參閱商家資訊動態饋給中的度假民宿直接連結。讓使用者有機會造訪房源網站。
如要瞭解必要的 XML 子項元素,請參閱 XML 子項元素。
如要進一步瞭解度假民宿,請參閱「度假民宿專屬屬性」。
最後,如果 Google 從其他來源判斷屬性的值與度假民宿動態饋給中指定的值不同,Google 會顯示該房源的值。舉例來說,如果 Google 從房源資訊的照片判斷房源有廚房,但 kitchen 屬性不存在或設為 No,Google 會將房源視為有廚房。這些屬性稱為「推斷屬性」,只有在推斷準確度相當有把握的情況下才會顯示。
<review>
內含使用者評論或編輯評論。您不需要在 <listing> 元素中加入所有評論。這個元素可讓您加入所選評論,藉此顯示這個房源的特色或品質。
<review> 元素會出現在飯店清單動態饋給 XML 階層的下列位置:
+ <listings>
+ <language>
+ <listing>
+ <content>
+ <review>
語法
<review> 元素使用下列語法:
<?xml version="1.0" encodin>g<="UTF-8&>quo<t;?
lis>tings< ...
> listing
cont<ent
..<.
> !-- Specify review's child elements in t>he orde<r shown below. --
> review t<ype=>"edito<rial&>quot;
< >linkreview_l<ink/li>n<k
titlereview_title/title !-- Title is for r>eviews of< type >"editori<al">; only --<
> authorrevi<ew_auth>or/author<
> rating<revie>w_rating/<rati>ng
<bodyr>eview_tex<t/body
> datereview_dat<e/date
> serv<icedate>review_<servicedate/servic>edate
< <>/span>/review
< review type=<">user"
< <>/span>linkreview<_link/link
authorreview_autho>r/<author
date month="MM" day=&>quot;DD&q<uot; year="YYYY"/ !-- Date is for> r<eviews of type "user" only --
servic>edate mon<th=&qu>ot;MM" d<ay=&quo>t;DD"<; ye>ar="YY<YY&qu>ot;/ !<-- Serv>ice D<ate is f>or <reviews >o<f type &q>uot;user" only --
ratingreview_rating/rating
bodyreview_text/body
/review
/content
/listing
/listings
屬性
<review> 元素的屬性如下:
| 屬性 | 是否必要? | 說明 |
|---|---|---|
| type | Required | 評論類型。設為下列任一值:
|
子元素
<review> 元素包含下列子項元素:
| 子項元素 | 是否必要? | 類型 | 說明 |
|---|---|---|---|
| <link> | Optional | string | 評論的連結。在這個元素中加入「http://」或「https://」。 |
| <title> | Optional | string | (僅限編輯評論) 評論的標題。 |
| <author> | Optional | string | 評論作者,例如「Susan von Trapp」。如果評論未註明出處,也可以是評論刊登的網站或出版物名稱。 |
| <rating> | Optional | string | 介於 0 到 10 (含) 之間的浮點數,代表評論的分數。例如「8.9」。 |
| <body> | Optional | string | 評論文字。這個元素不應包含 HTML。 |
| <date month="MM" day="DD" year="YYYY"/> | Optional | Object | (僅限使用者評論) 評論日期,您可使用這個元素的下列屬性指定:
舉例來說,2023 年 6 月 7 日的寫法如下: <date month="6" day=">7" year="2023"/ |
| <servicedate month="MM" day="DD" year="YYYY"/> | Optional | Object | (僅限使用者評論) 評論者瀏覽所評論商家資訊的日期。格式與 <date> 相同。
舉例來說,2023 年 6 月 7 日的寫法如下: <servicedate month="6" day=">7" year="2023"/ 如果評論未填寫至少月份和年份的 <servicedate>,可能不會顯示。不必輸入日期。 |
範例
以下範例顯示部分飯店清單,其中包含編輯和使用者評論:
<?xml version="1.0" encodin>g<="UTF-8"?
listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gs>tat<ic.com/l>oc<alfeed/lo>cal<_feed.x>sd&qu<ot>;
la<ngu>ageen</lan>guage
list<ing
> id<123456/id
nameMy Ap>artment</name
address form>at="simple"<;
co>mponent< name="addr1&quo>t;1 Sandsto<ne Buildin>g/compo<nent
component name=&q>uot;c<ity"L>os Ange<les/component
compo>ne<nt name=&q>uot;p<ostal_co>de&qu<ot;9021>0/<componen>t
< component name<="pr>ovinc<e"CA>/component<
/addr>ess
< country>US/country
<latitu>de40.<730610/l>atitu<de
lo>n<gitude-73.935242/longitude
phone type="main"123>45678</phone
> cat<egoryhotel/category !--> You can <use >whatever property type categories you wis<h --
> conte<nt
> text type="descrip<tion&q>uot;
< >linkhttps://examplelisting.com/listings/12345/link
< >span>title3 bedr<ooms with ocean views/title
>bodySta<y in >this ne<wly renovated 3BR house> with oce<an v>iews./body
date month=<">;7" <day=&>quot;23" year="<;2023&>quot;/
< >span>/text
r<eview t>ype="<;edito>r<ial&quo>t;
< >span>linkhttps://example.com/revi<ews/4>2/link
< > titleA< little piece of h>eaven/tit<le
> authorEXAMPLE.COM/author
< <>/span>rating8/ra<ting
> bodyThis< place >is really< good.>/<body
> /revi<ew
> review type="user"
linkhttps://ex<ample>person.or<g/reviews/82/link
authorSus>an von Tr<app/author
rating6/rating
b>odyNot <a bad p>lace, b<ut I prefe>r to be c<loser t>o the beach./body
< date da>y="6<" month="7">; y<ear="20>23"/<
servicedate day=">;1<6" mont>h="<;6" ye>ar=&quo<t;2023"/
/review
attribut>es
< >span>websitehttps://hote<l.exa>mple.com/<websi>te
client_<attr n>ame=&qu<ot;rat>ing&q<uot;8.2/>cli<ent_attr>
< >client_attr name="num_reviews"14/client_attr
/attributes
image type="photo" url="https://image_url"
linkhttps://image_url/link
titleMain hotel picture/title
/image
/content
/listing
...
/listings
attribute_name 預留位置的值
下表列出 <client_attr name="attribute_name"> 元素中 attribute_name 的有效值,但建議您盡可能提供額外的 attribute_name。
attribute_name 的值 |
是否必要? | 說明 | 有效內容值 |
|---|---|---|---|
| capacity | Required | 住宿可容納的房客人數上限。這個值應大於或等於「number_of_bedrooms」。 | Non-negative integer value |
| website | Required | 資源的網站網址。這項 ID 應是商家資訊專屬,且不得在多筆商家資訊中重複。 | Free text |
| partner_hygiene_link | Strongly recommended | 連結至外部合作夥伴網站,提供有關商家資訊衛生詳細資料的更多資訊。 | Free text (the site's URL) |
| number_of_bathrooms | Strongly recommended | 浴室數量。 | Non-negative float value, for example, 1, 1.5, 2 |
| number_of_bedrooms | Strongly recommended | 臥室數量。 | Non-negative integer value |
| number_of_beds | Strongly recommended | 所有房間的床位數。 | Non-negative integer value |
| self_checkin_checkout | Recommended | 資源是否提供自助入住和退房服務。 | Yes/No/Unknown |
| rating | Strongly recommended | 代表房源整體評分的浮點數。這個數字通常介於 0 到 5、0 到 10 或 0 到 100 之間,但您可以使用任何代表評分系統的範圍。 | Non-negative float value |
| rating_num | Strongly recommended | 房源獲得的評分次數。 | Non-negative integer value |
| rating_scale | Strongly recommended | 資源的最高可能評分。舉例來說,如果 rating_scale 為 5,property rating 應為 3 或 4。 注意:如未指定,預設的評分標準為 0 到 10 分。 |
Non-negative integer value |
| instant_bookable | Strongly recommended | 資源是否可透過結帳程序立即預訂。 替代方法是等待核准。 | Yes/No/Unknown |
| description | Strongly recommended | 說明房源獨特特質的自由格式文字 | Free text |
| category | Strongly recommended | 房源類型,例如別墅、平房、小屋或公寓 | Free text |
| ac | Recommended | 資源是否有空調。 | Yes/No/Unknown |
| beach_access | Recommended | 資源是否可通往附近的公共海灘。 | Yes/No/Unknown |
| check_in_time | Recommended | 入住飯店的確切時間。接受 HHMM、HH:MM 或 HH:MM:SS 格式;例如,請使用 14:00,而非 2pm 或 2:00pm。系統不會剖析或顯示其他格式。 | Time |
| check_out_time | Recommended | 從房源退房的確切時間。接受 HHMM、HH:MM 或 HH:MM:SS 格式,例如使用 11:00,而非 11am 或 11:00am。系統不會剖析或顯示其他格式。 | Time |
| child_friendly | Recommended | 資源是否適合兒童。 | Yes/No/Unknown |
| crib | Recommended | 資源是否提供嬰兒床。 | Yes/No/Unknown |
| elevator | Recommended | 資源是否有電梯。 | Yes/No/Unknown |
| gym_fitness_equipment | Recommended | 資源是否有健身房或任何健身器材。 | Yes/No/Unknown |
| heating | Recommended | 資源是否有暖氣。 | Yes/No/Unknown |
| hot_tub | Recommended | 資源是否有熱水浴缸。 | Yes/No/Unknown |
| ironing_board | Recommended | 資源是否提供熨衣板。 | Yes/No/Unknown |
| kitchen | Recommended | 資源是否有廚房。 | Yes/No/Unknown |
| microwave | Recommended | 資源是否有微波爐。 | Yes/No/Unknown |
| min_days_advance_purchase | Recommended | 可預訂住宿的最早提前天數。 | Non-negative integer value |
| min_night_stay | Recommended | 房客可預訂房源的最少天數。 | Positive integer (more than zero) |
| max_night_stay | Recommended | 房客可預訂房源的最長天數。 | Positive integer (more than zero) |
| outdoor_grill | Recommended | 資源是否有燒烤架。 | Yes/No/Unknown |
| oven_stove | Recommended | 資源是否有火爐和/或烤箱。 | Yes/No/Unknown |
| parking_type | Recommended | 資源提供的停車類型。 | Free/Paid/None |
| patio | Recommended | 資源是否有露台。 | Yes/No/Unknown |
| pets_allowed | Recommended | 部分或所有客房允許房客攜帶寵物 (狗或貓,不包括服務型動物) 入住。 | Yes/No/Unknown |
| pool_type | Recommended | 資源提供的泳池類型 (泳池使用權)。 | Indoors, Outdoors, Indoors/Outdoors, None |
| room_type | Recommended | 房型。目前唯一支援的值是 ENTIRE_PLACE。 |
ENTIRE_PLACE
|
| smoking_free_property | Recommended | 房源是否全面禁菸或禁止吸菸。 | Yes/No/Unknown |
| special_service_level | Recommended | 房源的服務等級是否為特殊等級。
例如:verified、luxury、premium |
Yes/No/Unknown |
| square_footage | Recommended | 房源面積,單位為平方英尺。 | Non-negative float value |
| square_meters | Recommended | 房源面積,單位為平方公尺。 | Non-negative float |
| tv | Recommended | 資源是否有電視。 | Yes/No/Unknown |
| washer_dryer | Recommended | 資源是否提供洗衣機。 | Yes/No/Unknown |
| wheelchair_accessible | Recommended | 資源是否提供無障礙設施。 | Yes/No/Unknown |
| internet_type | Recommended | 資源提供的 Wi-Fi 網路類型。 | Free/Paid/None |
| airport_shuttle | Optional | 房主是否提供往返機場或其他航廈的交通服務。 | Yes/No/Unknown |
| balcony | Optional | 資源是否有陽台。 | Yes/No/Unknown |
| fire_place | Optional | 資源是否有壁爐。 | Yes/No/Unknown |
| free_breakfast | Optional | 資源是否包含免費早餐。 | Yes/No/Unknown |
| host_description | Optional | 度假民宿房東的說明。 | Free text |
| host_language | Optional | 屋主可以使用語言。 | 以半形逗號分隔的語言代碼清單,例如:de、en |
| host_name | Optional | 度假民宿房東姓名。 | Free text |
| host_response_rate | Optional | 房東的平均回覆率。 | Non-negative float value, for example, 1, 0.75, 0.5 |
| host_response_time | Optional | 主機的平均回應時間。 | Free text |
| license_num | Optional | 在全球某些地區需要顯示的資源執照號碼 (遊客或商家)。如果有多份執照,則可以重複添加,建議新增執照發證機構做為背景資訊,例如:「巴黎:123456ABC」。 | Free text |
| number_of_half_bathrooms | Optional | 半套浴室數量。 | Non-negative integer value |
| number_of_living_rooms | Optional | 起居室數量。 | Non-negative integer value |
| private_beach_access | Optional | 資源是否擁有專屬的非公共海灘。 | Yes/No/Unknown |
| refund_policy | Optional | 房源的退款政策。 | Free text |
XML 子元素
必要 XML 子元素如下:
| 子項元素 | 是否必要? | 類型 | 說明 |
|---|---|---|---|
| <country> | Strongly recommended | string | 這項房源所在的國家/地區。這個值必須是 ISO 3116 雙字母國家/地區代碼,例如美國是 US,加拿大是 CA:<country>US</country> |
| <id> | Required | string | 房源的專屬 ID。請注意,每個度假屋都必須有網站專屬的 ID,且不得重複使用。 |
| <latitude> | Required | float | 與商家資訊中列出的所在位置對應的緯度,例如:<latitude>37.423738</latitude> 這個值可使用 Google 地圖 API 等地理編碼工具產生。 |
| <longitude> | Required | float | 與商家資訊中列出的所在位置對應的經度,例如:<longitude>-122.090101</longitude> 這個值可使用 Google 地圖 API 等地理編碼工具產生。 |
| <name> | Required | string | 房源名稱。最多 300 個半形字元。 |
| <address> | Required | string or Object | 以字串表示的房源完整實際地點。地址必須包含街道名稱和門牌號碼。如果沒有地址,請提供加號代碼。如果有的話,也請提供公寓或住宅單元的號碼。 或者,您也可以提供「複合」地址。使用
請注意,郵政信箱或其他僅供郵寄的地址都不算是完整的實際地址。 以下是完整地址的範例: <address>6 Acacia Ave Apt. 2, Nottingham NG8 6FT, UK/address> <address> <component name="a>ddr1"6 <Acacia Ave>/co<mponent component na>me=&qu<ot;addr2&q>uot<;Apt. 2/component c>omponent na<me="c>ity<"Nottingham /component > compo<nent name=>&qu<ot;postal_code"NG8 >6F<T/componen>t< compo>nent name="country"UK/component /address 以下是使用 plus code 的完整地址範例: <address>XQHM+7VF Nottingham NG8 6FT, UK/address> <address> <component name="a>ddr1&quo<t;XQHM+7VF>/co<mponent component n>ame="c<ity"N>ott<ingham /component componen>t name=<"post>al_<code"NG8 6FT/compon>en<t compon>e<nt name=>"country"UK/component /address 不建議的做法:
|
度假民宿商家資訊範例
<?xml version="1.0" encodin>g<="U>TF-<8"?> l<istings > la<nguagee>n/lan<gu>age <lis>ting < >id123456/id < nam>eApar<tment Name/name add>ress fo<rmat="simple">; compone<nt name=&q>uot;add<r1"18733 Clark Wa>y/co<mponent > com<ponent name="add>r2"#C10/<component > c<omponent name="city&quo>t;Mou<ntain View>/compon<ent component name=>"post<al_code&qu>ot;94<043/comp>onent< >co<mponent >name=<"pr>ovince&quo<t;Califor>nia/c<omponent<>/span> /address< count>ryUS/<country latit>ude37.41<82515/>latit<ude >longitude-122.<0742354/l>ongit<ude phone type="main"12>34567<8/phone> ca<tegoryvacation_villa/ca>tegory < da>te day="21&<quot;> month=&q<uot;1>2" year=&quo<t;2017>"/ < c>ontent tex<t typ>e="<;desc>ription<" linkhttp>s://list_<url/>link titleDescription <Title>/title < > bodyDescription Body/bo<dy > /text < >review <type=&q>uot;edito<rial&q>u<ot; > link<http>s://example.com/reviews/42</link> < title>A littl<e piece of heaven/>title < > authorEXAMPLE/author rating<8/rat>ing < bod>yThis place is <really >good./bod<y > < /revie>w r<evie>w type="user" linkhttps://exampleperso<n.org>/reviews/<82/link authorSusan von Tra>pp/author< rating6/rating bodyNot a b>ad plac<e, but >I prefe<r to be cl>oser to t<he beac>h./body date day="6<" m>onth=&quo<t;7" year="2017&q>u<ot;/ > serviced<ate day="16" month="6&quo>t; <year="2>017"</ /review attributes >w<ebsitehttps:>//hotel.e<xample.com/123456/website client_attr >nam<e="capa>city"<;7/client_attr client_attr name>="cleaning_disinfection&qu<ot;Yes/clien>t_attr < client_attr name="min_days_>b<etween_stays>"3/c<lient_attr client_attr name=&>q<uot;enhanced>_cleaning<_practices"Yes/client_attr > < client>_attr nam<e="partner_hygiene_link"http:/>/ww<w.example.co>m/hygiene<//client_attr cli>ent<_attr name=&>quot;numb<er_of_bathrooms"2/client>_att<r cl>ient_attr< name="number_of_bedrooms&>q<uot;3/client>_attr < client_attr name>=&q<uot;number_o>f_beds&qu<ot;4/client_attr client_at>tr <name="s>elf_check<in_checkout"Yes/clien>t_<attr > client_a<ttr name="rating"4.8/>cli<ent_attr > clie<nt_attr name="rating_num&qu>ot;53<73/client_at>tr < client_attr name="rating_s>cale&<quot;5/clien>t_attr < client_attr name="ac&q>uot<;Yes/client_>attr < client_attr name=&q>uot;air<port_shuttle>"Yes</client_attr client>_at<tr name=&quo>t;balcony<"No/client_attr >client_<attr name=&q>uot;beach<_access"Yes/client_attr > < client_attr> name=&qu<ot;check_in_time"15:00/client_attr > < client_>attr name<="check_out_time">;11<:00/client_a>ttr < client_attr name="child_fri>endly"Yes/client_attr client_attr name=&q<uot;crib&quo>t;Unknown</client_attr client_>attr name="elev<ator"Ye>s/client_<attr client_attr name=&q>uot;fire_p<lace"Un>known/cli<ent_attr client_attr name=&qu>ot;f<ree_breakfas>t"Ye<s/client_attr client_attr nam>e=&quo<t;gym_fitnes>s_equipme<nt"Yes/client_attr > < client_at>tr name=&<quot;heating"Yes/client_attr > < client_a>ttr name=<"host_description"A sh>ort <description >about the< host and their interests/client>_a<ttr >client_at<tr name="host_name&qu>ot;<The name of >the host/<client_attr client_att>r name="host_language"en, da, el/client_attr client_attr name="host_r<esponse_rate>"0.7<5/client_attr client_a>ttr name="h<ost_response>_time&quo<t;1 hour/client_attr > cl<ient_attr na>me="<hot_tub"Yes/client_attr > < client_at>tr name=&<quot;instant_bookable"Yes/client_attr > < client>_attr nam<e="internet_type"Free/c>l<ient_attr > cli<ent_attr name="ironing_board"No>/<client_attr > c<lient_attr name="kitchen&qu>ot<;Yes/client_>attr < client_attr name="li>cen<se_num">Free text<. If multiple licenses exist, w>e su<ggest adding> authorit<y of the licence as cont>ext/cli<ent_attr > clie<nt_attr name="license_num&>quo<t;Paris: 123>456ABC/cl<ient_attr client_att>r name=<"microw>ave"<Yes/client_attr client_attr nam>e="<;max_night_s>tay"<7/client_attr client>_attr name=&<quot;min_day>s_advance<_purchase"2/client_attr > client_attr name="min_ni<ght_stay&quo>t;3/clien<t_attr client_attr name="nu>mbe<r_of_living_>rooms&quo<t;1/client_attr client_attr name>=&<quot;outdoor>_grill&qu<ot;No/client_attr client_>attr< name=">oven_stov<e"Yes/client_att>r < clien>t_attr na<me="parking_type"Free>/cl<ient_attr > cli<ent_attr name="patio"Unknown/c>lie<nt_attr > cli<ent_attr na>me=&q<uot;pets>_al<lowed&qu>o<t;Yes/cli>ent_attr client_attr name="pool_type"Indoors/client_attr client_attr name="private_beach_access"Unknown/client_attr client_attr name="room_type"ENTIRE_PLACE/client_attr client_attr name="refund_policy"The refund policy for the property/client_attr client_attr name="smoking_free_property"Yes/client_attr client_attr name="special_service_level"No/client_attr client_attr name="square_footage"1200/client_attr client_attr name="tv"Yes/client_attr client_attr name="washer_dryer"Yes/client_attr client_attr name="wheelchair_accessible"Yes/client_attr /attributes /content /listing /listings