Destination Keyword Search
The Lodging Listings API allows travellers on your website to search Expedia lodging inventory by Location Keyword, Region ID, Lat/Long, or Hotel ID(s) and return up to 1,000 offers per response. Travellers will then be able to deeplink from your website to the Expedia website to complete their travel booking.
This example demonstrates how to search by location keyword.
For more information about the Listings API, see Listings API documentation.
1. Build the request object using the classes defined in the SDK
GetLodgingListingsOperationParams getLodgingListingsOperationParams
= GetLodgingListingsOperationParams
.builder()
.partnerTransactionId("PARTNER TRANSACTION ID")
.locationKeyword("LOCATION KEYWORD")
/*...*/
.build();
GetLodgingListingsOperation getLodgingListingsOperation =
new GetLodgingListingsOperation(getLodgingListingsOperationParams);
2. Make the API call using service client.
Response<HotelListingsResponse> hotelListingsResponse =
client.execute(getLodgingListingsOperation);