# Skyscanner Flight Price Scraper (`automation-lab/skyscanner-flight-price-scraper`) Actor

Scrape Skyscanner flight prices: every booking site's price for each itinerary, legs, flight numbers, stops and booking links, a route summary per search, and a cheapest-price-per-day calendar. One-way, return and multi-city.

- **URL**: https://apify.com/automation-lab/skyscanner-flight-price-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.48 / 1,000 itineraries

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## Skyscanner Flight Price Scraper

Get flight prices from Skyscanner as clean JSON: every itinerary for a route and date, with **every airline's and travel agent's price**, booking links, legs, flight numbers, layovers, duration, stops, fare policy and CO2. A second mode returns a **price calendar**, the cheapest fare for each day of the next ~11 months, so you can find the cheapest day to fly or track fares on a schedule.

One-way, return and multi-city trips. Any Skyscanner market and currency. No browser, no login, no API key.

### What does Skyscanner Flight Price Scraper do?

Give it a route (`LON` → `NYC`), a date, or a Skyscanner results URL. It runs the same search the Skyscanner website runs and waits until all booking sites have answered. For each search it saves one **route summary** row (cheapest price and booking site, fastest option, cheapest direct and one-stop fares, cheapest price per airline, number of itineraries) and then one row per itinerary:

- the cheapest price and the site selling it;
- every other booking site's price, with a booking link, the fare brand (e.g. `LIGHT`, `STANDARD`) and the agent's rating;
- each leg with airports, local departure and arrival times, duration, stops, layovers and flight numbers;
- each flight segment with marketing and operating airline;
- fare policy (changeable, refundable), self-transfer flag, CO2 estimate;
- whether it is the cheapest or the fastest itinerary of the search.

In **Price calendar** mode it saves one row per day with the lowest one-way price Skyscanner shows for the route, and a low / medium / high price level.

### Who is Skyscanner Flight Price Scraper for?

- **Fare trackers and price-alert apps**: schedule a daily run per route and store the price history of each `itineraryId`.
- **Travel agencies and OTAs**: compare your own prices with every agent listed on Skyscanner for the same flights.
- **Airline revenue and pricing analysts**: see competitor fares, carriers and stop patterns on a route.
- **Travel content and deal sites**: find the cheapest days to fly a route each month.
- **Corporate travel teams**: benchmark negotiated fares against public prices.
- **Researchers and data journalists**: study fare changes, emissions or route competition over time.

### Why use this Skyscanner scraper?

- **All booking sites, not just the cheapest**: each itinerary lists every agent's price and booking link (turn this off with one switch to keep rows small).
- **Two jobs in one Actor**: itinerary search and a cheapest-per-day price calendar.
- **Multi-city and URL input**: up to 6 legs per trip, or paste any Skyscanner results URL.
- **Route summary per search**: the cheapest, fastest, direct and per-airline prices in one row, ideal for daily fare tracking. Set the itinerary limit to 0 to get only summaries.
- **Ready for schedules**: leave the date empty and every run searches 30 days ahead; add many routes in one run.
- **Honest status**: the run says how many results it found and why it stopped. You are never charged for empty searches.
- **Pay per result**: no monthly rental.

### What data can you extract from Skyscanner?

| Field | Example | Notes |
|---|---|---|
| `price` | `282.43` | Total for all travellers, in `currency` |
| `cheapestAgent` | `LEVEL` | Airline or agent with the lowest price |
| `agentCount` | `17` | How many sites sell the itinerary |
| `priceOptions[]` | agent, price, fareBrand, bookingUrl, rating | Cheapest first |
| `legs[]` | origin, destination, departure, arrival, durationMinutes, stopCount | One per direction or leg |
| `legs[].flightNumbers` | `["LL5403", "LL2627"]` | Marketing airline code + number |
| `legs[].layovers[]` | `BCN`, `160` minutes, `changeOfAirport` | Between consecutive flights |
| `legs[].segments[]` | marketing and operating airline, times | One per flight |
| `totalDurationMinutes`, `maxStops` | `840`, `1` | Across all legs |
| `isCheapest`, `isFastest` | `true` / `false` | Within the whole search |
| `farePolicy` | `isChangeAllowed`, `isCancellationAllowed` | As shown by Skyscanner |
| `isSelfTransfer` | `false` | Separate tickets, re-check bags |
| `emissionsKg`, `emissionsLevel` | `525.7`, `higher` | Per passenger |
| `baggageHints` | fare attributes | Only when Skyscanner provides them |
| `bookingUrl`, `searchUrl` | Skyscanner links | Booking redirect and results page |
| `cheapestPrice`, `cheapestAgent` | `328`, `Kiwi.com` | Route summary rows |
| `cheapestDirectPrice`, `cheapestOneStopPrice` | `441.57`, `404` | Route summary rows; null when none |
| `fastestDurationMinutes`, `fastestPrice` | `470`, `486.68` | Route summary rows |
| `cheapestByAirline[]` | `{ "airline": "TAP Air Portugal", "code": "TP", "price": 328 }` | Route summary rows |
| `itineraryCount`, `bookingSiteCount` | `586`, `72` | Route summary rows |
| `date`, `price`, `priceLevel` | `2027-01-12`, `126.33`, `low` | Price calendar rows |

