How to get Expedia RegionIDs?

All Geographical regions managed in Expedia systems are identified by unique IDs called RegionIDs. Many Expedia APIs require regionID as an input to return applicable inventory and travel entities.

Get RegionID with a city name. Use the Suggestions and Resolutions API. Parse the sr->id parameter from response

https://terminal2.expedia.com/x/suggestions/regions?query=las%20vegas

How to get Expedia HotelIDs?

You can use the following APIs to get Expedia hotelIDs which are required as input parameters to utilize various features exposed by other APIs. HotelID is a unique identifier for every hotel property at Expedia.

  1. Get HotelIDs for a given radial latitude-longitude search using Hotel Search API

    https://terminal2.expedia.com/x/hotels?location=47.6063889,-122.3308333&radius=5km
  2. Get HotelIDs for a given Expedia RegionID

    https://terminal2.expedia.com/x/hotels?regionids=6434
  3. Get HotelIDs for a natural language free text search like "Hotels in Las Vegas"

    https://terminal2.expedia.com/x/nlp/results?q=hotels%20in%20austin

Find Package Deals For A Set of Hotels

  1. First, get a list of hotel IDs for a given area.

    Use the Natural Language Hotel Search API to get a list of hotel IDs for a given geographical region, destination airport city, or point of interest.

    https://terminal2.expedia.com/x/nlp/results?q=Hotels+near+Seattle
  2. Using the hotel IDs returned in the previous response, call the Free Nights Hotel Deals API to get 'free night' deals.

    https://terminal2.expedia.com/x/deals/hotels?adultCount=2&hotelIds=554676,14917,1833&checkInDate=2017-04-15&checkOutDate=2017-04-29

Find Hotels Near A Point Of Interest (POI)

  1. Search for a POI term such as "Seattle Center".

    https://terminal2.expedia.com/x/geo/features?ln.op=cn&ln.value=seattle%20center&limit=5
  2. Use the Geography Search API with a POI id from the previous response to find hotels within a certain radius of that POI.

    https://terminal2.expedia.com/x/geo/features/319476405484128016/features?within=1km&type=hotel
  3. Now that you have a list of hotel ids to work with, use the deals API to return package deals for those hotels.

    https://terminal2.expedia.com/x/deals/hotels?adultCount=2&hotelIds=20194&checkInDate=2017-04-15&checkOutDate=2017-04-30

Search Using Natural Language

  1. You can search using free text like "My wife and I need a deal in Las Vegas this weekend"

  2. Use the Natural Language Hotel Search API, passing the phrase to search as the q parameter.

    https://terminal2.expedia.com/x/nlp/results?q=my%20wife%20and%20i%20need%20a%20deal%20in%20las%20vegas%20this%20weekend

    The API will return data about how it interpreted the query as concept elements. For example, Date, Location, and Price are the concepts returned from the above query.

    It will also return a list of hotels and POIs that match the query, if applicable.

  3. Use the Date concept values along with the resulting specific hotels or the region latitude and longitude to provide hotel details and rates against the Hotel Search API

    https://terminal2.expedia.com/x/hotels?location=36.07981347%2C-115.29002364&radius=10&dates=2017-05-13T00%3A00%3A00%2C2017-05-15T00%3A00%3A00&adults=2

Get Hotel Reviews for a Specific Region

  1. Take user input such as "New York" etc and resolve it to a valid geographical region

    https://terminal2.expedia.com/x/suggestions/regions?query=New%20York

    This will return a response that includes the following:

    { . . .
      "f":"New York (and vicinity), New York, United States of America",
      "id": "178293",
      . . .
    }
    
  2. Use the region id returned to get hotel information and pricing (if searching with dates) from the Hotel Search API

    https://terminal2.expedia.com/x/hotels?dates=2017-03-05,2017-03-07regionids=178293
  3. Use with Review API with these IDs to get hotel reviews.

    https://terminal2.expedia.com/x/reviews/hotels?hotelId=234

Get Point of Interests

  1. Supply latitude, longitude, and radius and get back travel attractions and/or point of interests using the Geography Search API

    https://terminal2.expedia.com/x/geo/features?within=5km&lng=-122.453269&lat=37.777363&type=point_of_interest

 

Find Major Airports around City, Latitude-Longitude

To get airport using a city or location name use the Search Resolution API   Parse response to get element annotated as t:AIRPORT and get the mapping airport code from element 

https://terminal2.expedia.com/x/suggestions/regions?query=Seattle

To get airport based on latitude, longitude use our Geo API. 

https://terminal2.expedia.com/x/geo/features?within=<x>km&lat=<latitude>&lng=<longitude>&type=airport&verbose=3

 Parse response to get element iata:airportCode.

Filter and pick major commercial airports in case when multiple airports are returned. Picking major airports increase probability for finding flights, hotels, car rentals, activities etc. You can pick major airports by parsing isMinorAirport element from the response and picking airports with isMinorAirport set to False