# Skyscanner Scraper — $0.80/1K flights, agents & calendar (`lergassy/skyscanner-flights-scraper`) Actor

Scrape Skyscanner flight prices by route and date: price, airlines, flight numbers, stops, layovers, times, duration, and every travel agent with its price, rating and booking link. One-way, round trip, multi-city and a 12-month price calendar. Export, schedule, or call via API and MCP.

- **URL**: https://apify.com/lergassy/skyscanner-flights-scraper.md
- **Developed by:** [Matvey](https://apify.com/lergassy) (community)
- **Categories:** Travel, Agents, MCP servers
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.56 / 1,000 flights

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 Scraper** pulls live flight prices from **Skyscanner** for any route and date and returns them as clean rows: total price, the travel agent or airline selling it, **every other agent with its own price, rating and booking link**, airlines, flight numbers, stops, layovers, departure and arrival times, duration and CO₂. One-way, round trip, multi-city, and a **12-month price calendar** (cheapest fare per day). No Skyscanner API key, no partner account, no browser.

It is a **Skyscanner API alternative** for fare tracking, price comparison, travel content and AI agents: you give a route and a date (or paste a Skyscanner search link), you get a table you can export to Excel, CSV or JSON, call from Python or JavaScript, or plug into n8n, Make, Zapier and MCP.

### Tested head-to-head — 30 Oct 2026

Four searches run on every Actor with the same input, 20 results each, US market, USD: JFK → LHR and LAX → NRT one-way, DPS ⇄ SIN round trip, CGK → SIN → BKK multi-city.

| | This Actor | Other Skyscanner Actors in the Store |
|---|---|---|
| Rows returned (20 asked) | **20 on every search** | 18–20 (Skyscanner-based), 6–16 (cache-based) |
| Cheapest fare found | same or lower (LAX → NRT: $276.95 vs $279) | — |
| Cost of a 20-row run, Free plan | **$0.020 one-way, $0.024 round trip** | $0.027–$0.040 |
| Every agent with its own price, rating and booking link | **yes** | no |
| Data from Skyscanner itself | yes | not always (one returns cached fares from another source, with a wrong date) |
| Price calendar in the same Actor | **yes, $0.0008 per day** | separate Actor, $0.003 per day |
| Run time | 30–50 s | 2–31 s |

### What is Skyscanner Scraper?

Skyscanner compares hundreds of airlines and online travel agencies for every search. This Actor runs that same search the way the Skyscanner website does and hands you the result as data:

- **Flights mode** — one row per itinerary. Each row carries the lowest price, the agent behind it, a direct **Skyscanner booking link**, and the full list of agents (Expedia, Kiwi.com, Trip.com, Gotogate, the airline itself…) with each agent's price and customer rating.
- **Price calendar mode** — one row per departure day for the next ~12 months with the cheapest one-way price Skyscanner has seen and its price level (low / medium / high). One fast request per route.

Typical searches return **100 to 2,000 itineraries**; you keep as many as you need with **Max flights per search**.

### What data can Skyscanner Scraper extract?

| Field | Example | What it is |
|---|---|---|
| `price` | `290.4` | Lowest total price for all passengers |
| `currency` / `priceFormatted` | `USD` / `$291` | Currency you asked for |
| `cheapestAgent` | `British Airways` | Who sells the lowest price |
| `bookingUrl` | `https://www.skyscanner.net/transport_deeplink/…` | Skyscanner redirect to book with that agent |
| `agents[]` | `{name, price, rating, ratingCount, isAirline, bookingUrl}` | Every agent with a price, cheapest first |
| `unpricedAgents[]` | `["Lufthansa"]` | Agents listed without a price ("see their site") |
| `airlines` / `airlineCodes` | `["British Airways"]` / `["BA"]` | Marketing carriers |
| `flightNumbers` | `["BA114"]` | All flight numbers of the trip |
| `stops` / `totalStops` | `0` / `0` | Most stops on one leg / all legs together |
| `departAt` / `arriveAt` | `2026-12-03T21:15:00` | Local times, outbound |
| `returnDepartAt` / `returnArriveAt` | `2026-12-10T08:05:00` | Local times, return (round trip) |
| `durationMinutes` | `420` | Flying + layover time |
| `legs[]` | segments, operating airline, airports, layovers | Full itinerary, leg by leg |
| `tags` | `["cheapest","shortest"]` | Skyscanner's own labels |
| `score` | `0.999` | Skyscanner "Best" score |
| `isSelfTransfer` | `false` | Separate tickets, re-check bags |
| `changeAllowed` / `refundable` | `false` | Fare policy flags |
| `emissionsKg` / `emissionsVsTypicalPercent` | `310` / `-28` | CO₂ per passenger and vs a typical flight |
| `searchUrl` | `https://www.skyscanner.net/transport/flights/jfk/lhr/261203/…` | The same search on Skyscanner |
| `totalFound` / `resultsComplete` | `301` / `true` | How many itineraries Skyscanner had |

Price calendar rows (`type: "price-day"`): `date`, `price`, `currency`, `priceLevel`, `isCheapestDay`, `searchUrl`.

### 💰 How much does it cost to scrape Skyscanner?

Pay-per-event, no monthly rent, error rows are always free:

| Event | Free plan | Bronze | Silver | Gold+ |
|---|---|---|---|---|
| Flight search, per leg (one-way = 1, round trip = 2) | $0.004 | $0.0036 | $0.0032 | $0.0028 |
| Flight row (one itinerary) | $0.0008 | $0.00072 | $0.00064 | $0.00056 |
| Price-calendar day | $0.0008 | $0.00072 | $0.00064 | $0.00056 |

**Examples (Free plan prices):**

- One-way search, 20 flights: $0.004 + 20 × $0.0008 = **$0.020**
- One-way search, 50 flights: **$0.044** (Gold: $0.031)
- Round trip, 50 flights: $0.008 + $0.040 = **$0.048**
- 12-month price calendar for one route (~360 days): **≈ $0.29**

Rows cost **$0.80 per 1,000** on the Free plan and $0.56 per 1,000 on Gold, plus the search fee. A search that finds nothing, a bad date or an unknown airport is a free error row. The last row of each run is a free summary of what was delivered and charged (switch it off with *Add a free summary row*).

### How to scrape Skyscanner with Skyscanner Scraper

1. Open the Actor and type **From** and **To** — airport codes (`JFK`, `LHR`), city codes that cover every airport of a city (`NYC`, `LON`), or plain city names (`Bali`, `Tokyo`).
2. Set **Departure date** as `2026-12-03`, or as `+30` for "30 days from today" — handy for schedules, the date never goes stale.
3. Add a **Return date** for a round trip, or leave it empty for one-way.
4. Optionally pick cabin, passengers, stops, airlines, max price, currency and market.
5. Press **Start**. A one-way search takes 15–35 seconds, a round trip 30–60 seconds.
6. Download the table as Excel, CSV, JSON or HTML, or read it through the API.

### ⬇️ Input

![Skyscanner Scraper input form: From, To, departure date, return date, cabin, max flights, sort, stops, market and currency](https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/skyscanner-flights-scraper/skyscanner-flights-scraper-input-form.png)

#### One-way or round trip

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "departureDate": "2026-12-03",
  "returnDate": "2026-12-10",
  "adults": 1,
  "cabinClass": "economy",
  "maxResultsPerSearch": 50,
  "sortBy": "cheapest",
  "currency": "USD",
  "market": "US"
}
```

Several origins, destinations or dates, comma-separated (`"origin": "JFK,EWR"`, `"departureDate": "+30,+31,+32"`), become one search per combination, up to 200 searches per run.

#### Paste Skyscanner links

```json
{ "startUrls": [{ "url": "https://www.skyscanner.net/transport/flights/lond/nyca/261210/261217/?adultsv2=2&cabinclass=business" }] }
```

Route, dates, adults, children and cabin are read from the link.

#### Multi-city / open-jaw

```json
{
  "multiCityLegs": [
    { "origin": "CGK", "destination": "SIN", "date": "2026-11-20" },
    { "origin": "SIN", "destination": "BKK", "date": "2026-11-25" },
    { "origin": "BKK", "destination": "CGK", "date": "2026-11-30" }
  ]
}
```

#### Price calendar

```json
{ "mode": "calendar", "origin": "DPS", "destination": "SYD", "maxResultsPerSearch": 400 }
```

Add `departureDate` and `calendarEndDate` (`"+10"`, `"+90"`) to cut the window.

#### Filters

| Input | Effect |
|---|---|
| `maxStops` | `0` direct only, `1`, `2`, or `any` |
| `airlines` | keep itineraries flown by these IATA codes (`["BA","AA"]`) |
| `maxPrice` | drop anything above this total price |
| `excludeSelfTransfer` | drop separate-ticket itineraries |
| `sortBy` | `best` (Skyscanner score), `cheapest`, `fastest` |
| `maxAgentsPerFlight` | how many agents to list per row (0–100) |
| `market` / `currency` / `locale` | point of sale, price currency, language |

Filters are applied to the full Skyscanner result, then the first *Max flights per search* rows are kept, so `maxStops: "0"` with 20 rows gives 20 direct flights when Skyscanner has them.

### ⬆️ Output

![Skyscanner Scraper output table: cheapest agent, price, number of agents, airlines, flight numbers, stops, times, duration and CO2 for JFK to LHR](https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/skyscanner-flights-scraper/skyscanner-flights-scraper-output-table.png)

One real row (JFK → LHR, one-way, cheapest first; booking links shortened):

```json
{
  "type": "flight",
  "tripType": "one_way",
  "origin": "JFK",
  "destination": "LHR",
  "departureDate": "2026-11-28",
  "price": 289,
  "currency": "USD",
  "priceFormatted": "$289",
  "cheapestAgent": "Booking.com",
  "cheapestAgentIsAirline": false,
  "bookingUrl": "https://www.skyscanner.net/transport_deeplink/4.0/US/en-US/USD/bcom/1/…",
  "agentsCount": 23,
  "agents": [
    {
      "name": "Booking.com",
      "agentId": "bcom",
      "isAirline": false,
      "price": 289,
      "rating": 4.91,
      "ratingCount": 5138,
      "bookingUrl": "https://www.skyscanner.net/transport_deeplink/4.0/US/en-US/USD/bcom/1/…"
    },
    {
      "name": "Flightnetwork",
      "agentId": "fnus",
      "isAirline": false,
      "price": 291,
      "rating": 4.53,
      "ratingCount": 1130,
      "bookingUrl": "https://www.skyscanner.net/transport_deeplink/4.0/US/en-US/USD/fnus/1/…"
    },
    {
      "name": "Kiwi.com",
      "agentId": "skyp",
      "isAirline": false,
      "price": 297,
      "rating": 4.41,
      "ratingCount": 5738,
      "bookingUrl": "https://www.skyscanner.net/transport_deeplink/4.0/US/en-US/USD/skyp/1/…"
    }
  ],
  "unpricedAgents": [],
  "airlines": [
    "Aer Lingus"
  ],
  "airlineCodes": [
    "EI"
  ],
  "flightNumbers": [
    "EI106",
    "EI158"
  ],
  "stops": 1,
  "totalStops": 1,
  "departAt": "2026-11-28T21:15:00",
  "arriveAt": "2026-11-29T11:25:00",
  "durationMinutes": 550,
  "legs": [
    {
      "origin": "JFK",
      "destination": "LHR",
      "departAt": "2026-11-28T21:15:00",
      "arriveAt": "2026-11-29T11:25:00",
      "durationMinutes": 550,
      "stops": 1,
      "segments": [
        {
          "flightNumber": "EI106",
          "airline": "Aer Lingus",
          "operatingAirline": "Aer Lingus",
          "origin": "JFK",
          "destination": "DUB",
          "departAt": "2026-11-28T21:15:00",
          "arriveAt": "2026-11-29T08:45:00",
          "durationMinutes": 390
        },
        {
          "flightNumber": "EI158",
          "airline": "Aer Lingus",
          "operatingAirline": "Aer Lingus",
          "origin": "DUB",
          "destination": "LHR",
          "departAt": "2026-11-29T10:00:00",
          "arriveAt": "2026-11-29T11:25:00",
          "durationMinutes": 85
        }
      ],
      "layovers": [
        {
          "airport": "DUB",
          "minutes": 75,
          "changeOfAirport": false
        }
      ]
    }
  ],
  "tags": [
    "cheapest"
  ],
  "score": 0.725656,
  "isSelfTransfer": false,
  "changeAllowed": false,
  "refundable": false,
  "emissionsKg": 394,
  "emissionsVsTypicalPercent": -9,
  "cabinClass": "economy",
  "market": "US",
  "searchUrl": "https://www.skyscanner.net/transport/flights/jfk/lhr/261128/?adultsv2=1&cabinclass=economy&rtn=0",
  "totalFound": 302,
  "resultsComplete": true
}
```

The dataset has three views: **Flights**, **Price calendar**, and **Errors and notices**.

#### Error rows

A search that cannot run returns one free row with `type: "error"`, a `kind` (`bad-input`, `no-results`, `error`) and a sentence saying what to change: a date in the past, an unknown airport, a return before the departure, or a filter that left nothing. These rows are never charged, so an empty answer is a documented result, not a broken run.

### Use cases for Skyscanner data

#### Fare tracking and price alerts

Schedule the same route daily with `"departureDate": "+30"` and compare `price` over time, or run the price calendar weekly to catch the cheapest days.

#### Agent and OTA price comparison

`agents[]` shows how far apart Expedia, Kiwi.com, Trip.com and the airline are on the same itinerary — the spread Skyscanner shows in its booking panel, as data.

#### Travel agencies and travel content

Build "cheapest month to fly to Bali" pages from the calendar, or quote clients several options with direct booking links.

#### Airline and route research

Who flies a route, how many connections, typical durations, CO₂ versus typical, self-transfer share.

#### AI agents and RAG

Flat, literal field names and a deterministic input make it easy for an LLM agent to call through the Apify MCP server and answer "what is the cheapest way from Jakarta to Tokyo next month?".

### Integrations

- **Apify API** — run and read results from any language. Python:

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("lergassy/skyscanner-flights-scraper").call(run_input={
    "origin": "JFK", "destination": "LHR", "departureDate": "+30", "maxResultsPerSearch": 20, "sortBy": "cheapest"})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "flight":
        print(row["price"], row["cheapestAgent"], row["flightNumbers"])
```