### How much does it cost to scrape Skyscanner flight prices?

This Actor uses pay-per-event pricing. Every flight search costs about the same to run however many itineraries it returns, so each search saves one route summary row at a fixed price, and itineraries are cheap on top:

| Event | Free and Starter plans | Scale plan | Business plan |
|---|---|---|---|
| Run started (once per run) | $0.005 | $0.005 | $0.005 |
| Route summary (one per flight search with results) | $0.012 | $0.0108 | $0.0096 |
| Itinerary saved | $0.0006 | $0.00054 | $0.00048 |
| Price calendar day saved | $0.0005 | $0.00045 | $0.0004 |

Examples on the Starter plan:

- 1 route, summary + 50 itineraries: about **$0.047**
- 1 route, summary + all ~600 itineraries: about **$0.38**
- 10 routes × 100 itineraries in one run: about **$0.73**
- Daily fare tracking of 20 routes, summaries only (`maxItinerariesPerSearch: 0`): about **$0.25** per run
- Price calendar for 1 route (≈330 days): about **$0.17**; one month only (31 days): about **$0.02**

A search that finds nothing is not charged, and a run that fails on bad input costs nothing. Set **Max charge per run** in Apify to cap spending.

### How to scrape Skyscanner flight prices

1. Open the Actor and keep **Flight search** selected.
2. Enter **From** and **To**: IATA airport codes (`LHR`, `JFK`), city codes (`LON`, `NYC`) or city names.
3. Pick a **Departure date** (empty = 30 days from today) and, for a round trip, a **Return date**.
4. Optionally set cabin, travellers, market and currency.
5. Click **Start**. A search usually takes 20–40 seconds.
6. Open the **Route summaries** or **Itineraries** table or export JSON, CSV or Excel.

For the cheapest day to fly, switch **What to get** to **Price calendar** and optionally set **Calendar month**.

### Input parameters

| Parameter | What it does |
|---|---|
| `mode` | `search` (itineraries) or `priceCalendar` (cheapest price per day). |
| `origin`, `destination` | Airport code, city code or city name. |
| `departureDate`, `returnDate` | `YYYY-MM-DD`. Empty departure = today + 30 days. Empty return = one-way. |
| `multiCityLegs` | 2–6 legs `{origin, destination, date}` searched as one trip. |
| `additionalRoutes` | More routes `{origin, destination, departureDate, returnDate}` in the same run. |
| `startUrls` | Skyscanner results URLs; route, dates, adults, children and cabin come from the URL. |
| `calendarMonth` | Price calendar only: keep days of one month, e.g. `2027-03`. |
| `cabinClass` | `economy`, `premium_economy`, `business`, `first`. |
| `adults`, `childrenAges` | 1–8 adults; one age per child (under 2 = infant). Max 9 travellers. |
| `market`, `currency`, `locale` | e.g. `US`/`USD`/`en-US` or `UK`/`GBP`/`en-GB`. The market decides which booking sites appear. |
| `sortBy` | `best` (Skyscanner ranking), `cheapest` or `fastest`. Applied before the limit. |
| `maxStops` | 0 = direct only. Applies to every leg. |
| `maxItinerariesPerSearch` | Itinerary rows per search (default 50, max 1,000). 0 = route summaries only. |
| `includeAllPrices` | Off = keep only the cheapest booking site per itinerary. |

Example input, a family return trip:

```json
{
    "origin": "NYC",
    "destination": "LAX",
    "departureDate": "2027-01-10",
    "returnDate": "2027-01-17",
    "adults": 2,
    "childrenAges": [7],
    "sortBy": "cheapest",
    "maxItinerariesPerSearch": 100
}
```

Multi-city in business class:

