# KAYAK Flights Scraper (`memo23/kayak-flights-scraper`) Actor

Scrape KAYAK flight results: fares per booking provider, airlines, flight numbers, times, stops, layovers, aircraft, booking links.

- **URL**: https://apify.com/memo23/kayak-flights-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 result rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## KAYAK Flights Scraper

Pull live flight fares from KAYAK: every option on a route, with prices per booking provider, full segment detail, aircraft, and booking links. One row per flight option.

Works with one-way, round-trip and multi-city searches, any cabin class, up to 9 adults. Feed it a KAYAK flights URL or a simple origin/destination/date pair.

### What you get

Each dataset row is one flight option:

- **Fares per provider** — KAYAK, Booking.com, Expedia, Cheapflightsfares, JetBlue, and every other reseller KAYAK compares, with localized prices and the booking link for each
- **Best price** across providers, with currency
- **Legs and segments** — origin, destination, departure and arrival times, duration, stops, layovers
- **Aircraft** per segment (e.g. Airbus A320neo, Boeing 737 MAX 8)
- **Airline and operating carrier** per segment, including codeshare disclosure
- **Flight numbers**
- **Shareable KAYAK URL** for each option
- **Price prediction** — KAYAK's own "buy now / wait" recommendation, when available

### Input

Two ways to run a search:

**1. Search objects**

```json
{
  "searches": [
    { "origin": "JFK", "destination": "LAX", "departDate": "2026-12-15" },
    { "origin": "JFK", "destination": "LAX", "departDate": "2026-12-15", "returnDate": "2026-12-22" }
  ]
}
```

**2. KAYAK URLs**

```json
{
  "startUrls": [
    "https://www.kayak.com/flights/JFK-LAX/2026-12-15?sort=price_a",
    "https://www.kayak.com/flights/ZAG-SPU/2026-12-20/2027-01-05?sort=bestflight_a"
  ]
}
```

| Field | Type | Default | Notes |
|---|---|---|---|
| `searches` | array | — | Origin/destination/date pairs. `returnDate` makes it a round trip. |
| `startUrls` | array | — | Paste any KAYAK flights URL; sort and adults are read from the URL. |
| `maxItemsPerSearch` | integer | 50 | Cap per search, 1–1000. |
| `sortMode` | select | `bestflight_a` | Best, Cheapest, Fastest, Departure, Arrival. |
| `adults` | integer | 1 | 1–9. |
| `cabinClass` | select | any | Economy, Premium economy, Business, First. |
| `includePricePrediction` | boolean | true | Attach KAYAK's buy/wait recommendation. |

### Output

```json
{
  "resultId": "12345",
  "bestPrice": 388,
  "currency": "USD",
  "airlines": ["AA", "B6"],
  "totalStops": 0,
  "totalDurationMinutes": 363,
  "totalBookingOptions": 7,
  "legs": [
    {
      "durationMinutes": 363,
      "departure": "2026-12-15T07:00:00",
      "arrival": "2026-12-15T10:23:00",
      "stops": 0,
      "segments": [
        {
          "airline": "AA",
          "flightNumber": "3",
          "operatingCarrierName": "American Airlines",
          "origin": "JFK",
          "destination": "LAX",
          "departure": "2026-12-15T07:00:00",
          "arrival": "2026-12-15T10:23:00",
          "durationMinutes": 363,
          "aircraft": "Boeing 737 MAX 8"
        }
      ]
    }
  ],
  "bookingOptions": [
    {
      "providerName": "Cheapflightsfares",
      "price": 388,
      "currency": "USD",
      "localizedPrice": "$388",
      "bookingUrl": "https://www.kayak.com/book/...",
      "fees": { ... },
      "baggagePolicy": { ... }
    }
  ],
  "shareableUrl": "https://www.kayak.com/s/...",
  "search": {
    "sortMode": "price_a",
    "adults": 2,
    "pricePrediction": { "recommendation": "buy" }
  },
  "scrapedAt": "2026-11-23T09:48:00.000Z"
}
```

### Use cases

- **Fare comparison** across every reseller KAYAK aggregates, not just one OTA
- **Price monitoring** on a route over time, with KAYAK's buy/wait signal
- **Route discovery** — which airlines fly a city pair, what aircraft, what stops
- **Travel meta-search** data for a flights aggregator or dashboard

### Notes

- Results stream in over several seconds as KAYAK compares providers; the actor waits for the search to complete.
- Sponsored and ad entries are filtered out — only real flight options come through.
- Dates are ISO 8601 in the airport's local timezone, as KAYAK returns them.

# Actor input Schema

## `searches` (type: `array`):

Flight searches to run. Each needs origin, destination and a departure date; add returnDate for round trips.

## `startUrls` (type: `array`):

Alternatively paste kayak.com flight search URLs, e.g. https://www.kayak.com/flights/ZAG-SPU/2026-12-20/2027-01-05?sort=price_a

## `maxItemsPerSearch` (type: `integer`):

Cap of flight results collected per search.

## `sortMode` (type: `string`):

KAYAK sort order for results.

## `adults` (type: `integer`):

Number of adult passengers.

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

Optional cabin restriction.

## `includePricePrediction` (type: `boolean`):

Attach KAYAK's price-direction recommendation (buy/wait) to each result's search context.

## Actor input object example

```json
{
  "searches": [
    {
      "origin": "JFK",
      "destination": "LAX",
      "departDate": "2026-12-15"
    }
  ],
  "maxItemsPerSearch": 50,
  "sortMode": "bestflight_a",
  "adults": 1,
  "cabinClass": "",
  "includePricePrediction": true
}
```

# Actor output Schema

## `flights` (type: `string`):

One row per flight option, with fares per booking provider, segments, times and booking links.

# 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 = {
    "searches": [
        {
            "origin": "JFK",
            "destination": "LAX",
            "departDate": "2026-12-15"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/kayak-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 = { "searches": [{
            "origin": "JFK",
            "destination": "LAX",
            "departDate": "2026-12-15",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("memo23/kayak-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 '{
  "searches": [
    {
      "origin": "JFK",
      "destination": "LAX",
      "departDate": "2026-12-15"
    }
  ]
}' |
apify call memo23/kayak-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/kayak-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/ckVaZgCa9fsERNtWb/builds/UfkLpGLr6vb48zsZb/openapi.json
