# Booking Flights Scraper (`lexis-solutions/booking-flights-scraper`) Actor

Scrape flight listings from Booking.com—including routes, airlines, prices, dates, availability, and booking links. Ideal for travel platforms, price comparison, and market analysis. Fast, structured, and customizable extraction from Booking.com’s flights section.

- **URL**: https://apify.com/lexis-solutions/booking-flights-scraper.md
- **Developed by:** [Lexis Solutions](https://apify.com/lexis-solutions) (community)
- **Categories:** Travel, Automation
- **Stats:** 10 total users, 0 monthly users, 43.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.40 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Booking Flights Scraper

![Booking Flights Scraper](https://i.ibb.co/svQKBKvb/booking-flights-cover.png)

The **Booking Flights Scraper** is an Apify actor that searches Booking.com Flights and extracts flight offers based on trip type, routes, dates, passenger counts, cabin class, sorting, and direct-flight preference.

***

### ✨ Key Features

- **Flexible trip types**: One-way or round-trip searches.
- **Route resolution**: Query departure and arrival locations using plain text terms.
- **Passenger and cabin controls**: Set adults count, optional children ages, and cabin class.
- **Smart filtering**: Sort by best/cheapest/fastest and optionally restrict to direct flights.
- **Structured output**: Returns normalized flight itineraries with pricing and timing breakdowns.

***

### 💡 Why It's Important

Booking aggregates flight options from multiple carriers and partners. With this actor, you can:

- **Compare prices and itineraries** quickly across different routes and dates.
- **Analyze schedule characteristics** such as total flight time and number of legs.
- **Automate monitoring** of pricing and availability for business intelligence and alerts.

***

### 👤 Who Is It For?

- **Travel agencies and OTAs** optimizing content and pricing.
- **Analysts and researchers** tracking route competitiveness and seasonality.
- **Developers and data teams** building dashboards and travel products.

***

### 🚀 Business Use Cases

- **Price monitoring** across dates, routes, and cabin classes.
- **Route analysis** for total times, stops, and carrier combinations.
- **Customer experience**: Surface best/cheapest/fastest options or direct-only alternatives.

***

### 🛠 Input Schema

The actor accepts the following input:

```json
{
  "tripType": "ONEWAY", // ["ONEWAY", "ROUNDTRIP"]
  "fromLocationQuery": "Amsterdam",
  "toLocationQuery": "London",
  "departureDate": "YYYY-MM-DD",
  "returnDate": "YYYY-MM-DD", // required if tripType is roundTrip
  "numberOfAdults": 1,
  "childrenAges": "2,5", // children ages (comma separated), e.x: 2,5 (represents two children ages 2 and 5), leave empty for no children
  "cabinClass": "ECONOMY", // ["ECONOMY", "PREMIUM_ECONOMY", "BUSINESS", "FIRST"]
  "sortType": "BEST", // ["BEST", "CHEAPEST", "FASTEST"]
  "isDirectFlight": false, // if true -> no stopovers
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

Notes:

- **Required fields**: `tripType`, `fromLocationQuery`, `toLocationQuery`.
- **Trip type**: `ONEWAY` or `ROUNDTRIP`.
  - If you choose `ROUNDTRIP`, provide a valid `returnDate` (`YYYY-MM-DD`).
- **Dates**: `departureDate` and `returnDate` must match `YYYY-MM-DD` as per the schema pattern.
- **Adults**: `numberOfAdults` is an integer between 1 and 9 (inclusive).
- **Children**: `childrenAges` is a comma-separated string of ages, e.g. `"2,5"` for two children aged 2 and 5. Leave empty for no children.
- **Cabin class**: one of `ECONOMY`, `PREMIUM_ECONOMY`, `BUSINESS`, `FIRST`.
- **Sort type**: one of `BEST`, `CHEAPEST`, `FASTEST`.
- **Direct flights**: Set `isDirectFlight` to `true` to allow only itineraries with no stopovers.
- **Limit**: `maxItems` caps how many offers to return.
- **Proxies**: Results vary by request origin. Use country-specific proxies via `proxyConfiguration` (e.g., US proxies for US results, FR proxies for France) because Booking may return different availability and prices per country.

***

### 📦 Output Schema

Each dataset item resembles the following structure:

```json
{
  "id": "d6a1f_H4sIAAAAAAAA_y2QW2...",
  "price": 180,
  "departureDate": "2025-10-10T15:35:00",
  "arrivalDate": "2025-10-17T18:30:00",
  "tripType": "ROUNDTRIP",
  "pointOfSale": "us",
  "cabinClass": "ECONOMY",
  "totalFlightTime": 8700,
  "segments": [
    {
      "departureAirport": {
        "type": "AIRPORT",
        "code": "CDG",
        "name": "Paris - Charles de Gaulle Airport",
        "city": "PAR",
        "cityName": "Paris",
        "country": "FR",
        "countryName": "France",
        "province": "Île de France"
      },
      "arrivalAirport": {
        "type": "AIRPORT",
        "code": "SEN",
        "name": "London Southend Airport",
        "city": "LON",
        "cityName": "London",
        "country": "GB",
        "countryName": "United Kingdom",
        "province": "Greater London"
      },
      "departureTime": "2025-10-10T15:35:00",
      "arrivalTime": "2025-10-10T15:45:00",
      "legs": [
        {
          "departureTime": "2025-10-10T15:35:00",
          "arrivalTime": "2025-10-10T15:45:00",
          "departureAirport": {
            "type": "AIRPORT",
            "code": "CDG",
            "name": "Paris - Charles de Gaulle Airport",
            "city": "PAR",
            "cityName": "Paris",
            "country": "FR",
            "countryName": "France",
            "province": "Île de France"
          },
          "arrivalAirport": {
            "type": "AIRPORT",
            "code": "SEN",
            "name": "London Southend Airport",
            "city": "LON",
            "cityName": "London",
            "country": "GB",
            "countryName": "United Kingdom",
            "province": "Greater London"
          },
          "cabinClass": "ECONOMY",
          "flightInfo": {
            "facilities": [],
            "flightNumber": 4661,
            "planeType": "",
            "carrierInfo": {
              "operatingCarrier": "U2",
              "marketingCarrier": "U2",
              "operatingCarrierDisclosureText": ""
            }
          },
          "carriers": ["U2", "U2"],
          "carriersData": [
            {
              "name": "Easyjet",
              "code": "U2",
              "logo": "https://r-xx.bstatic.com/data/airlines_logo/U2.png"
            },
            {
              "name": "Easyjet",
              "code": "U2",
              "logo": "https://r-xx.bstatic.com/data/airlines_logo/U2.png"
            }
          ],
          "totalTime": 4200,
          "flightStops": [],
          "amenities": []
        }
      ],
      "totalTime": 4200,
      "travellerCheckedLuggage": [],
      "travellerCabinLuggage": [
        {
          "travellerReference": "1",
          "luggageAllowance": {
            "luggageType": "HAND",
            "maxPiece": 0
          },
          "personalItem": true
        },
        {
          "travellerReference": "2",
          "luggageAllowance": {
            "luggageType": "HAND",
            "maxPiece": 0
          },
          "personalItem": true
        }
      ],
      "isAtolProtected": false,
      "showWarningDestinationAirport": false,
      "showWarningOriginAirport": false
    },
    {
      "departureAirport": {
        "type": "AIRPORT",
        "code": "SEN",
        "name": "London Southend Airport",
        "city": "LON",
        "cityName": "London",
        "country": "GB",
        "countryName": "United Kingdom",
        "province": "Greater London"
      },
      "arrivalAirport": {
        "type": "AIRPORT",
        "code": "CDG",
        "name": "Paris - Charles de Gaulle Airport",
        "city": "PAR",
        "cityName": "Paris",
        "country": "FR",
        "countryName": "France",
        "province": "Île de France"
      },
      "departureTime": "2025-10-17T16:15:00",
      "arrivalTime": "2025-10-17T18:30:00",
      "legs": [
        {
          "departureTime": "2025-10-17T16:15:00",
          "arrivalTime": "2025-10-17T18:30:00",
          "departureAirport": {
            "type": "AIRPORT",
            "code": "SEN",
            "name": "London Southend Airport",
            "city": "LON",
            "cityName": "London",
            "country": "GB",
            "countryName": "United Kingdom",
            "province": "Greater London"
          },
          "arrivalAirport": {
            "type": "AIRPORT",
            "code": "CDG",
            "name": "Paris - Charles de Gaulle Airport",
            "city": "PAR",
            "cityName": "Paris",
            "country": "FR",
            "countryName": "France",
            "province": "Île de France"
          },
          "cabinClass": "ECONOMY",
          "flightInfo": {
            "facilities": [],
            "flightNumber": 4662,
            "planeType": "",
            "carrierInfo": {
              "operatingCarrier": "U2",
              "marketingCarrier": "U2",
              "operatingCarrierDisclosureText": ""
            }
          },
          "carriers": ["U2", "U2"],
          "carriersData": [
            {
              "name": "Easyjet",
              "code": "U2",
              "logo": "https://r-xx.bstatic.com/data/airlines_logo/U2.png"
            },
            {
              "name": "Easyjet",
              "code": "U2",
              "logo": "https://r-xx.bstatic.com/data/airlines_logo/U2.png"
            }
          ],
          "totalTime": 4500,
          "flightStops": [],
          "amenities": []
        }
      ],
      "totalTime": 4500,
      "travellerCheckedLuggage": [],
      "travellerCabinLuggage": [
        {
          "travellerReference": "1",
          "luggageAllowance": {
            "luggageType": "HAND",
            "maxPiece": 0
          },
          "personalItem": true
        },
        {
          "travellerReference": "2",
          "luggageAllowance": {
            "luggageType": "HAND",
            "maxPiece": 0
          },
          "personalItem": true
        }
      ],
      "isAtolProtected": false,
      "showWarningDestinationAirport": false,
      "showWarningOriginAirport": false
    }
  ],
  "priceBreakdown": {
    "total": {
      "currencyCode": "USD",
      "units": 180,
      "nanos": 760000000
    },
    "baseFare": {
      "currencyCode": "USD",
      "units": 85,
      "nanos": 600000000
    },
    "fee": {
      "currencyCode": "USD",
      "units": 0,
      "nanos": 0
    },
    "tax": {
      "currencyCode": "USD",
      "units": 95,
      "nanos": 160000000
    },
    "totalRounded": {
      "currencyCode": "USD",
      "nanos": 0,
      "units": 181
    },
    "discount": {
      "currencyCode": "USD",
      "units": 0,
      "nanos": 0
    },
    "totalWithoutDiscount": {
      "currencyCode": "USD",
      "units": 180,
      "nanos": 760000000
    },
    "totalWithoutDiscountRounded": {
      "currencyCode": "USD",
      "nanos": 0,
      "units": 181
    },
    "carrierTaxBreakdown": [
      {
        "carrier": {
          "name": "Easyjet",
          "code": "U2",
          "logo": "https://r-xx.bstatic.com/data/airlines_logo/U2.png"
        },
        "avgPerAdult": {
          "currencyCode": "USD",
          "units": 47,
          "nanos": 580000000
        }
      }
    ],
    "showPriceStrikethrough": false
  },
  "travellerPrices": [
    {
      "travellerPriceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 90,
          "nanos": 380000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 42,
          "nanos": 800000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 47,
          "nanos": 580000000
        },
        "totalRounded": {
          "currencyCode": "USD",
          "nanos": 0,
          "units": 91
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 90,
          "nanos": 380000000
        },
        "totalWithoutDiscountRounded": {
          "currencyCode": "USD",
          "nanos": 0,
          "units": 91
        },
        "showPriceStrikethrough": false
      },
      "travellerReference": "1",
      "travellerType": "ADULT"
    },
    {
      "travellerPriceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 90,
          "nanos": 380000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 42,
          "nanos": 800000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 47,
          "nanos": 580000000
        },
        "totalRounded": {
          "currencyCode": "USD",
          "nanos": 0,
          "units": 91
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 90,
          "nanos": 380000000
        },
        "totalWithoutDiscountRounded": {
          "currencyCode": "USD",
          "nanos": 0,
          "units": 91
        },
        "showPriceStrikethrough": false
      },
      "travellerReference": "2",
      "travellerType": "ADULT"
    }
  ],
  "priceDisplayRequirements": [],
  "includedProducts": {
    "areAllSegmentsIdentical": true,
    "segments": [
      [
        {
          "luggageType": "PERSONAL_ITEM",
          "maxPiece": 2,
          "piecePerPax": 1
        }
      ]
    ]
  },
  "extraProducts": [
    {
      "type": "flexibleTicket",
      "priceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        }
      }
    },
    {
      "type": "cabinBaggagePerTraveller",
      "priceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 19,
          "nanos": 990000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 19,
          "nanos": 990000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 19,
          "nanos": 990000000
        }
      }
    },
    {
      "type": "checkedInBaggage",
      "priceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 68,
          "nanos": 730000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 68,
          "nanos": 730000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 68,
          "nanos": 730000000
        }
      }
    }
  ],
  "offerExtras": {
    "flexibleTicket": {
      "airProductReference": "n/a",
      "travellers": ["1", "2"],
      "recommendation": {
        "recommended": false,
        "confidence": "UNKNOWN_LEVEL"
      },
      "priceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalRounded": {
          "currencyCode": "USD",
          "nanos": 0,
          "units": 13
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "totalWithoutDiscountRounded": {
          "currencyCode": "USD",
          "nanos": 0,
          "units": 13
        },
        "showPriceStrikethrough": false
      },
      "supplierInfo": {
        "name": "Gotogate, Inc.",
        "termsUrl": "https://flights-us.gotogate.com/rf/travel-conditions",
        "privacyPolicyUrl": "https://flights-us.gotogate.com/rf/privacy-policy"
      }
    }
  },
  "ancillaries": {
    "cabinBaggagePerTraveller": {
      "luggageAllowance": {
        "luggageType": "HAND",
        "maxPiece": 1,
        "maxWeightPerPiece": 33,
        "massUnit": "LB",
        "sizeRestrictions": {
          "maxLength": 22,
          "maxWidth": 17,
          "maxHeight": 9,
          "sizeUnit": "INCH"
        }
      },
      "priceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 19,
          "nanos": 990000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 19,
          "nanos": 990000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 19,
          "nanos": 990000000
        }
      },
      "travellers": ["1", "2"]
    },
    "checkedInBaggage": {
      "airProductReference": "n/a",
      "options": [
        {
          "luggageAllowance": {
            "luggageType": "CHECKED_IN",
            "ruleType": "PIECE_BASED",
            "maxPiece": 1,
            "maxWeightPerPiece": 33.1,
            "massUnit": "LB"
          },
          "priceBreakdown": {
            "total": {
              "currencyCode": "USD",
              "units": 68,
              "nanos": 730000000
            },
            "baseFare": {
              "currencyCode": "USD",
              "units": 68,
              "nanos": 730000000
            },
            "fee": {
              "currencyCode": "USD",
              "units": 0,
              "nanos": 0
            },
            "tax": {
              "currencyCode": "USD",
              "units": 0,
              "nanos": 0
            },
            "discount": {
              "currencyCode": "USD",
              "units": 0,
              "nanos": 0
            },
            "totalWithoutDiscount": {
              "currencyCode": "USD",
              "units": 68,
              "nanos": 730000000
            },
            "showPriceStrikethrough": false
          },
          "travellers": ["1", "2"],
          "preSelected": false
        }
      ]
    },
    "flexibleTicket": {
      "airProductReference": "n/a",
      "travellers": ["1", "2"],
      "priceBreakdown": {
        "total": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "baseFare": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "fee": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "tax": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "discount": {
          "currencyCode": "USD",
          "units": 0,
          "nanos": 0
        },
        "totalWithoutDiscount": {
          "currencyCode": "USD",
          "units": 12,
          "nanos": 660000000
        },
        "showPriceStrikethrough": false
      },
      "preSelected": false,
      "recommendation": {
        "recommended": false,
        "confidence": "UNKNOWN_LEVEL"
      },
      "supplierInfo": {
        "name": "Gotogate, Inc.",
        "termsUrl": "https://flights-us.gotogate.com/rf/travel-conditions",
        "privacyPolicyUrl": "https://flights-us.gotogate.com/rf/privacy-policy"
      }
    }
  },
  "brandedFareInfo": {
    "fareName": "Standard",
    "cabinClass": "ECONOMY",
    "features": [
      {
        "featureName": "PERSONAL_BAGGAGE",
        "category": "BAGGAGE",
        "code": "BK03",
        "label": "2 personal items",
        "availability": "INCLUDED",
        "priority": 0,
        "content": {}
      }
    ],
    "fareAttributes": [],
    "nonIncludedFeaturesRequired": false,
    "nonIncludedFeatures": [],
    "featuresList": [],
    "checkinBaggageExcluded": true,
    "cabinBaggageExcluded": true
  },
  "fareRules": [
    {
      "segmentIdentifiers": [
        {
          "segmentIndex": 0,
          "legIndex": 0
        }
      ],
      "availablePolicies": [
        {
          "type": "CHANGE_BEFORE",
          "priceBreakdown": {
            "total": {
              "currencyCode": "",
              "units": 56,
              "nanos": 670000000
            },
            "baseFare": {
              "currencyCode": "",
              "units": 0,
              "nanos": 0
            },
            "fee": {
              "currencyCode": "",
              "units": 0,
              "nanos": 0
            },
            "tax": {
              "currencyCode": "",
              "units": 0,
              "nanos": 0
            }
          }
        }
      ],
      "unavailablePolicies": [
        {
          "type": "CANCEL_BEFORE"
        }
      ]
    },
    {
      "segmentIdentifiers": [
        {
          "segmentIndex": 1,
          "legIndex": 0
        }
      ],
      "availablePolicies": [
        {
          "type": "CHANGE_BEFORE",
          "priceBreakdown": {
            "total": {
              "currencyCode": "",
              "units": 49,
              "nanos": 0
            },
            "baseFare": {
              "currencyCode": "",
              "units": 0,
              "nanos": 0
            },
            "fee": {
              "currencyCode": "",
              "units": 0,
              "nanos": 0
            },
            "tax": {
              "currencyCode": "",
              "units": 0,
              "nanos": 0
            }
          }
        }
      ],
      "unavailablePolicies": [
        {
          "type": "CANCEL_BEFORE"
        }
      ]
    }
  ],
  "appliedDiscounts": [],
  "extraProductDisplayRequirements": {},
  "unifiedPriceBreakdown": {
    "id": "U24661.CDG2025-10-10T15:35:00.SEN2025-10-10T15:45:00.ECONOMY,U24662.SEN2025-10-17T16:15:00.CDG2025-10-17T18:30:00.ECONOMY_0_2ADULT_DIRECT_ETG",
    "price": {
      "currencyCode": "USD",
      "units": 180,
      "nanos": 760000000
    },
    "items": [
      {
        "scope": "FLIGHT_ADULT",
        "id": "flight_adult",
        "title": "Adults (2)",
        "price": {
          "currencyCode": "USD",
          "units": 180,
          "nanos": 760000000
        },
        "items": [
          {
            "id": "flight_adult-basefare",
            "title": "Flight fare",
            "price": {
              "currencyCode": "USD",
              "units": 85,
              "nanos": 600000000
            },
            "items": []
          },
          {
            "id": "flight_adult-tax",
            "title": "Taxes and airline fees",
            "price": {
              "currencyCode": "USD",
              "units": 95,
              "nanos": 160000000
            },
            "items": []
          }
        ]
      }
    ],
    "addedItems": []
  },
  "perTravellerPriceDifferences": []
}
```

***

👀 p.s.

Got feedback or need an extension?

Lexis Solutions is a [certified Apify Partner](https://apify.com/partners/find). We can help you with custom solutions or data extraction projects.

Contact us over [Email](mailto:scraping@lexis.solutions) or [LinkedIn](https://www.linkedin.com/company/lexis-solutions)

### Support Our Work 💝

If you're happy with our work and scrapers, you're welcome to leave us a company review [here](https://apify.com/partners/find/lexis-solutions/review) and leave a review for the scrapers you're subscribed to. It will take you less than a minute but it will mean a lot to us!

Image Credit: https://www.booking.com/

# Actor input Schema

## `tripType` (type: `string`):

Filter offers by trip type (e.g., ONEWAY, ROUNDTRIP)

## `fromLocationQuery` (type: `string`):

Enter your departure location query

## `toLocationQuery` (type: `string`):

Enter your arrival location query

## `departureDate` (type: `string`):

Enter departure date in this format YYYY-MM-DD

## `returnDate` (type: `string`):

Enter return date in this format YYYY-MM-DD

## `numberOfAdults` (type: `integer`):

Enter number of adults

## `childrenAges` (type: `string`):

Enter children ages (comma separated), e.x: 2,5 (represents two children ages 2 and 5), leave empty for no children

## `cabinClass` (type: `string`):

Filter offers by cabin class (e.g., ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST)

## `sortType` (type: `string`):

Filter offers by sort type (e.g., BEST, CHEAPEST, FASTEST)

## `isDirectFlight` (type: `boolean`):

Filter offers by direct flight (no stopovers)

## `maxItems` (type: `integer`):

The maximum number of offers to scrape

## `proxyConfiguration` (type: `object`):

Your proxy configuration from Apify

## Actor input object example

```json
{
  "tripType": "ONEWAY",
  "fromLocationQuery": "Amsterdam",
  "toLocationQuery": "London",
  "numberOfAdults": 1,
  "cabinClass": "ECONOMY",
  "sortType": "BEST",
  "isDirectFlight": false,
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tripType": "ONEWAY",
    "fromLocationQuery": "Amsterdam",
    "toLocationQuery": "London"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/booking-flights-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "tripType": "ONEWAY",
    "fromLocationQuery": "Amsterdam",
    "toLocationQuery": "London",
}

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/booking-flights-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tripType": "ONEWAY",
  "fromLocationQuery": "Amsterdam",
  "toLocationQuery": "London"
}' |
apify call lexis-solutions/booking-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lexis-solutions/booking-flights-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/23hq58TAuJyQtdGCf/builds/haTe2hOeWZRYzCdQ4/openapi.json
