Flight Listings

The Flight Listings API allows travellers on your website to search Expedia flight inventory by date, origin, destination, and other parameters to return a listing of available flights. Travellers will then be able to deeplink from your website to the Expedia website to complete their travel booking.

For more information about the Listings API, see Listings API documentation.

1. Build the request object using the classes defined in the SDK

For One Way

GetFlightListingsOperationParams listingsOperationParams = GetFlightListingsOperationParams.builder()
        .partnerTransactionID("txn-123-4")
        .segment1Origin("LAS") // segment1.origin
        .segment1Destination("FLL") // segment1.destination
        .segment1DepartureDate(LocalDate.parse("2025-09-01")) // segment1.departureDate
        .adult(1) // adult
        .senior(1) // senior
        .childrenAges(Arrays.asList(4, 5)) // childrenages
        .build();


GetFlightListingsOperation flightListingsOperations =
        new GetFlightListingsOperation(listingsOperationParams);

For Round Trip

GetFlightListingsOperationParams listingsOperationParams = GetFlightListingsOperationParams.builder()
        .partnerTransactionID("txn-123-4")
        .segment1Origin("LAS") // segment1.origin
        .segment1Destination("FLL") // segment1.destination
        .segment2Origin("FLL") // segment2.origin
        .segment2Destination("LAS")// segment2.destination
        .segment1DepartureDate(LocalDate.parse("2025-09-01")) // segment1.departureDate
        .segment2DepartureDate(LocalDate.parse("2025-09-11")) // segment2.departureDate
        .adult(1) // adult
        .senior(1) // senior
        .childrenAges(Arrays.asList(4, 5)) // childrenages
        .build();


GetFlightListingsOperation flightListingsOperations =
        new GetFlightListingsOperation(listingsOperationParams);

For Multi-City

GetFlightListingsOperationParams listingsOperationParams = GetFlightListingsOperationParams.builder()
        .partnerTransactionID("txn-123-4")
        .segment1Origin("LAS") // segment1.origin
        .segment1Destination("LAX") // segment1.destination
        .segment2Origin("FLL") // segment2.origin
        .segment2Destination("LAS")// segment2.destination
        .segment1DepartureDate(LocalDate.parse("2025-09-01")) // segment1.departureDate
        .segment2DepartureDate(LocalDate.parse("2025-09-11")) // segment2.departureDate
        .adult(1) // adult
        .senior(1) // senior
        .childrenAges(Arrays.asList(4, 5)) // childrenages
        .build();

GetFlightListingsOperation flightListingsOperations =
        new GetFlightListingsOperation(listingsOperationParams);

2. Make the API call using service client.

Response<FlightSearchResponse> flightlistingsResponse = 
        xapClient.execute(flightListingsOperations);
Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve!