# Flight Price Scraper (`credible_sandal/flight-price-scraper`) Actor

This tool finds the lowest flight prices by scanning multiple travel sites at once. No need to open Google Flights, Skyscanner, or Kayak separately—it does all the comparisons for you.

- **URL**: https://apify.com/credible\_sandal/flight-price-scraper.md
- **Developed by:** [RK K](https://apify.com/credible_sandal) (community)
- **Categories:** E-commerce, Travel, Other
- **Stats:** 85 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$9.00 / 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/platform/actors/running/actors-in-store#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

## ✈️ Flight Price Scraper - Find the Best Flight Deals

> **Never overpay for flights again!** Automatically compare prices across **5 major travel websites** in one search: Google Flights, Skyscanner, Kayak, Kiwi.com, and Priceline.

### 🎯 What Does This Do?

**The Problem:** Finding cheap flights is exhausting. You have to open multiple tabs, search the same route on Google Flights, Skyscanner, Kayak, and others, then manually compare prices, times, and stops. It takes 30+ minutes and you're never sure if you found the best deal.

**The Solution:** This scraper does all that work for you in seconds. Just enter where you're going and when, and it automatically:

1. **Searches 5 major travel sites at once** - Google Flights, Skyscanner, Kayak, Kiwi.com, and Priceline

2. **Compares hundreds of flights** - Finds every available option for your route

3. **Ranks them intelligently** - Not just by price, but by overall value (considering time, stops, convenience)

4. **Shows you the best deals** with clear recommendations:
   - ✅ **Best Overall Deal** - Perfect balance of price and convenience
   - 💰 **Cheapest Option** - Absolute lowest price found
   - ⚡ **Fastest Flight** - Get there quicker
   - 🎯 **Non-Stop Best** - Best direct flight option
   - 💎 **Best Value** - Great price for quality

5. **Checks nearby dates** (optional) - Flying a day earlier/later can save $50-$200

**Result:** You get the best flight deal in 10 seconds instead of spending 30 minutes searching manually. No more wondering if you missed a better price on another site!

***

### 🚀 How to Use

#### Quick Start

**Just provide 3 things:**

1. Where you're flying **from**
2. Where you're flying **to**
3. When you want to **leave**

That's it! The scraper does the rest.

#### Example Search

```json
{
  "from": "Los Angeles",
  "to": "New York",
  "departureDate": "2025-12-15"
}
```

**What You Get:**

- Prices from 5 major travel websites
- Smart recommendations (best overall, cheapest, fastest, etc.)
- Complete flight details (times, airlines, stops, duration)
- Direct booking links to complete your purchase

***

### ✨ Key Features

#### 1. **Multi-Source Price Comparison**

Instead of checking each website one by one, this tool:

- ✅ Searches **Google Flights, Skyscanner, Kayak, Kiwi.com, and Priceline simultaneously**
- ✅ Compares **hundreds of flights** in seconds
- ✅ Shows you the **absolute best deals**

**Result:** Save 20-60 minutes of manual searching!

***

#### 2. **Flexible Date Search** 🗓️ NEW!

Not sure about your exact dates? Enable flexible dates to see prices for nearby days:

```json
{
  "from": "LAX",
  "to": "JFK",
  "departureDate": "2025-12-15",
  "flexibleDates": true,
  "dateFlexibility": 3
}
```

**What You Get:**

```
Dec 12 (Thu): $320 💰 CHEAPEST! (save $60)
Dec 13 (Fri): $340
Dec 14 (Sat): $350
Dec 15 (Sun): $380 ⭐ (your selected date)
Dec 16 (Mon): $365
Dec 17 (Tue): $330
Dec 18 (Wed): $345

💡 TIP: Flying 3 days earlier saves $60!
```

**Why This Matters:**

- ✈️ Flying a day earlier/later can save **$50-$200**
- 📅 See **7 dates at once** instead of searching each manually
- 🎯 Get a **clear recommendation** on the best date to fly

***

#### 3. **Smart Recommendations**

Not just a list of flights - you get **intelligent advice**:

- **Best Overall** - Top pick considering price, time, and convenience
- **Cheapest** - Lowest price (with notes on trade-offs)
- **Fastest** - Shortest travel time
- **Non-Stop Best** - Best direct flight option
- **Best Value** - Sweet spot between price and quality

**Example:**

```
🎯 BEST OVERALL: $299 - Delta Direct Flight
   ✓ Non-stop
   ✓ 11% below average price
   ✓ Convenient departure time (9am)

💰 CHEAPEST: $199 - Spirit Airlines
   ⚠️ 1 stop (adds 2h)
   ⚠️ Basic economy
   💡 Save $100 if you don't mind the stop
```

***

#### 4. **Price Insights**

Understand the market so you know if you're getting a good deal:

```
📊 PRICE ANALYSIS
Lowest:  $199
Average: $425
Highest: $899

Your best option: $299 (30% below average) ✅
```

***

#### 5. **No Duplicates**

Same flight appears on multiple sites? We show it **once** with the **cheapest price**.

**Example:**

- Skyscanner: Delta #123 for $299
- Google Flights: Delta #123 for $320
- **We show:** Delta #123 for $299 from Skyscanner ✅

***

### 📋 All Input Options

| Parameter | What It Does | Required? | Example |
|-----------|-------------|-----------|---------|
| **from** | Where you're flying from | ✅ Yes | `"LAX"` or `"Los Angeles"` |
| **to** | Where you're flying to | ✅ Yes | `"JFK"` or `"New York"` |
| **departureDate** | When you want to leave | ✅ Yes | `"2025-12-15"` |
| **returnDate** | When you want to come back | ❌ No | `"2025-12-22"` (leave empty for one-way) |
| **flexibleDates** | Search nearby dates? | ❌ No | `true` or `false` (default: false) |
| **dateFlexibility** | How many days ± to search | ❌ No | `3` (searches ±3 days = 7 total dates) |
| **passengers** | How many people flying | ❌ No | `1` (default) |
| **cabinClass** | Seat class | ❌ No | `"economy"`, `"business"`, etc. |
| **maxStops** | Maximum layovers | ❌ No | `-1` (any), `0` (non-stop), `1`, `2` |
| **maxPrice** | Price limit in USD | ❌ No | `500` |

***

### 💡 Real-World Examples

#### Example 1: Quick Weekend Trip

**Input:**

```json
{
  "from": "San Francisco",
  "to": "Las Vegas",
  "departureDate": "2025-12-20",
  "returnDate": "2025-12-22",
  "maxStops": 0
}
```

**Result:** Non-stop flights under 2 hours, sorted by price.

***

#### Example 2: Flexible Business Trip

**Input:**

```json
{
  "from": "NYC",
  "to": "Chicago",
  "departureDate": "2025-12-10",
  "flexibleDates": true,
  "dateFlexibility": 2,
  "cabinClass": "business"
}
```

**Result:** Business class options across 5 dates (Dec 8-12) with best value recommendation.

***

#### Example 3: Budget Family Vacation

**Input:**

```json
{
  "from": "LAX",
  "to": "Orlando",
  "departureDate": "2026-06-15",
  "returnDate": "2026-06-22",
  "passengers": 4,
  "maxPrice": 300
}
```

**Result:** Only shows flights under $300 per person, best for family of 4.

***

### 📊 What You'll Get Back

#### Your Results Include:

**1. Top Recommendations:**

- **Best Overall** - Our #1 pick (best balance of price, time, and convenience)
- **Cheapest Option** - Lowest price with any trade-offs explained
- **Fastest Flight** - Shortest travel time
- **Non-Stop Best** - Best direct flight
- **Best Value** - Sweet spot between price and quality

**2. Price Insights:**

- Lowest price found
- Average price across all flights
- Price distribution (budget vs. premium)
- How your top pick compares to the average

**3. All Flight Options:**

- Complete list of every flight found
- Sorted by overall score
- Full details: airline, times, stops, duration
- Direct booking links for each flight

**4. Flexible Date Results (if enabled):**

- Price for each nearby date
- Which day is cheapest
- How much you save by shifting dates
- Clear recommendation on best date to fly

#### Easy to Export:

- **Excel** - Open in Microsoft Excel or Google Sheets
- **CSV** - Import into any spreadsheet
- **JSON** - For developers or custom analysis

### 🚀 How to Run

#### Using Apify Platform

1. Go to [Apify Console](https://console.apify.com)
2. Find "Flight Price Scraper"
3. Click "Try for free"
4. Fill in your flight details:
   - **From:** Your departure city or airport
   - **To:** Your destination
   - **Departure Date:** When you want to fly
   - *(Optional)* Turn on "Flexible Dates" to see prices for nearby days
5. Click "Start" and wait 10-15 seconds
6. Download your results as Excel, CSV, or JSON

#### Price Monitoring (Optional)

Want to track prices over time?

- Set up automatic searches (daily/weekly)
- Get notified when prices drop
- Build a price history for your favorite routes

***

### 🎁 What Makes This Special?

#### vs. Manual Searching

- ⏱️ **10 seconds** vs **30+ minutes** checking each site
- 💯 **Guaranteed best price** vs might miss cheaper options
- 📊 **Price insights** vs no context
- 🎯 **Smart recommendations** vs raw data dump

#### vs. Other Tools

- ✅ **Free and open** - No hidden fees
- 🔍 **Multiple sources** - Not just one site
- 🗓️ **Flexible dates** - Built-in date comparison
- 📈 **Price insights** - Understand the market
- 🎯 **Smart ranking** - Not just sorted by price

***

# Actor input Schema

## `from` (type: `string`):

Origin airport code (e.g., LAX, JFK) or city name (e.g., Los Angeles, New York)

## `to` (type: `string`):

Destination airport code (e.g., JFK, LHR) or city name (e.g., New York, London)

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

Date of departure (YYYY-MM-DD format)

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

Return date for round-trip flights (YYYY-MM-DD format). Leave empty for one-way flights.

## `flexibleDates` (type: `boolean`):

Search nearby dates to find cheaper options

## `dateFlexibility` (type: `integer`):

Number of days before/after your preferred date to search (1-3 days recommended)

## `sources` (type: `array`):

Select which flight booking sites to search. Default: Google Flights only. Add Skyscanner/Priceline if you have residential proxy configured.

## `passengers` (type: `integer`):

Number of passengers (adults)

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

Preferred cabin class

## `maxStops` (type: `integer`):

Maximum number of stops (layovers). -1 = any, 0 = non-stop only, 1 = max 1 stop, 2 = max 2 stops

## `maxPrice` (type: `integer`):

Maximum price per person in USD (optional filter)

## `hotDealsOnly` (type: `boolean`):

When enabled, returns only the best-value flights (cheapest, good-value, and top-3 recommended). Ideal for price monitoring and automated pipelines where you only want actionable results.

## `rankingPreference` (type: `string`):

How to prioritize flights when ranking results. Balanced gives the best overall value; other presets tune the scoring weights toward price, speed, or non-stop preference.

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

Proxy settings for Priceline & Skyscanner (both block datacenter IPs). Select RESIDENTIAL proxy group for these sources to work. Google Flights, Kayak, and Kiwi work without proxy.

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

Type of trip to search. Use 'Multi-City' for trips with 2–4 legs in different directions. Each leg is searched independently — legs are NOT protected connections and must be booked separately.

## `legs` (type: `array`):

Required when Trip Type is Multi-City. Add 2–4 legs in chronological order. Each leg needs 'from' (origin), 'to' (destination), and 'date' (YYYY-MM-DD). Example: \[{"from":"LAX","to":"JFK","date":"2026-11-23"},{"from":"JFK","to":"LHR","date":"2026-11-28"}]. WARNING: Multi-city searches take significantly longer (roughly N legs × single search time). If Skyscanner or Priceline are enabled, proxy usage also multiplies by N.

## `checkedBags` (type: `integer`):

Number of checked bags per person (0, 1, or 2). When set, each flight result includes estimated baggage fees and a true total cost (base fare + bags). Fees are estimates based on standard economy — actual fees vary by fare type, route, and loyalty status.

## `carryOnBag` (type: `boolean`):

Whether a carry-on bag (overhead bin) is needed. Most full-service carriers include this free; budget carriers (Spirit, Frontier, Ryanair) charge $10–$45. Enable alongside Checked Bags for a full cost estimate.

## `departureTimeFrom` (type: `string`):

Earliest allowed departure time in HH:MM 24-hour format. Flights departing before this time are excluded. Example: '06:00' to avoid red-eyes.

## `departureTimeTo` (type: `string`):

Latest allowed departure time in HH:MM 24-hour format. Flights departing after this time are excluded. Example: '20:00' to avoid late-night departures.

## `arrivalTimeBefore` (type: `string`):

Latest allowed arrival time at destination in HH:MM 24-hour format. Flights arriving after this time are excluded. Example: '22:00' for a business trip.

## `preferredAirlines` (type: `array`):

Prioritize flights from these airlines. Results are filtered to your preferred airlines when available — if none are found, all airlines are shown instead with a notice. Accepts IATA codes (e.g. 'AA', 'DL') or full names (e.g. 'American Airlines'). Case-insensitive. Leave empty to allow all airlines.

## `excludedAirlines` (type: `array`):

Never show flights from these airlines. Accepts IATA codes or full names. Common exclusions: 'NK' (Spirit), 'F9' (Frontier), 'G4' (Allegiant).

## `minLayoverMinutes` (type: `integer`):

Exclude flights where any layover is shorter than this many minutes. Useful to avoid tight connections. Note: only applied to Kiwi.com results (only source with per-layover timing).

## `maxLayoverMinutes` (type: `integer`):

Exclude flights where any layover is longer than this many minutes. Useful to avoid overnight layovers. Note: only applied to Kiwi.com results.

## `outputCurrency` (type: `string`):

Currency for all output prices (ISO 4217 code, e.g. 'USD', 'EUR', 'GBP', 'JPY', 'CAD'). Prices are fetched in USD and converted using live exchange rates. The original USD price is preserved in the result. If conversion is unavailable, USD prices are returned. Default: USD.

## Actor input object example

```json
{
  "from": "LAX",
  "to": "JFK",
  "departureDate": "2026-11-23",
  "returnDate": "2026-11-26",
  "flexibleDates": false,
  "dateFlexibility": 3,
  "sources": [
    "google_flights"
  ],
  "passengers": 1,
  "cabinClass": "economy",
  "maxStops": -1,
  "maxPrice": 1000,
  "hotDealsOnly": false,
  "rankingPreference": "balanced",
  "tripType": "oneway",
  "legs": [
    {
      "from": "LAX",
      "to": "JFK",
      "date": "2026-11-23"
    },
    {
      "from": "JFK",
      "to": "LHR",
      "date": "2026-11-28"
    },
    {
      "from": "LHR",
      "to": "LAX",
      "date": "2026-12-05"
    }
  ],
  "checkedBags": 1,
  "carryOnBag": false,
  "departureTimeFrom": "06:00",
  "departureTimeTo": "20:00",
  "arrivalTimeBefore": "22:00",
  "preferredAirlines": [
    "AA",
    "DL",
    "United Airlines"
  ],
  "excludedAirlines": [
    "NK",
    "F9"
  ],
  "minLayoverMinutes": 60,
  "maxLayoverMinutes": 240,
  "outputCurrency": "EUR"
}
```

# 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 = {
    "from": "LAX",
    "to": "JFK",
    "departureDate": "2026-11-23",
    "returnDate": "2026-11-26",
    "sources": [
        "google_flights"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("credible_sandal/flight-price-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 = {
    "from": "LAX",
    "to": "JFK",
    "departureDate": "2026-11-23",
    "returnDate": "2026-11-26",
    "sources": ["google_flights"],
}

# Run the Actor and wait for it to finish
run = client.actor("credible_sandal/flight-price-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 '{
  "from": "LAX",
  "to": "JFK",
  "departureDate": "2026-11-23",
  "returnDate": "2026-11-26",
  "sources": [
    "google_flights"
  ]
}' |
apify call credible_sandal/flight-price-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/I5erwtYfszGJZQkaQ/builds/vRykhDJ3afz7yJYcA/openapi.json
