# Flight Price Monitor — Fare Drop Alerts for Any Route (`xtracto/flight-price-monitor`) Actor

Watch flight routes and get alerted when fares drop. Each scheduled run checks a year of daily lowest fares per route and reports cheapest-fare drops, target-price hits and the departure dates that got cheaper, with booking links.

- **URL**: https://apify.com/xtracto/flight-price-monitor.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Travel, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.33 / 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/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

## Flight Price Monitor — Fare Drop Alerts for Any Route

Watch flight routes and get told when fares drop. Each run checks the lowest fare for every departure day of the coming year on each route (Skyscanner's price calendar), compares it with the last run, and reports cheapest-fare drops, target-price hits and the individual dates that got cheaper, each with a booking link.

### Why use this actor

- **A year of fares per route in one check**: every departure day's lowest fare, not a single date.
- **Alerts that matter**: `cheapest_dropped`, `cheapest_rose`, `below_target` (fires once when the fare crosses under your price, not every run) and `dates_dropped` for days that fell by your threshold.
- **Your travel window**: watch only the dates you could actually fly.
- **Booking links** for the cheapest day and for every dropped date.
- **Pay for news only**: with *Only report changes* a scheduled run with no movement outputs nothing.
- No account, no login, no API key.

### How it works

1. Add routes as airport pairs (`LHR-JFK`), optionally a travel window and a target price.
2. Schedule the actor, e.g. every morning.
3. Each run reads the daily lowest fares for each route and compares them with the previous run.
4. Routes with news come out as rows. Connect a webhook, Slack or email integration for alerts.

No scraping setup and no database to maintain; the fare history is kept for you between runs.

### Input

```json
{
  "routes": ["LHR-JFK", "LHR-BCN"],
  "travelDateFrom": "2026-10-29",
  "travelDateTo": "2026-12-28",
  "targetPrice": 30,
  "minDropPercent": 5,
  "onlyReportChanges": false,
  "market": "UK",
  "locale": "en-GB",
  "currency": "GBP",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

| Field | Type | Description |
|---|---|---|
| `routes` | array | `ORIGIN-DESTINATION` with 3-letter **airport** codes (LHR, JFK, CGK). City codes like LON or NYC are rejected with a clear message |
| `travelDateFrom`, `travelDateTo` | string | Departure-date window to watch (YYYY-MM-DD). Empty = the whole year ahead |
| `targetPrice` | integer | Alert when the cheapest fare in the window reaches this price or lower |
| `minDropPercent` | integer | A single date counts as dropped when its fare fell by at least this much (default 5) |
| `onlyReportChanges` | boolean | Output only routes with an event (plus first-run baselines) |
| `market`, `locale`, `currency` | string | Where fares are quoted for, and in which currency. A different currency starts a separate history |
| `proxyConfiguration` | object | Residential proxy support (recommended) |

### Output

Real row from a run on 2026-10-22. The previous fares were edited to be 20% higher to demonstrate a drop; every current value is live.

```json
{
  "route": "LHR-BCN",
  "origin": "LHR",
  "destination": "BCN",
  "market": "UK",
  "currency": "GBP",
  "travelDateFrom": "2026-10-29",
  "travelDateTo": "2026-12-28",
  "datesPriced": 362,
  "targetPrice": 30.0,
  "firstRun": false,
  "events": ["cheapest_dropped", "below_target", "dates_dropped"],
  "changed": true,
  "cheapestPrice": 26.0,
  "cheapestDate": "2026-11-28",
  "cheapestDeeplink": "https://www.skyscanner.net/transport/flights/lhr/bcn/261128/?adults=1&cabinclass=economy&currency=GBP&market=UK",
  "previousCheapestPrice": 31.2,
  "previousCheapestDate": "2026-11-28",
  "cheapestChangePercent": -16.67,
  "isBelowTarget": true,
  "datesDropped": [
    { "date": "2026-11-25", "from": 36.88, "to": 30.73, "changePercent": -16.68, "deeplink": "https://www.skyscanner.net/transport/flights/lhr/bcn/261125/?adults=1&cabinclass=economy&currency=GBP&market=UK" },
    "… 14 more (up to 15 listed)"
  ],
  "datesDroppedCount": 61,
  "datesRoseCount": 0
}
```

| Field | Type | Description |
|---|---|---|
| `events` | array | `cheapest_dropped`, `cheapest_rose`, `below_target`, `dates_dropped`. Empty = unchanged |
| `cheapestPrice`, `cheapestDate`, `cheapestDeeplink` | number, string, string | Lowest fare in your window, its date and a booking link |
| `previousCheapestPrice`, `previousCheapestDate`, `cheapestChangePercent` | | The same from the previous run |
| `isBelowTarget` | boolean | The cheapest fare is at or under `targetPrice` |
| `datesDropped` | array | Up to 15 dates that dropped most, with old/new fare and link |
| `datesDroppedCount`, `datesRoseCount` | integer | How many dates in the window got cheaper / dearer |
| `datesPriced` | integer | Days with a published fare on this route |
| `firstRun` | boolean | This run stored the first baseline |

### Notes and limits

- **First run = baseline.** Alerts start from the second run, so schedule the actor right after setting it up.
- Fares are the lowest **indicative** fare per departure day for one adult in economy, one way, as shown in the price calendar. Always confirm on the booking page.
- A route that cannot be priced on a run is listed in the status message and the run's `FAILURES` record, and its history is kept unchanged. A run where no route could be priced is marked failed.

### Related actors

| Actor | Use it for |
|---|---|
| Skyscanner Scraper | One-off fare calendars and "anywhere" destination inspiration |
| Price & Stock Monitor | Price drop and restock alerts for products |

# Actor input Schema

## `routes` (type: `array`):

One route per line as ORIGIN-DESTINATION with 3-letter AIRPORT codes, e.g. LHR-JFK or CGK-SIN. City codes such as LON or NYC do not work.

## `travelDateFrom` (type: `string`):

Only watch departure dates on or after this day (YYYY-MM-DD). Empty = from today.

## `travelDateTo` (type: `string`):

Only watch departure dates up to this day (YYYY-MM-DD). Empty = the whole year ahead.

## `targetPrice` (type: `integer`):

Alert (below_target) when the cheapest fare in the window drops to this price or lower, in the chosen currency. Leave empty for no target.

## `minDropPercent` (type: `integer`):

A single departure date counts as dropped when its fare fell by at least this much.

## `onlyReportChanges` (type: `boolean`):

Output only routes with an event (plus first-run baselines). Recommended for scheduled runs.

## `market` (type: `string`):

2-letter market the fares are quoted for, e.g. UK, US, ID, DE.

## `locale` (type: `string`):

e.g. en-GB, en-US.

## `currency` (type: `string`):

e.g. GBP, USD, EUR, IDR. Changing it starts a new history for the route.

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

Residential proxy is recommended on the platform; the fare service limits cloud servers.

## Actor input object example

```json
{
  "routes": [
    "LHR-JFK",
    "LHR-BCN"
  ],
  "minDropPercent": 5,
  "onlyReportChanges": false,
  "market": "UK",
  "locale": "en-GB",
  "currency": "GBP",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per route checked (or per changed route with onlyReportChanges), stored in the run's default dataset.

# 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 = {
    "routes": [
        "LHR-JFK",
        "LHR-BCN"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/flight-price-monitor").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 = {
    "routes": [
        "LHR-JFK",
        "LHR-BCN",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/flight-price-monitor").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 '{
  "routes": [
    "LHR-JFK",
    "LHR-BCN"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call xtracto/flight-price-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/flight-price-monitor"
        }
    }
}
```

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/mUkvzz6PsDSr20Hc3/builds/1KaGjeZEg75Ffd5CT/openapi.json