- **JavaScript** — `await client.actor('lergassy/skyscanner-flights-scraper').call({...})` with `apify-client`.
- **n8n, Make, Zapier, Google Sheets, Slack, webhooks** — through Apify integrations.
- **MCP server** — AI agents (Claude, ChatGPT, Cursor) can find and run this Actor through the Apify MCP server (`mcp.apify.com`).

### ❓ FAQ

#### Is it legal to scrape Skyscanner?

The Actor reads publicly visible flight prices — the same data any visitor sees on skyscanner.net — and no personal data. Whether and how you may reuse the data depends on your country and your use; for commercial redistribution check Skyscanner's terms and consult a lawyer.

#### Do I need a Skyscanner API key?

No. The official Skyscanner API is open only to approved partners. This Actor needs only an Apify account.

#### Can I use Skyscanner Scraper with the Apify API?

Yes — every run can be started and read through the Apify API, with ready clients for Python and JavaScript.

#### Can I use it through an MCP server?

Yes. Add the Apify MCP server to your agent and it can call this Actor as a tool with the same input fields.

#### Can I integrate it with other apps?

Yes: n8n, Make, Zapier, Google Sheets, Airtable, Slack, webhooks and anything that speaks HTTP.

#### How many results do I get per search?

As many as Skyscanner has for the route and date — usually 100 to 2,000 itineraries — capped by *Max flights per search* (default 50). One row = one itinerary, with every agent's price inside it.