```json
{
    "multiCityLegs": [
        { "origin": "BER", "destination": "PAR", "date": "2026-12-05" },
        { "origin": "PAR", "destination": "ROM", "date": "2026-12-09" },
        { "origin": "ROM", "destination": "BER", "date": "2026-12-12" }
    ],
    "cabinClass": "business",
    "market": "DE",
    "currency": "EUR",
    "locale": "de-DE"
}
```

### Output example

One itinerary row (shortened: one segment and one booking site shown):

```json
{
    "type": "itinerary",
    "search": "LON-NYC 2026-12-15",
    "tripType": "one-way",
    "rank": 1,
    "itineraryId": "13542-2612151300--31071-1-12712-2612152200",
    "price": 282.43,
    "priceFormatted": "£283",
    "currency": "GBP",
    "cheapestAgent": "LEVEL",
    "agentCount": 1,
    "priceOptions": [
        { "agentId": "leve", "agentName": "LEVEL", "isAirline": true, "agentRating": null, "price": 282.43, "fareBrand": "LIGHT", "bookingUrl": "https://www.skyscanner.net/transport_deeplink/4.0/UK/en-GB/GBP/leve/1/..." }
    ],
    "isCheapest": false,
    "isFastest": false,
    "totalDurationMinutes": 840,
    "maxStops": 1,
    "carriers": ["LEVEL"],
    "legs": [
        {
            "origin": { "code": "LGW", "name": "London Gatwick", "city": "London", "country": "United Kingdom" },
            "destination": { "code": "JFK", "name": "New York John F. Kennedy", "city": "New York", "country": "United States" },
            "departure": "2026-12-15T13:00:00",
            "arrival": "2026-12-15T22:00:00",
            "durationMinutes": 840,
            "stopCount": 1,
            "flightNumbers": ["LL5403", "LL2627"],
            "layovers": [{ "airport": "BCN", "airportName": "Barcelona", "durationMinutes": 160, "changeOfAirport": false }],
            "segments": [
                { "flightNumber": "LL5403", "marketingCarrier": "LEVEL", "operatingCarrier": "Vueling Airlines", "departure": "2026-12-15T13:00:00", "arrival": "2026-12-15T16:05:00", "durationMinutes": 125 }
            ]
        }
    ],
    "farePolicy": { "isChangeAllowed": false, "isCancellationAllowed": false },
    "emissionsKg": 525.7,
    "emissionsLevel": "higher",
    "market": "UK",
    "totalResultsForSearch": 664
}
```

The route summary row saved for each search (shortened):

```json
{
    "type": "searchSummary",
    "search": "LON-NYC 2027-01-11",
    "tripType": "one-way",
    "itineraryCount": 586,
    "bookingSiteCount": 72,
    "cheapestPrice": 328,
    "cheapestAgent": "Kiwi.com",
    "cheapestCarriers": ["Wizz Air UK", "TAP Air Portugal"],
    "fastestDurationMinutes": 470,
    "fastestPrice": 486.68,
    "cheapestDirectPrice": 441.57,
    "cheapestOneStopPrice": 404,
    "cheapestTwoPlusStopsPrice": 328,
    "cheapestByAirline": [{ "airline": "TAP Air Portugal", "code": "TP", "price": 328 }, { "airline": "LEVEL", "code": "LL", "price": 431.89 }],
    "currency": "USD",
    "departureDate": "2027-01-11",
    "market": "US"
}
```

A price calendar row:

```json
{ "type": "calendarDay", "search": "JFK-MIA", "date": "2027-01-12", "price": 126.33, "priceLevel": "low", "currency": "USD" }
```

### Tips and limits

- **Times are local** to each airport, as on Skyscanner. Durations are in minutes.
- **Prices are totals** for all travellers, in the chosen currency, as Skyscanner shows them at run time. Final prices are set by the booking site.
- **City codes search every airport** of the city (`LON` covers Heathrow, Gatwick, Stansted and more). Use an airport code to search one airport.
- **Calendar prices are indicative** cheapest one-way fares from Skyscanner's cache; open `searchUrl` or run a flight search for live prices on a given day. Passenger and date fields do not apply to the calendar.
- **Baggage** details appear only when Skyscanner provides fare attributes for that fare; the fare brand (e.g. `LIGHT`) is a good hint of what is included.
- **Limits**: up to 50 searches per run and 1,000 itineraries per search. Skyscanner itself usually returns 100–1,500 itineraries per route.
- **Failures**: an unknown place or a past date stops the run with a clear message and no charge. If Skyscanner refuses one search, the run keeps going with the others, keeps the saved rows and names the failed search in its status.

### Scheduling fare monitoring

