# Kayak Flight Scraper (`moving_beacon-owner1/kayak-flight-scraper`) Actor

Scrapes live Kayak flight prices, returning the cheapest round-trip fare per destination with airline, travel dates, stops, duration, and booking URL.

- **URL**: https://apify.com/moving\_beacon-owner1/kayak-flight-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 1,000 results

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?

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 Scraper

Scrapes live Kayak flight prices . For a given origin airport it
returns one record per destination with the cheapest round-trip fare Kayak currently
knows about, the airline, the exact departure/return dates behind that price, stop count,
flight duration and a ready-to-open Kayak booking URL. Results are sorted cheapest first.

### Input

| Field | Default | Description |
|---|---|---|
| `origin_airport` | `JFK` | IATA code of the departure airport/city (`JFK`, `LHR`, `SFO`, `LON`). |
| `destination_airports` | `""` | Optional comma-separated IATA filter, e.g. `LAX,BCN,NRT`. Empty = all destinations. |
| `depart_from` | `""` | Earliest departure date, `YYYY-MM-DD`. Empty = cheapest dates in the next 12 months. |
| `return_by` | `""` | Latest return date, `YYYY-MM-DD`. |
| `max_budget` | `0` | Round-trip price cap in the market currency (USD on kayak.com). `0` disables it. |
| `limit` | `100` | Max routes returned, cheapest first (1–1000). |

### Output

```json
{
    "origin_airport": "SFO",
    "origin_city": "San Francisco",
    "destination_airport": "LAX",
    "destination_city": "Los Angeles",
    "destination_country": "United States",
    "destination_country_code": "US",
    "price": 46.0,
    "price_usd": 46.0,
    "airline": "Frontier",
    "airline_code": "F9",
    "depart_date": "2026-09-17",
    "return_date": "2026-09-21",
    "max_duration_minutes": 103,
    "max_stops": 0,
    "destination_latitude": 33.9429372288584,
    "destination_longitude": -118.41034329101564,
    "search_url": "https://www.kayak.com/flights/SFO-LAX/2026-09-17/2026-09-21/",
    "raw": { "...full Kayak destination object...": "" }
}
```

Unofficial endpoint — scraping it may conflict with Kayak's Terms of Service. Keep
request volume low; prices are indicative and change constantly.

# Actor input Schema

## `origin_airport` (type: `string`):

Three-letter IATA code of the departure airport or city, e.g. JFK, LHR, SFO, LON. Kayak prices every destination reachable from this airport.

## `destination_airports` (type: `string`):

Optional filter, e.g. LAX,BCN,NRT. Only these destination airports are kept. Leave empty to return every destination Kayak prices from the origin.

## `depart_from` (type: `string`):

Lower bound of the travel window, e.g. 2027-03-01. Leave empty to let Kayak pick the cheapest dates in the next 12 months.

## `return_by` (type: `string`):

Upper bound of the travel window, e.g. 2027-03-12. Leave empty for no upper bound.

## `max_budget` (type: `integer`):

Only return routes at or below this round-trip price, in the origin market's currency (USD for kayak.com). Use 0 to disable the budget filter.

## `limit` (type: `integer`):

Maximum number of routes to return, cheapest first.

## Actor input object example

```json
{
  "origin_airport": "JFK",
  "destination_airports": "",
  "depart_from": "",
  "return_by": "",
  "max_budget": 0,
  "limit": 100
}
```

# 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_airport": "JFK",
    "destination_airports": "",
    "depart_from": "",
    "return_by": "",
    "max_budget": 0,
    "limit": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/kayak-flight-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_airport": "JFK",
    "destination_airports": "",
    "depart_from": "",
    "return_by": "",
    "max_budget": 0,
    "limit": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/kayak-flight-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_airport": "JFK",
  "destination_airports": "",
  "depart_from": "",
  "return_by": "",
  "max_budget": 0,
  "limit": 100
}' |
apify call moving_beacon-owner1/kayak-flight-scraper --silent --output-dataset

```

## MCP server setup

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