#### Why can a price differ from what I see on Skyscanner?

Prices change by the minute and differ by market and currency. Use the same `market` and `currency` as your Skyscanner site, and open `searchUrl` to see the same search.

#### How long does a run take?

15–35 seconds per one-way search, 30–60 seconds per round trip, about 5–10 seconds per price calendar. Searches in one run go three at a time.

#### What does "+30" mean in a date?

"30 days from today". Saved tasks and schedules with relative dates never search a past date.

#### What is a "search, per leg" event?

Skyscanner prices every leg of a trip, so a round trip costs twice the search fee of a one-way search and a 3-leg multi-city three times. Rows are billed separately.

### Your feedback

Found a bug, need a field, or want a different output? Open an issue on the Actor's **Issues** tab — we read every one and usually reply within a day. If the Actor did its job, a short review helps the next traveller find it.

### You might also like

| Actor | What it does |
|---|---|
| [Google Flights Scraper](https://apify.com/lergassy/google-flights-scraper) | Google Flights fares, calendar and booking options |
| [Kayak Flights Scraper](https://apify.com/lergassy/kayak-flights-scraper) | KAYAK prices per booking provider |
| [Momondo Flights Scraper](https://apify.com/lergassy/momondo-flights-scraper) | Momondo fares and sellers |
| [Ryanair Flights Scraper](https://apify.com/lergassy/ryanair-flights-scraper) | Ryanair fares and fare calendar |
| [Flight Price Comparison](https://apify.com/lergassy/flight-price-comparison) | Several flight sources in one run |
| [Booking.com Scraper](https://apify.com/lergassy/booking-hotels-scraper) | Hotel prices, rooms and reviews |

# Actor input Schema

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

Enter the departure airport or city: an IATA code (<code>JFK</code>, <code>LHR</code>), a city code that covers every airport of the city (<code>NYCA</code>, <code>LOND</code>) or a city name. Separate several with commas to search every combination.

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

Enter the arrival airport or city, in the same formats as From. Several, comma-separated, are searched one by one.

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

Date as <code>YYYY-MM-DD</code>, or <code>+30</code> for "30 days from today" (keeps saved tasks and schedules from going stale). Several dates, comma-separated, each become a search. In Price calendar mode it is the first day of the calendar (optional).

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

Leave empty for one-way. <code>YYYY-MM-DD</code> or <code>+37</code>. Must be on or after the departure date.

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

<b>Flights</b>: one row per itinerary for each search. <b>Price calendar</b>: one row per departure day with the cheapest one-way price Skyscanner has seen, for the next ~12 months, from one fast request per route.

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

Paste Skyscanner flight search links, e.g. <code>https://www.skyscanner.net/transport/flights/lond/nyca/261210/261217/?adultsv2=2</code>. Route, dates, passengers and cabin are read from the link. Any Skyscanner domain works.

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

For a multi-city / open-jaw trip, list 2–6 legs as <code>\[{"origin":"LHR","destination":"JFK","date":"2026-12-05"},{"origin":"BOS","destination":"LHR","date":"2026-12-12"}]</code>. Searched as one trip, in addition to the From/To fields.

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

Number of adult passengers (16+). Prices are for all passengers together.

## `childAges` (type: `array`):

Ages of children (0–15), one number per child, e.g. <code>\[4, 9]</code>. Age under 2 counts as an infant on lap.

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

Cabin to search.

## `maxResultsPerSearch` (type: `integer`):

How many itineraries to keep from each search, after filters and sorting. Skyscanner returns 10–2,000 per search; every kept row is billed.

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

Order in which itineraries are kept and written. Best follows Skyscanner's own score (price, duration and stops).

## `maxStops` (type: `string`):

Keep only itineraries where no leg has more stops than this.

## `airlines` (type: `array`):

Keep only itineraries flown by at least one of these airlines, by 2-letter code: <code>BA</code>, <code>AA</code>, <code>DL</code>. Empty = all airlines.

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

Drop itineraries above this total price, in the selected currency. Empty = no limit.

## `excludeSelfTransfer` (type: `boolean`):

Drop itineraries where you have to collect bags and check in again between separate tickets.

## `maxAgentsPerFlight` (type: `integer`):

How many booking options (travel agents and airlines, each with price, rating and booking link) to list in the <code>agents</code> column of each row, cheapest first. 0 = only the cheapest one in <code>cheapestAgent</code>/<code>bookingUrl</code>.

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

2-letter country of the point of sale (<code>US</code>, <code>UK</code>, <code>DE</code>, <code>ID</code>, <code>AU</code>…). Skyscanner shows different agents and prices per market.

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

ISO currency for all prices: <code>USD</code>, <code>EUR</code>, <code>GBP</code>, <code>IDR</code>…

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

Language of place names, e.g. <code>en-US</code>, <code>en-GB</code>, <code>de-DE</code>.

## `calendarEndDate` (type: `string`):

Price calendar mode only: last day to include (<code>YYYY-MM-DD</code> or <code>+90</code>). Empty = everything Skyscanner has (about 12 months).

## `includeRunSummary` (type: `boolean`):

Add one free row at the end of the dataset: rows delivered and events charged. Filter it out with <code>type != "notice"</code>.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "departureDate": "+30",
  "mode": "flights",
  "adults": 1,
  "cabinClass": "economy",
  "maxResultsPerSearch": 20,
  "sortBy": "best",
  "maxStops": "any",
  "excludeSelfTransfer": false,
  "maxAgentsPerFlight": 20,
  "market": "US",
  "currency": "USD",
  "locale": "en-US",
  "includeRunSummary": true
}
```

# Actor output Schema

## `flights` (type: `string`):

One row per itinerary (type flight): price, cheapest agent and booking link, all agents with prices, airlines, flight numbers, stops, layovers, times, duration, CO2. In Price calendar mode one row per departure day (type price-day).

# 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": "JFK",
    "destination": "LHR",
    "departureDate": "+30",
    "maxResultsPerSearch": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("lergassy/skyscanner-flights-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": "JFK",
    "destination": "LHR",
    "departureDate": "+30",
    "maxResultsPerSearch": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("lergassy/skyscanner-flights-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": "JFK",
  "destination": "LHR",
  "departureDate": "+30",
  "maxResultsPerSearch": 20
}' |
apify call lergassy/skyscanner-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lergassy/skyscanner-flights-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/XlvBBXQ2CqBO2VqEb/builds/cTgfPbClPc0ThrzPa/openapi.json