1. Save your input as an Apify **Task** (one or many routes in `additionalRoutes`).
2. Leave `departureDate` empty to always search 30 days ahead, or fix the dates you care about.
3. Add a **Schedule** (e.g. daily at 06:00).
4. For a light daily tracker set `maxItinerariesPerSearch` to 0: each route then gives one summary row with its cheapest, direct and per-airline prices.
5. Send results to Google Sheets, a webhook, Slack or your database with an Apify integration, and compare `price` per `itineraryId` over time.

### Integrations

- **Google Sheets / Excel / CSV**: export the Itineraries or Price calendar view directly.
- **Make, Zapier, n8n**: trigger a flow when the run succeeds and read the dataset.
- **Webhooks**: post the dataset URL to your backend after every run.
- **Data warehouses**: load the JSON with legs and segments as nested records.

### Use the Skyscanner scraper with the API

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~skyscanner-flight-price-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"origin":"LON","destination":"NYC","departureDate":"2027-01-15","maxItinerariesPerSearch":20}'
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/skyscanner-flight-price-scraper').call({
    origin: 'LON',
    destination: 'NYC',
    departureDate: '2027-01-15',
    sortBy: 'cheapest',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].price, items[0].cheapestAgent);
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("automation-lab/skyscanner-flight-price-scraper").call(run_input={
    "mode": "priceCalendar",
    "origin": "JFK",
    "destination": "MIA",
    "calendarMonth": "2027-01",
})
for day in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(day["date"], day["price"], day["priceLevel"])
```

### Use with AI agents through MCP

Connect this Actor to Claude, Cursor or any MCP client through the Apify MCP server.

Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/skyscanner-flight-price-scraper"
```

