# KAYAK Flight & Airport Scraper (`rl1987/kayak-api-scraper`) Actor

Scrapes KAYAK's mobile metasearch API (reversed from the KAYAK Android app): flight itineraries with prices and providers (session-cookie mode), and nearby-airport lookup (anonymous). Read-only public travel data.

- **URL**: https://apify.com/rl1987/kayak-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 flight options

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## KAYAK Flight Price Scraper – Airfare, Providers & Airport Data ✈️

Scrape **live flight prices from KAYAK** — the metasearch engine that compares hundreds of airlines
and travel agencies — as clean, structured data. For any route and date this **KAYAK scraper**
returns every flight option with its **price, provider, currency, and departure/arrival times**,
plus cheapest/best flags. It talks directly to KAYAK's private mobile API (reversed from the KAYAK
Android app) and **mints its own session headlessly**, so there's **no KAYAK account, no login, and
no API key** — just enter an origin, destination and date and run.

Perfect for building fare-tracking tools, travel price-comparison sites, airfare analytics, and
travel-market research — get **flight metasearch data** in seconds instead of maintaining a fragile
browser scraper.

### What you can scrape

- ✈️ **Flight prices & providers** — every booking option for a route/date: provider name, price,
  currency, localized price, departure & arrival times, plus **cheapest** and **best** flags.
- 🛫 **Nearby airports** — all airports around a city or airport code (name, city, distance, popularity).
- 💱 **Currencies & countries** — KAYAK's reference lists for building localized travel apps.

### Key features

| Feature | Details |
|--------|---------|
| **Data source** | KAYAK mobile metasearch API — the same feed the KAYAK app uses |
| **Coverage** | Hundreds of airlines & online travel agencies compared per search |
| **Auth** | **None** — headless session, no account, no cookies, no API key |
| **Completeness** | Polls until the result set is stable, so you get the full option list — not a partial first page |
| **Export** | JSON, CSV, Excel, HTML, or via the Apify API |

### Popular use cases

- **Flight price monitoring & fare alerts** — track airfare for routes over time and trigger alerts on drops.
- **Travel price-comparison sites & apps** — power a "cheapest flights" widget with live provider prices.
- **Airfare & travel-market analytics** — build datasets of prices, providers and departure times across routes.
- **Meta-search & aggregator research** — compare which OTAs (Expedia, Priceline, CheapOair, …) win a route.
- **Revenue & competitive intelligence** — monitor how fares move by route, date and cabin class.

### Input

Choose a mode with `searchType` (`flights` is the default). Flight search example:

```json
{
  "searchType": "flights",
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "30 days",
  "adults": 1,
  "cabin": "economy",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

| Field | Notes |
|-------|-------|
| `origin` / `destination` | Airport **IATA codes** (e.g. `JFK`, `LAX`) |
| `departureDate` | `YYYY-MM-DD` or a relative value like `30 days` |
| `cabin` | `economy`, `premium`, `business`, or `first` |
| `adults` | Number of adult passengers |
| `airportCodes` | For the **nearbyAirports** mode, e.g. `["NYC"]` |
| `maxItems` | Cap rows (`0` = all). One search can return several hundred provider options |
| `proxyConfiguration` | **RESIDENTIAL proxy required** (default) — KAYAK's edge blocks datacenter IPs |

### Output

One clean row per flight option — export as JSON, CSV or Excel:

```json
{
  "searchType": "flight",
  "origin": "JFK", "destination": "LAX", "date": "2026-09-29", "cabin": "economy",
  "provider_name": "Priceline", "price": 179, "currency": "USD",
  "localized_price": "$179", "departure_time": "8:05 am", "arrival_time": "11:38 am",
  "is_best": true, "is_cheapest": false, "result_id": "…"
}
```

### Why this KAYAK scraper

- **No account, no cookies, no API key** — the session is bootstrapped automatically.
- **Full results, not a teaser** — it polls KAYAK's progressive metasearch until the ranking is
  stable, so you capture the complete option set.
- **Resilient** — residential-proxy default with automatic exit-IP rotation and retries on transient
  edge errors.

### Pricing

Pay-per-event, so you only pay for the data you pull:

- **$0.001 per flight option**
- $0.0005 per nearby-airport row
- $0.0001 per currency/country reference row

### FAQ

**Do I need a KAYAK account or API key?**
No. The actor mints its own anonymous session, so there's nothing to sign up for.

**Which airlines and agencies are covered?**
KAYAK is a metasearch engine — a single search compares hundreds of airlines and online travel
agencies (Expedia, Priceline, CheapOair and many more), and each provider option is returned as a row.

**Do I need a proxy?**
Yes — a **residential** proxy (the default). KAYAK's edge blocks datacenter IP ranges.

**Why can one search return hundreds of rows?**
Each itinerary can have several bookable provider prices, and each is a separate row. Use `maxItems`
to limit the output.

**Can I export to CSV or Excel?**
Yes — JSON, CSV, Excel, HTML, or straight from the Apify API and dataset.

### Disclaimer

This is an unofficial tool and is **not affiliated with, endorsed by, or sponsored by KAYAK**. It
returns read-only public metasearch data (no accounts, no bookings). All trademarks belong to their
respective owners; use the scraped data responsibly and in line with applicable terms and laws.

# Actor input Schema

## `searchType` (type: `string`):

What to scrape. The fields below are grouped by mode — fill in the group that matches your choice.

## `origin` (type: `string`):

FLIGHTS MODE. Origin airport IATA code, e.g. JFK.

## `destination` (type: `string`):

Destination airport IATA code, e.g. LAX.

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

Departure date. Pick a date or use a relative value like "30 days".

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

Number of adult passengers.

## `cabin` (type: `string`):

Cabin class for the flight search.

## `airportCodes` (type: `array`):

NEARBY AIRPORTS MODE. One or more city/airport codes to find nearby airports for, e.g. NYC.

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

Cap the number of rows returned (0 = all).

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

KAYAK's edge blocks datacenter IPs, so a RESIDENTIAL proxy is required. Apify Proxy (RESIDENTIAL) is selected by default.

## Actor input object example

```json
{
  "searchType": "flights",
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "30 days",
  "adults": 1,
  "cabin": "economy",
  "airportCodes": [
    "NYC"
  ],
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "origin": "JFK",
    "destination": "LAX",
    "departureDate": "30 days",
    "airportCodes": [
        "NYC"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/kayak-api-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 = {
    "origin": "JFK",
    "destination": "LAX",
    "departureDate": "30 days",
    "airportCodes": ["NYC"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/kayak-api-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 '{
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "30 days",
  "airportCodes": [
    "NYC"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call rl1987/kayak-api-scraper --silent --output-dataset

```

## MCP server setup

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