A hotel list is one or more XML files that lists all hotels for which you will provide pricing information. The hotel list file itself does not contain pricing information.
The root element of a hotel list is the <listings>
element which contains <listing>
elements that describe your properties.
You create a hotel list as part of your initial implementation , and then add or remove hotels from it as part of regular maintenance.
Make sure your files conform to the syntax guidelines
.
For example, use UTF-8 encoding and specify this encoding schema by including
the encoding
attribute in your XML tag.
After creating a hotel list, you can manually upload it to Google using https://support.google.com/hotelprices/ or host it on yourserver .
Find and fix data issues
To find and fix data issues in your hotel list, refer to the following articles:
Listing requirements
To be eligible for Google Hotel Ads, a property in your hotel list must have the following:
- Rooms in which paying guests can stay
- A physical presence and fixed location that is open to the public
- Fixed walls and plumbing
- A minimum stay requirement of no greater than 7 days
Common examples of ineligible
properties include cruises and
apartments because they usually don't meet the Listing requirements
criteria.
Camping cabins and other camping establishments with fixed walls, plumbing, and climate control (including wood stoves or propane heaters) are eligible. Outdoor lodgings that are not eligible include:
- Campsites, where guests stay in tents
- RV parks, where guests bring their own RV
<listings>
<listings>
is the root element of a hotel list and it contains a <language>
element and at least one <listing>
.
The <listings>
element appears in the following place in the hotel list
XML hierarchy:
+ <listings>
+ <language>
+ <datum>
+ <listing>
Syntax
The <listings>
element uses the following syntax:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi=" xsi
"
xsi:noNamespaceSchemaLocation=" schema_xsd
">
<language>
language_code
</language>
<datum>
datum_code
</datum>
<listing>
listing
</listing>
...
</listings>
Attributes
The <listings>
element has the following attributes:
Attribute | Required? | Description |
---|---|---|
xmlns:xsi
|
Required | Set to http://www.w3.org/2001/XMLSchema-instance
. |
xsi:noNamespaceSchemaLocation
|
Required | Set to http://www.gstatic.com/localfeed/local_feed.xsd
. |
Child elements
The <listings>
element has the following child elements:
en
for English.WGS84
, which
is used by most modern GPS devices. The Tokyo datum is only applicable to
addresses in Japan. The valid values for this element are:
-
WGS84
-
wgs84
-
TOKYO
-
tokyo
WGS84
, don't include
the <datum>
element in the hotel list.Examples
Structured Address
The following example shows a partial hotel list with a structured address:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<!--
The
value
of
<id>
must
be
unique
to
your
site
for
all
time.
Do
NOT
reuse
IDs.
-->
<id>123abc</id>
<name>Belgrave
House</name>
<address
format="simple">
<component
name="addr1">6
Acacia
Ave</component>
<component
name="addr2">Floor
5</component>
<component
name="city">London</component>
<component
name="province">Greater
London</component>
<component
name="postal_code">SW1W
9TQ</component>
</address>
<country>GB</country>
<latitude>35.070374</latitude>
<longitude>-106.213648</longitude>
<phone
type="main">123-456-7890</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
</listing>
...
</listings>
Free-Form Address
The following example shows a partial hotel list with a free-form address:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<!--
The
value
of
<id>
must
be
unique
to
your
site
for
all
time.
Do
NOT
reuse
IDs.
-->
<id>123abc</id>
<name>Belgrave
House</name>
<address>6
Elm
Ave
Unit
3,
Boston,
MA,
02472</address>
<country>US</country>
<latitude>35.070374</latitude>
<longitude>-106.213648</longitude>
<phone
type="main">123-456-7890</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
</listing>
...
</listings>
Optional Content
The following example shows a partial hotel list with a listing that
contains an optional <content>
:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<id>123456</id>
<name>My
Apartment</name>
<address
format="simple">
<component
name="addr1">1
Sandstone
Building</component>
<component
name="city">Los
Angeles</component>
<component
name="postal_code">90210</component>
<component
name="province">CA</component>
</address>
<country>US</country>
<latitude>40.730610</latitude>
<longitude>-73.935242</longitude>
<phone
type="main">12345678</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
<content>
<text
type="description">
<link>https://examplelisting.com/listings/12345</link>
<title>3
bedrooms
with
ocean
views</title>
<body>Stay
in
this
newly
renovated
3BR
house
with
ocean
views.</body>
<date
month="7"
day="23"
year="2023"/>
</text>
<attributes>
<website>https://hotel.example.com</website>
<client_attr
name="rating">8.2</client_attr>
</attributes>
<image
type="photo"
url="https://image_url">
<link>https://image_url</link>
<title>Main
hotel
picture</title>
</image>
</content>
</listing>
...
</listings>
<listing>
A hotel definition within a hotel list <listings>
element.
The <listing>
element appears in the following place in the Hotel List
Feed XML hierarchy:
+ <listings>
+ <language>
+ <listing>
Syntax
The <listing>
element uses the following syntax:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
...
>
<listing>
<!--
Specify
<listing>'s
child
elements
in
the
order
shown
below.
-->
<id> hotel_ID
</id>
<name> hotel_name
</name>
<address>
<component
name="addr1"> street_address_1
</component>
<component
name="addr2"> street_address_2
</component>
<component
name="city"> city_name
</component>
<component
name="province"> province_name
</component>
<component
name="postal_code"> postal_code
</component>
</address>
<!--
You
can
also
define
an
address
freeform,
although
this
is
not
recommended:
-->
<!--
<address> freeform_address
</address>
-->
<country> country_code
</country>
<latitude> hotel_latitude
</latitude>
<longitude> hotel_longitude
</longitude>
<phone
type="[fax|main|mobile|tdd|tollfree]"> phone_number
</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
<content> content
</content>
</listing>
</listings>
Attributes
The <listing>
element has no attributes.
Child elements
The <listing>
element has the following child elements:
Note: This value must be unique to your site for all time. Don't re-use IDs, as that might cause problems when trying to resolve property matching issues .
<name>Belgrave House</name>
The full physical location of the hotel.
This element takes a single attribute, format
, which you
must set to simple
.
At a minimum, you must provide the street address, city, state or region,
and postal code for the hotel. Use <component>
child
elements to describe each of the following parts of the address:
-
addr1
: The primary street address of the hotel. -
addr2
: The secondary street address, if necessary. -
addr3
: A third portion of the street address, if necessary. -
city
: The name of the hotel's city. -
province
: The name of the hotel's state, region, or province. -
postal_code
: The hotel's postal code.
For example:
< address format = "simple" > < component name = "addr1" > 6 Acacia Ave < / component > < component name = "addr2" > Floor 5 < / component > < component name = "city" > London < / component > < component name = "province" > Greater London < / component > < component name = "postal_code" > SW1W 9 TQ < / component > < / address >
Alternatively, you can provide a "free-form" address, although this is not recommended. For example:
< address>6 Elm Ave Unit 3 , Boston , MA , 02472 < / address >
Note that P.O. boxes or other mailing-only addresses are not considered full physical addresses.
<country>US</country>
<latitude>37.423738</latitude>
This value can be generated with GeoCoding tools like the Google Maps API .
<longitude>-122.090101</longitude>
This value can be generated with GeoCoding tools like the Google Maps API .
One or more contact numbers for the hotel. If the listing is business branch, please provide the phone number specific to branch location (not the phone number of central headquarters).
The type
attribute can be one of the following:
-
fax
: Fax telephone number. -
main
: Main voice telephone number. -
mobile
: Mobile telephone number. -
tdd
: Telecommunications Device for the Deaf (TDD) telephone number. -
tollfree
: Toll free telephone number.
For example:
< ! -- Singapore ( country code + 65 ) -- > < phone type = "main" > + 65 6722 - 2323 < / phone > < ! -- U . S . ( country code + 1 ) -- > < phone type = "fax" > + 1 408 - 555 - 1111 < / phone >
At a minimum, you should provide a main
type.
<content>
* Either a phone number or latitude/longitude is required. We recommend that you define both.
Examples
Structured Address
The following example shows a partial hotel list with a structured address:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<!--
The
value
of
<id>
must
be
unique
to
your
site
for
all
time.
Do
NOT
reuse
IDs.
-->
<id>123abc</id>
<name>Belgrave
House</name>
<address
format="simple">
<component
name="addr1">6
Acacia
Ave</component>
<component
name="addr2">Floor
5</component>
<component
name="city">London</component>
<component
name="province">Greater
London</component>
<component
name="postal_code">SW1W
9TQ</component>
</address>
<country>GB</country>
<latitude>35.070374</latitude>
<longitude>-106.213648</longitude>
<phone
type="main">123-456-7890</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
</listing>
...
</listings>
Free-Form Address
The following example shows a partial hotel list with a free-form address:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<!--
The
value
of
<id>
must
be
unique
to
your
site
for
all
time.
Do
NOT
reuse
IDs.
-->
<id>123abc</id>
<name>Belgrave
House</name>
<address>6
Elm
Ave
Unit
3,
Boston,
MA,
02472</address>
<country>US</country>
<latitude>35.070374</latitude>
<longitude>-106.213648</longitude>
<phone
type="main">123-456-7890</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
</listing>
...
</listings>
Optional Content
The following example shows a partial hotel list with a listing that
contains an optional <content>
:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<id>123456</id>
<name>My
Apartment</name>
<address
format="simple">
<component
name="addr1">1
Sandstone
Building</component>
<component
name="city">Los
Angeles</component>
<component
name="postal_code">90210</component>
<component
name="province">CA</component>
</address>
<country>US</country>
<latitude>40.730610</latitude>
<longitude>-73.935242</longitude>
<phone
type="main">12345678</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
<content>
<text
type="description">
<link>https://examplelisting.com/listings/12345</link>
<title>3
bedrooms
with
ocean
views</title>
<body>Stay
in
this
newly
renovated
3BR
house
with
ocean
views.</body>
<date
month="7"
day="23"
year="2023"/>
</text>
<attributes>
<website>https://hotel.example.com</website>
<client_attr
name="rating">8.2</client_attr>
</attributes>
<image
type="photo"
url="https://image_url">
<link>https://image_url</link>
<title>Main
hotel
picture</title>
</image>
</content>
</listing>
...
</listings>
<content>
Adds information about a listing, such as ratings, amenities, and
other details. The <content>
element is optional. Within <content>
,
all child elements are optional.
The <content>
element appears in the following place in the Hotel List
Feed XML hierarchy:
+ <listings>
+ <language>
+ <listing>
+ <content>
Syntax
The <content>
element uses the following syntax:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
...
>
<listing>
<content>
<!--
Specify
<text>'s
child
elements
in
the
order
shown
below.
-->
<text
type="description">
<link> listing_link
</link>
<title> listing_title
</title>
<author> listing_author
</author>
<body> listing_description
</body>
<date
month=" MM
"
day=" DD
"
year=" YYYY
"/>
</text>
<!--
0
or
more
attributes:
-->
<attributes>
<website>https://hotel.example.com</website>
<client_attr
name="alternate_hotel_id"> alternate_hotel_id
</client_attr>
<client_attr
name="hotel_brand"> hotel_brand
</client_attr>
<client_attr
name="rating"> aggregate_rating
</client_attr>
</attributes>
<!--
a
picture
of
the
hotel
or
property-->
<image
type="photo"
url="https://image_url">
<link>https://image_url</link>
<title>Main
Hotel
Picture</title>
</image>
</content>
</listing>
...
</listings>
Attributes
The <content>
element has no attributes.
Child elements
The <content>
element has the following child elements:
The webpage associated with the listing from the provider. Has the following child elements:
-
<link>
: A link to the description. Include the "http://" or
"https://" in this element (optional). -
<title>
: The title for the description (optional). -
<author>
: The author of the description (optional). -
<body>
: The body of the description ( required ). -
<date>
: The date of the description (optional).
Note : These elements must appear in the order above.
Contains a user review or an editorial review of the listing. Your listing can have any number of reviews in it, of either type.
You don't need to include all reviews for a property in your <listing>
element; this element is intended for you to include
selected reviews that illustrate this listing's features or
quality.
Key Point: <review> should only be sent for Vacation Rental accounts. Contact your Technical Account Manager (TAM) for more information.
Contains 0 or more <client_attr>
child elements that
provide details about the property. The child elements use the following
syntax:
<client_attr name=" attribute_name "> attribute_value <client_attr>
For a list and a description of child elements, refer to <attributes>
.
All <client_attr>
elements are optional.
If there is a <website>
child element, it must be
positioned before any <client_attr>
element.
Example
The following example shows a partial hotel list that includes the <content>
element:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<id>123456</id>
<name>My
Apartment</name>
<address
format="simple">
<component
name="addr1">1
Sandstone
Building</component>
<component
name="city">Los
Angeles</component>
<component
name="postal_code">90210</component>
<component
name="province">CA</component>
</address>
<country>US</country>
<latitude>40.730610</latitude>
<longitude>-73.935242</longitude>
<phone
type="main">12345678</phone>
<category>hotel</category>
<!--
You
can
use
whatever
property
type
categories
you
wish
-->
<content>
<text
type="description">
<link>https://examplelisting.com/listings/12345</link>
<title>3
bedrooms
with
ocean
views</title>
<body>Stay
in
this
newly
renovated
3BR
house
with
ocean
views.</body>
<date
month="7"
day="23"
year="2023"/>
</text>
<attributes>
<website>https://hotel.example.com</website>
<client_attr
name="rating">8.2</client_attr>
</attributes>
<image
type="photo"
url="https://image_url">
<link>https://image_url</link>
<title>Main
hotel
picture</title>
</image>
</content>
</listing>
...
</listings>
<attributes>
The <attributes>
tag can be used to describe property amenities and to
classify ratings for the property.
+ <listings>
+ <language>
+ <listing>
+ <content>
+ <attributes>
Child elements
<client_attr>
element. Example:
<website>https://hotel.example.com</website>
attribute_name
or attribute_name
for Vacation Rentals
.Values for the attribute_name placeholder
The following table lists valid values for attribute_name in the <client_attr name=" attribute_name "> element.
Values for attribute_name
|
Description | Valid content values |
---|---|---|
alternate_hotel_id
|
An alternate identifier for your property. Having separate IDs is useful if you might need one property identifier for your feed information and another property identifier for your booking engine. | Any string value |
|
Deprecated:
Any string type custom attribute. These are not
displayed to users. Important:
Contact your Technical Account Manager (TAM) if you want
to use |
Any string value |
hotel_brand
|
The brand to which this hotel belongs. For example, "Marriott" or "Hilton". This is not displayed to users but can be used for grouping hotels. | Any string value |
lodging
|
Encoded representation of all fields available in the Lodging
proto
. |
Base64-encoded string of the encoded
Lodging
proto |
num_reviews
|
Number of reviews of the listing. Key Point: "num_reviews" should only be sent for Vacation Rental feeds. |
Any non-negative integer. |
rating
|
A floating point number representing the aggregate property rating. | This number is typically from 0-5, 0-10, or 0-100, but
you can use any range that represents your rating system. For example,
the property rating should be 3 or 4 for a rating_scale of 5. Note: The default rating_scale is 0-10 if unspecified. |
Values for the attribute_name placeholder for Vacation Rentals
Refer to Vacation Rentals-specific attributes and XML example .
<image>
+ <listings>
+ <language>
+ <listing>
+ <content>
<!-- <review> is allowed in Vacation Rentals only -->
+ <review>+ <attributes>+ <image>
Images are used to show the property in the listing ID. All images used must follow these guidelines:
- The recommended aspect ratio for images is 4:3.
- The image URL must be accessible by the Googlebot Image crawler.
-
If your site includes a robots.txt at the root level, verify that it contains one of the two options shown:
-
Allows the Googlebot crawler to crawl your site's content, images included.
- User-agent: Googlebot
- Allow: /
-
Allows the Googlebot Image crawler to crawl the images on your site.
- User-agent: Googlebot-Image
- Allow: /
-
-
Screenshots of images or websites aren't permitted. Images must be original and actual images or photographs.
Attributes
An image must be one of the following:
-
"ad"
if the image is an advertisement -
"menu"
if the image is a restaurant menu -
"photo"
if the image is a photo of the business
url
url
attribute to
specify the image to use on that page.Child elements
Child element | Required? | Description |
---|---|---|
<link>
|
Requested, but required for local photo listings. | This tag contains the valid and up-to-date URL of the page on your site
that the relevant image is on. It doesn't contain the URL for the image itself. Example:
<link><http://www.example.com/magic_pizza/></link> |
<title>
|
Requested | This tag contains the title of the image. Example:
<title>"Luxury Apartment"</title> |
<author>
|
Not required | The name of the author of the content. The value can either be a username or a full name in the format "Firstname Lastname." |
<date>
|
Required | This tag identifies the date that the content item was created. You must enter a year, month, and day, as in the following example: <date month="6" day="7" year="2023"/> |
Example
The following example shows a partial hotel list with image tags:
<?xml
version="1.0"
encoding="UTF-8"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>en</language>
<listing>
<content>
<review>
</review>
<attributes>
</attributes>
<image
type="photo"
url="https://image_url"
width="400"
height="300">
<link>https://image_url</link>
<title>Apartment
at
Sandstone</title>
<author>Jessica
Landlord</author>
<date
month="6"
day="7"
year="2023"/>
</image>
</content>
</listing>
...
</listings>
Syntax guidelines
When creating an XML-based hotel list, use the following guidelines:
-
Validate your Hotel List XML files with Google's XSD Schema .
-
Use UTF-8 encoding. Specify this encoding schema by including the
encoding
attribute in your XML tag, as shown in the examples below. -
You can specify data values in your feed with
CDATA
sections. If you useCDATA
sections, don't escape special characters. -
Use escape codes for data values that are not in
CDATA
sections, including URLs. You can use either the entity code or the character code to represent these special characters. The following table lists common entity and character codes you can use:Character Entity Character Code Ampersand (&)& & Single Quote (')' ' Double Quote (")" " Greater Than (>)> > Less Than (<)< < -
Omit XML elements that doesn't contain data. For example, if you don't have the latitude and longitude for a hotel, you shouldn't include empty
<latitude/>
and<longitude/>
elements. -
Don't use HTML in your XML elements under any circumstances (even if it is escaped).
-
To validate your feed prior to uploading, you can use the local feed XSD http://www.gstatic.com/localfeed/local_feed.xsd.
-
To use comments in your feed, wrap the comment in
<!--
and-->
tags, as the following example shows:<!-- This is a comment -->