Claude Desktop, Cursor or VS Code (JSON config):

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/skyscanner-flight-price-scraper"
        }
    }
}
```

Example prompts:

- "Find the 10 cheapest flights from London to New York on 15 January and list the booking sites."
- "Which day in March is cheapest to fly from JFK to Miami?"
- "Compare business class prices for Berlin → Paris → Rome → Berlin in December."

Results can be large. Ask the agent to read the dataset in pages (for example 20 rows at a time) and to request only the fields it needs, such as `price`, `cheapestAgent`, `legs`.

### Data handling and privacy

The Actor does not call an AI model and collects no personal data. It sends only your route, dates, cabin, traveller counts and market settings to Skyscanner. Results stay in your Apify run storage and follow your account's retention settings.

Failed operations send sanitized diagnostic input, exceptions and Actor/build/run IDs to our private GlitchTip service for repair. Secret fields and URL query strings are removed; reports are retained for 30 days.

### Is it legal to scrape Skyscanner?

This Actor collects publicly visible flight prices and schedules, the same data any visitor sees without logging in. It collects no personal data. Make sure your use complies with Skyscanner's terms and the laws that apply to you, especially if you republish data commercially. This Actor is not affiliated with or endorsed by Skyscanner. When in doubt, consult a lawyer.

### FAQ

**How fresh are the prices?**
Each run performs a live Skyscanner search, so prices are what Skyscanner shows at that moment. Skyscanner may reuse very recent results from its own cache.

**Why is the price different on the booking site?**
Airlines and agents can change prices at any time, and some add fees for bags or payment methods. Always confirm on the booking site.

**Why did I get fewer itineraries than my limit?**
Skyscanner found fewer for that route and date, or your `maxStops` filter removed them. The run status tells you how many it got and why.

**The run says Skyscanner refused the request. What now?**
Skyscanner sometimes blocks traffic for a short time. The Actor already retries on fresh connections; run it again a few minutes later. Saved rows are kept and you only pay for them.

**My place was not found.**
Use an IATA code (`LHR`) or a city code (`LON`). Very small airports may need their exact IATA code.

**Can I search many dates at once?**
Use **Price calendar** to see the cheapest day, then run flight searches for the dates you like, or put several dated routes in `additionalRoutes`.

### Related Actors

- [Google Flights Scraper](https://apify.com/automation-lab/google-flights-scraper): flight prices from Google Flights.
- [Ryanair Scraper](https://apify.com/automation-lab/ryanair-flight-fares-cheapest-routes): Ryanair fares and cheapest routes.
- [Flightpoints Award Flights Scraper](https://apify.com/automation-lab/flightpoints-award-flights-scraper): award (miles) flight availability.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/skyscanner-flight-price-scraper/changelog.md

# Actor input Schema

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

<b>Flight search</b>: one row per itinerary for the given dates, with all booking agents and their prices, legs, flight numbers, stops and layovers. <b>Price calendar</b>: one row per day with the cheapest one-way price Skyscanner shows for the route over the next ~11 months (dates and passenger fields are ignored).

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

Departure airport or city: an IATA code (<code>LHR</code>, <code>JFK</code>), a city code (<code>LON</code>, <code>NYC</code> for all airports of the city) or a city name. When a name is ambiguous, Skyscanner's top match is used.

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

Arrival airport or city, in the same form as <b>From</b>.

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

Outbound date, YYYY-MM-DD. Empty means 30 days from today, which keeps a scheduled task looking the same distance ahead. Flight search only.

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

Add a return date for a round trip (YYYY-MM-DD). Empty means one-way. Flight search only.

## `multiCityLegs` (type: `array`):

2 to 6 legs searched as one multi-city trip, each <code>{"origin": "BER", "destination": "PAR", "date": "2027-03-05"}</code>. Runs as an extra search next to From/To. Flight search only.

## `additionalRoutes` (type: `array`):

More routes in the same run, each <code>{"origin": "LAX", "destination": "TYO", "departureDate": "2027-04-10", "returnDate": "2027-04-20"}</code>. Dates are optional and follow the same rules as above. Used in both modes. At most 50 searches per run.

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

Skyscanner flight result URLs such as <code>https://www.skyscanner.net/transport/flights/lond/nyca/261215/261222/?adultsv2=2\&cabinclass=business</code>. Route, dates, adults, children and cabin are read from each URL; the cabin and passenger fields below do not apply to them. Any Skyscanner domain works.

## `calendarMonth` (type: `string`):

Price calendar only: keep only days in this month, e.g. <code>2027-03</code>. Empty returns every day Skyscanner has a price for.

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

Cabin for flight search.

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

Adult travellers (1-8). Prices are totals for all travellers.

## `childrenAges` (type: `array`):

One age (0-17) per child, e.g. <code>\[7, 1]</code>. Age under 2 counts as an infant. Up to 9 travellers in total.

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

Skyscanner market (country) as a 2-letter code, e.g. <code>US</code>, <code>UK</code>, <code>DE</code>. It decides which booking sites appear.

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

3-letter currency code for prices, e.g. <code>USD</code>, <code>GBP</code>, <code>EUR</code>.

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

Locale for place and agent names, e.g. <code>en-US</code>, <code>de-DE</code>.

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

Order of itineraries within each search, applied before the limit: Skyscanner's <b>Best</b> ranking, <b>Cheapest</b> first, or <b>Fastest</b> (shortest total flight time) first.

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

Keep only itineraries where every leg has at most this many stops. 0 means direct flights only. Empty means any.

## `maxItinerariesPerSearch` (type: `integer`):

Itineraries saved per search, after sorting and filtering. Each search also saves one route summary row (cheapest, fastest, direct and per-airline prices). 0 saves only the route summaries, the cheapest way to monitor many routes. Skyscanner usually finds 100-1,500 itineraries per route. Price calendar ignores this.

## `includeAllPrices` (type: `boolean`):

On: each itinerary lists every booking agent's price and booking link. Off: only the cheapest agent.

## Actor input object example

```json
{
  "mode": "search",
  "origin": "LON",
  "destination": "NYC",
  "cabinClass": "economy",
  "adults": 1,
  "market": "US",
  "currency": "USD",
  "locale": "en-US",
  "sortBy": "best",
  "maxItinerariesPerSearch": 20,
  "includeAllPrices": true
}
```

# Actor output Schema

## `overview` (type: `string`):

Main table: one route summary per flight search.

## `summaries` (type: `string`):

One row per flight search: cheapest, fastest, direct and per-airline prices.

## `itineraries` (type: `string`):

Table of flight itineraries: search, rank, cheapest price and site, airlines, duration, stops, booking link.

## `calendar` (type: `string`):

Table of price calendar days: route, date, cheapest one-way price and price level.

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

Every row with all fields, including legs, segments, layovers and all booking-site prices.

# 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": "search",
    "origin": "LON",
    "destination": "NYC",
    "maxItinerariesPerSearch": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/skyscanner-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 = {
    "mode": "search",
    "origin": "LON",
    "destination": "NYC",
    "maxItinerariesPerSearch": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/skyscanner-flight-price-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 '{
  "mode": "search",
  "origin": "LON",
  "destination": "NYC",
  "maxItinerariesPerSearch": 20
}' |
apify call automation-lab/skyscanner-flight-price-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/skyscanner-flight-price-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/RIIVueI8RsyTGULny/builds/lFZDFKEcrROcr0bpn/openapi.json
