How to scrape flights data from Kayak using the Minexa API
- Minexa.ai

- 5 days ago
- 4 min read
Flight price data sitting behind a search interface is genuinely difficult to collect at scale. Kayak surfaces destination tiles with prices, stop counts, and editorial tags, but none of that is available via an official API. This walkthrough shows how to extract it using the Minexa API, a data extraction platform that combines a browser-based training step with a programmatic extraction endpoint.
The workflow has two phases: train a scraper once using the Minexa Chrome extension, then call the API to extract data from as many URLs as needed. The scraper is created once and reused indefinitely.
Step 1: Open the Minexa home page
Start by navigating to minexa.ai and installing the Chrome extension if you have not already. The extension is what lets you point at a page and define what to extract without writing any selectors.
Step 2: Navigate to the Kayak flights page
Open the Kayak destination search page you want to scrape. In this example, the URL is a Manila to UK region search with specific travel dates. Once the page has fully loaded and the destination tiles are visible, open the Minexa extension.
Step 3: Confirm you are on the right page
The extension popup appears and asks you to confirm the page. Click the 'I'm on the right page' button. This tells Minexa to analyse the current page structure and begin the scraper setup process.
Step 4: Review pagination detection
Minexa scans the page for pagination controls and displays what it found. For Kayak destination tiles, review the detected pagination logic and click Continue. Note that when using the API directly, you will need to handle pagination by passing each page URL explicitly rather than relying on automatic navigation.
Step 5: Choose your scraping mode
Minexa asks whether you want to scrape a single list or a list plus linked detail pages. For collecting destination tiles with prices and stop counts, select the single list option and continue.
On the next screen, choose between a simple scraping scenario or an advanced one. For Kayak, which renders content via JavaScript, selecting a scenario that waits for the page to fully load before extracting is the right call. The extension shows pre-built scenarios you can copy directly into your API request body.
Step 6: Select the data container
Minexa highlights the full container holding the destination tile list. This is the parent element wrapping all the rows, not an individual field. Confirm the selection and click 'Create Scraper'. Minexa then automatically identifies every data point within that container.
Step 7: Review extracted columns
After the scraper is created, all detected data points are listed with their auto-generated labels. Use the next and previous navigation to browse through the columns. Fields extracted from the Kayak destination tiles include city name, price range, layover info, trip type, flight link, and destination description among others.
Step 8: Get your API request code
Click 'API Request' in the top right. The extension generates a ready-to-run Python snippet and shows the JSON request body including your scraper ID. Copy this code directly, then update the URLs array with the Kayak pages you want to process.
Step 9: Complete configuration and create the job
Click 'Complete Configuration' to save the scraping job. The summary screen shows options including Google Sheets export. Once saved, the job is accessible from your dashboard and can be triggered via the API at any time.
Running the extraction via the API
Below is the Python request body structure. Replace the scraper ID with the one generated for your Kayak scraper, and populate the URLs array with your target pages. The js_render flag is set to true because Kayak loads destination data dynamically.
data = {
"batches": [{
"scraper_id": 6183,
"columns": ["top_30"],
"urls": ["https://www.kayak.co.uk/flights/MNL-252cy/2026-07-10/2026-08-03"],
"scraping": {
"js_render": true,
"timeout": 30,
"js_code": [{"wait_time": 2},{"page_init": true},{"wait_time": 4}],
"proxy": "verified",
"retry": 3
}
}],
"threads": 3
}POST to https://api.minexa.ai/data/ with your API key in the api-key header.
Sample extracted data
Here is what a few rows from the Kayak extraction look like with meta fields removed and field prefixes cleaned up:
[
{
"city_name": "London",
"price_range": "from £680",
"layover_info": "1+ stops",
"highlighted_features": "Solo traveller's favourite",
"trip_type": "Flight",
"flight_link": "/flights/MNL-LON/2026-07-10/2026-08-03"
},
{
"city_name": "Edinburgh",
"price_range": "from £788",
"layover_info": "1+ stops",
"highlighted_features": "Solo traveller's favourite",
"trip_type": "Flight",
"flight_link": "/flights/MNL-EDI/2026-07-10/2026-08-03"
},
{
"city_name": "Glasgow",
"price_range": "from £877",
"layover_info": "1+ stops",
"highlighted_features": "Great nightlife",
"trip_type": "Flight",
"flight_link": "/flights/MNL-GLA/2026-07-10/2026-08-03"
}
]The flight_link field encodes the origin-destination airport code pair and travel dates directly in the relative path. This means each row contains a ready-to-use deep link to that city's specific flight results, which can be used to build a second extraction layer without constructing URLs manually. The destination_description field returns a structured array where each object holds a text value and optional editorial tag per destination. The city_image_url field captures both the aria-label attribute and the CSS background-image style string as separate typed objects within a single array per row.
Once the job finishes, results are exportable as Excel or JSON directly from the dashboard. The scraper ID remains stable, so the same API call can be reused across future date ranges or different origin cities by updating only the URLs in the request body.
For more on building flight data pipelines, see: Scraping tax and accounting data from IDX using the Minexa API

Comments