# Kayak Flights, Hotels & Deals Scraper (`crawlerbros/kayak-flight-hotel-scraper`) Actor

Scrape flight deals, hotel prices, and explore cheap destinations from Kayak. Search flights between cities, compare prices from hundreds of airlines, and find cheap travel deals

- **URL**: https://apify.com/crawlerbros/kayak-flight-hotel-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 33.3% runs succeeded, 7 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Flights, Hotels & Deals Scraper

Extract flight deals, explore cheap destinations, and compare travel prices from [Kayak](https://www.kayak.com) — one of the world's leading travel search engines. Search flights between cities, compare prices from hundreds of airlines, and discover cheap travel deals from any airport.

### What data does this scraper extract?

| Field | Description |
|-------|-------------|
| `flightId` | Unique flight result identifier |
| `origin` | Origin airport IATA code (e.g., NYC) |
| `destination` | Destination airport IATA code (e.g., LON) |
| `originCity` | Origin city name |
| `destinationCity` | Destination city name |
| `departDate` | Departure date (YYYY-MM-DD) |
| `returnDate` | Return date for round-trips (YYYY-MM-DD) |
| `price` | Best available price (per person) |
| `currency` | Price currency (e.g., USD) |
| `airline` | Primary airline name |
| `airlines` | All airlines involved (for multi-leg flights) |
| `stops` | Number of stops (0 = direct) |
| `duration` | Outbound flight duration (e.g., "7h 30m") |
| `departTime` | Departure datetime (ISO 8601) |
| `arrivalTime` | Arrival datetime (ISO 8601) |
| `cabinClass` | Cabin class (economy/business/etc.) |
| `tripType` | one-way or round-trip |
| `deepLink` | Direct booking URL on Kayak |
| `recordType` | Always "kayakFlight" |
| `scrapedAt` | Timestamp of scraping |

### Input Parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `mode` | Select | Scraping mode: searchFlights, searchHotels, exploreDeals, byUrls | `exploreDeals` |
| `origin` | Text | Origin airport IATA code or city (e.g., "NYC", "JFK", "New York") | `NYC` |
| `destination` | Text | Destination IATA code or city (optional for exploreDeals) | — |
| `departDate` | Text | Departure date YYYY-MM-DD | 30 days from now |
| `returnDate` | Text | Return date YYYY-MM-DD | 37 days from now |
| `tripType` | Select | one-way or round-trip | `round-trip` |
| `cabinClass` | Select | economy, premium-economy, business, first | `economy` |
| `adults` | Integer | Number of passengers (1–9) | `1` |
| `maxBudget` | Integer | Max price filter in USD (for exploreDeals) | — |
| `sortBy` | Select | Sort: price, duration, departure, arrival | `price` |
| `startUrls` | List | Kayak search URLs for byUrls mode | — |
| `maxItems` | Integer | Maximum results (1–500) | `50` |

### Modes

#### `exploreDeals` (default)
Explore cheap flights from any origin city. Discover hundreds of destinations sorted by price. Perfect for finding travel inspiration and the cheapest places to fly.

#### `searchFlights`
Search for specific flights between two cities. Returns a ranked list of flight options with prices from all airlines, including number of stops, duration, and direct booking links.

#### `searchHotels`
Search for hotels at a destination. Returns available hotel options with pricing data intercepted from Kayak's internal hotel search API.

#### `byUrls`
Scrape specific Kayak search result URLs. Provide pre-built Kayak URLs and extract flight data from those searches.

### Example Input

```json
{
  "mode": "searchFlights",
  "origin": "NYC",
  "destination": "LON",
  "departDate": "2026-08-01",
  "returnDate": "2026-08-15",
  "tripType": "round-trip",
  "cabinClass": "economy",
  "adults": 1,
  "sortBy": "price",
  "maxItems": 50
}
````

### Example Output (Flight)

```json
{
  "flightId": "d83f4b084af600d06a3f8872a5c2351d",
  "origin": "NYC",
  "destination": "LON",
  "originCity": "New York",
  "destinationCity": "London",
  "departDate": "2026-08-01",
  "returnDate": "2026-08-15",
  "price": 543.00,
  "currency": "USD",
  "airline": "British Airways",
  "airlines": ["British Airways"],
  "stops": 0,
  "duration": "6h 55m",
  "departTime": "2026-08-01T19:00:00",
  "arrivalTime": "2026-08-02T07:55:00",
  "cabinClass": "economy",
  "tripType": "round-trip",
  "deepLink": "https://www.kayak.com/book/flight?code=...",
  "recordType": "kayakFlight",
  "scrapedAt": "2026-05-15T10:30:00+00:00"
}
```

### Example Output (Explore Deal)

```json
{
  "flightId": "NYC-CDG",
  "origin": "NYC",
  "destination": "CDG",
  "originCity": "NYC",
  "destinationCity": "Paris",
  "price": 450.00,
  "currency": "USD",
  "country": "France",
  "latitude": 48.8566,
  "longitude": 2.3522,
  "tripType": "round-trip",
  "cabinClass": "economy",
  "recordType": "kayakFlight",
  "scrapedAt": "2026-05-15T10:30:00+00:00"
}
```

### Frequently Asked Questions

**Q: Why does the scraper need to wait 10–15 seconds per page?**
A: Kayak loads flight results asynchronously via a polling API. The scraper intercepts this API call, which typically fires within 10–15 seconds after the page loads. This is normal behavior.

**Q: What is the IATA code format?**
A: IATA codes are 3-letter airport codes (e.g., JFK = John F. Kennedy, LAX = Los Angeles, LHR = London Heathrow). City codes (NYC = New York all airports, LON = London all airports) are also supported.

**Q: How current are the prices?**
A: Prices are fetched in real-time from Kayak's search engine. They reflect the best available fare at the time of scraping and may change within minutes.

**Q: Can I search one-way flights?**
A: Yes. Set `tripType` to `one-way` and provide only `departDate` (no `returnDate` needed).

**Q: What does the `stops` field mean?**
A: `0` = direct flight (nonstop), `1` = one connection, `2` = two connections, etc.

**Q: Can I search flights for multiple passengers?**
A: Yes. Set the `adults` parameter to the number of passengers (1–9). Prices in the output will reflect the per-person fare.

**Q: What is exploreDeals mode best for?**
A: Travel inspiration and finding the cheapest destinations to fly from your city. Set a `maxBudget` to filter destinations within your price range.

**Q: Does this scraper work without a proxy?**
A: For datacenter IPs, Kayak may limit results or require more time to load. A residential proxy is recommended for production use to ensure consistent results.

### Legal Notice

This scraper is intended for legitimate travel research, price monitoring, and data analysis. Please comply with Kayak's Terms of Service when using this tool.

# Actor input Schema

## `mode` (type: `string`):

Scraping mode: search flights, search hotels, explore cheap deals, or scrape specific URLs.

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

Origin airport IATA code or city (e.g. 'NYC', 'JFK', 'New York').

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

Destination airport IATA code or city (e.g. 'LON', 'LHR', 'London'). Optional for exploreDeals mode.

## `departDate` (type: `string`):

Departure date in YYYY-MM-DD format.

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

Return date for round-trip flights in YYYY-MM-DD format.

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

One-way or round-trip flight.

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

Preferred cabin class.

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

Number of adult passengers.

## `maxBudget` (type: `integer`):

Maximum price per person in USD (for exploreDeals mode).

## `sortBy` (type: `string`):

How to sort flight results.

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

List of Kayak search result URLs to scrape (used in byUrls mode).

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

Maximum number of results to return.

## Actor input object example

```json
{
  "mode": "searchFlights",
  "origin": "NYC",
  "destination": "LON",
  "tripType": "round-trip",
  "cabinClass": "economy",
  "adults": 1,
  "sortBy": "price",
  "maxItems": 50
}
```

# 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 = {
    "mode": "searchFlights",
    "origin": "NYC",
    "destination": "LON",
    "adults": 1,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/kayak-flight-hotel-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 = {
    "mode": "searchFlights",
    "origin": "NYC",
    "destination": "LON",
    "adults": 1,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/kayak-flight-hotel-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "searchFlights",
  "origin": "NYC",
  "destination": "LON",
  "adults": 1,
  "maxItems": 50
}' |
apify call crawlerbros/kayak-flight-hotel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/kayak-flight-hotel-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Kayak Flights, Hotels & Deals Scraper",
        "description": "Scrape flight deals, hotel prices, and explore cheap destinations from Kayak. Search flights between cities, compare prices from hundreds of airlines, and find cheap travel deals",
        "version": "0.1",
        "x-build-id": "lT6r9SYvNZopnlUxF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~kayak-flight-hotel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-kayak-flight-hotel-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~kayak-flight-hotel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-kayak-flight-hotel-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~kayak-flight-hotel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-kayak-flight-hotel-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "searchFlights",
                            "searchHotels",
                            "exploreDeals",
                            "byUrls"
                        ],
                        "type": "string",
                        "description": "Scraping mode: search flights, search hotels, explore cheap deals, or scrape specific URLs.",
                        "default": "searchFlights"
                    },
                    "origin": {
                        "title": "Origin",
                        "type": "string",
                        "description": "Origin airport IATA code or city (e.g. 'NYC', 'JFK', 'New York')."
                    },
                    "destination": {
                        "title": "Destination",
                        "type": "string",
                        "description": "Destination airport IATA code or city (e.g. 'LON', 'LHR', 'London'). Optional for exploreDeals mode."
                    },
                    "departDate": {
                        "title": "Departure Date",
                        "type": "string",
                        "description": "Departure date in YYYY-MM-DD format."
                    },
                    "returnDate": {
                        "title": "Return Date",
                        "type": "string",
                        "description": "Return date for round-trip flights in YYYY-MM-DD format."
                    },
                    "tripType": {
                        "title": "Trip Type",
                        "enum": [
                            "one-way",
                            "round-trip"
                        ],
                        "type": "string",
                        "description": "One-way or round-trip flight.",
                        "default": "round-trip"
                    },
                    "cabinClass": {
                        "title": "Cabin Class",
                        "enum": [
                            "economy",
                            "premium-economy",
                            "business",
                            "first"
                        ],
                        "type": "string",
                        "description": "Preferred cabin class.",
                        "default": "economy"
                    },
                    "adults": {
                        "title": "Number of Adults",
                        "minimum": 1,
                        "maximum": 9,
                        "type": "integer",
                        "description": "Number of adult passengers.",
                        "default": 1
                    },
                    "maxBudget": {
                        "title": "Max Budget (USD)",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum price per person in USD (for exploreDeals mode)."
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "price",
                            "duration",
                            "departure",
                            "arrival"
                        ],
                        "type": "string",
                        "description": "How to sort flight results.",
                        "default": "price"
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of Kayak search result URLs to scrape (used in byUrls mode).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of results to return.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
