Setting Up a Hotel List in XML

This article describes how to create a hotel list in XML and host the XML feed on your server (also known as Hotel List Pull) for download by Google at the schedule you request. For other methods of setting up a hotel list, see How to set up your hotel inventory.

The following topics are covered:

About hotel lists in XML

A hotel list file contains descriptive data, such as property name, address, and GeoCode location, organized by property, for all of the properties in a Hotel Center account.

A very basic example of a hotel list file in the XML file format is shown below. This example shows only one of the several <listing> elements that are specified in the file. Each <listing> element represents a property.

<?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>

Creating a hotel list in XML

To create a hotel list feed in XML:

  1. Review the file requirements.
  2. Code your files as described in the Hotel List XML Reference.
  3. Validate the files using the hotel list feed schema.

After validating your files successfully, host the feed on your server as described in the next section. If you determined that you will upload your list in Hotel Center, see Upload a hotel list instead.

Hosting the XML feed on your server

You can host your hotel list on your server, and Google will periodically download ("fetch") the feed from your server using the frequency you choose. This delivery method is also known as Hotel List Pull.

After you have created your hotel list and validated its XML files, do the following:

  1. Prepare the files for download by Google as described in Hosting requirements.
  2. Contact your technical account manager (TAM) to:
    • Determine a fetch schedule. Google will automatically fetch and ingest the file available at a regular cadence (typically once a week).
    • Provide your download URL and authentication requirements.

If there are no errors, your hotel list will be published. All properties that are successfully matched in Google Maps are displayed on your Hotel Center account within the Properties tab.

If there are errors, Google will share the errors with you so you can fix them and prepare the files for download again.

Hosting requirements

This section lists the following requirements for hosting your XML feed:

Server requirements

  • Host your XML feed on your server. The server must be accessible via HTTP or HTTPS.

Directory requirements

To ensure that Google retrieves a complete snapshot of your data and does not attempt to download incomplete files, follow these guidelines when posting files to your HTTP server:

  • Develop and validate your feed's XML files in a directory from which Google doesn't fetch content (that is, not in the "download" directory).
  • After you've successfully validated your feed's XML files, create a symbolic link in a directory from which Google downloads the content. The symbolic link should point to the newly created feed.
  • If you're providing a zip file, include the XML file(s) at the root level, not within the download directory.

File requirements

  • Create your files in a directory from which Google doesn't fetch content.
  • Use plain text files (that is, not a formatted file like a Microsoft Word file).
  • Make sure that no single uncompressed XML file exceeds 100MB. Single or multiple XML files can be compressed into a single .zip file. There is no size limit for zipped XML files or .zip files.
  • Name the files as follows:
    • <partner_name>_local.xml (For a single XML file.)
    • <partner_name>_local.xml.zip (For single or multiple XML files in a zip. The individual XML files in the zip can be named in any manner, however, we recommend appending a language code to each filename.)

Authentication requirements

  • Optionally, you can secure your files with a username and password using either BASIC or DIGEST authentication (NTLM is not currently supported).