To get autocomplete results like you see on hotels.com (screenshot below) with multiple types of possible matches including landmarks, hotels, cities, neighborhoods, and airports, use our relational database files.
This page http://developer.ean.com/database_catalogs/relational/Geography_Data provides the URL for downloading regionEANHotelIDMapping (a file containing a map of all the hotels in each region type) and provides the URL you can use to download all of the region files for neighborhoods, airports, landmarks, and cities.
Each region type file on that page (airports, cities, etc) contains a regionID for each record.
This file lists all hotels:
The field types for the list of all hotels are documented here:
Practical use of the files:
1. When the user starts typing, query the table(s) that contain the destinations and hotel names (cities, neighborhoods, airports, landmarks, and hotels)
2. Show the matches, highlight the typed letters in each match
3. obtain regionID from the region selected by the user
4. use regionID to find list of hotel ID numbers using RegionEANHotelIDMapping table
When the user selects a city, neighborhood, airport, or landmark, you will then know the corresponding regionID. Query regionEANHotelIdMapping for a list of the hotelID numbers in that region.
One you have the list of hotelID numbers for hotels that are in the region, you can send a request to EAN to find out which of those properties are available for the dates of stay entered by your customer.
To do so, send an EAN API HotelList request using the <hotelList> element containing a list of all hotelIds in that regionID:
This file contains the translations for all regions. You must change the xx_XX part of the URL to one of the values in the table below
example, for Spanish use: https://www.ian.com/affiliatecenter/include/V2/RegionList_es_ES.zip
As the customer types, you will need to query the multi-language file. This will make categorization of the matched regions difficult because there is no “type” specification in the multi-language file. You would need to query the other files as well for categorization in this case.
|Available in these languages:|