# Skyscanner Flight Scraper API ✈️ (`shahidirfan/skyscanner-flight-scraper-api`) Actor

Scrape Skyscanner flight data at scale with this fast, reliable API. Extract flight prices, airlines, routes, schedules, departure and arrival times, stops, and travel options for market research, fare tracking, price comparison, analytics, and travel apps.

- **URL**: https://apify.com/shahidirfan/skyscanner-flight-scraper-api.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.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/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

### What does Skyscanner Flight Scraper API do?

Skyscanner Flight Scraper collects live flight itineraries for one-way and round-trip searches. Provide a public Skyscanner flight URL, or enter the route and dates separately, and receive structured prices, airlines, flight numbers, stops, durations, airports, schedules, and booking links.

The Actor is designed for airfare monitoring, route research, travel comparison products, and automated flight-data workflows. It keeps loading unique itineraries until it saves the number requested in `results_wanted`, reaches the end of the available search, or reaches the `max_pages` safety limit.

### Why use Skyscanner Flight Scraper?

- **Collect the requested result count** - The Actor continues through search updates and deduplicates itineraries until it reaches `results_wanted` or the source has no more matching flights.
- **Save progress during the run** - New flights are written to the dataset in batches, so completed work is preserved if a later request encounters a temporary problem.
- **Use flexible route inputs** - Start with a full Skyscanner URL, an airport code, a city name, or a Skyscanner route code.
- **Compare complete itineraries** - Inspect outbound and return legs, segments, operating carriers, marketing carriers, stop counts, and total journey duration.
- **Filter before export** - Keep direct flights only or apply a maximum stop count.
- **Automate recurring searches** - Schedule runs, connect webhooks, export datasets, or retrieve results programmatically through Apify.

### What flight data can you extract from Skyscanner?

| Field                    | Type    | Description                                                           |
| ------------------------ | ------- | --------------------------------------------------------------------- |
| `itineraryId`            | String  | Unique identifier for the flight itinerary                            |
| `bucket`                 | String  | Result group such as Best, Cheapest, Fastest, or Direct when supplied |
| `price`                  | Object  | Raw amount, formatted fare, and currency when available               |
| `bookingUrl`             | String  | Booking or fare-selection link when published for the itinerary       |
| `score`                  | Number  | Search ranking score when available                                   |
| `tags`                   | Array   | Labels assigned to the itinerary when available                       |
| `stopCount`              | Integer | Total number of stops across all legs                                 |
| `totalDurationInMinutes` | Integer | Combined duration of the complete itinerary                           |
| `airlines`               | Array   | Marketing and operating airline details                               |
| `flightNumbers`          | Array   | Flight numbers found across all segments                              |
| `outbound`               | Object  | Outbound airports, schedule, duration, stops, carriers, and segments  |
| `inbound`                | Object  | Return-leg details for round-trip searches                            |
| `legs`                   | Array   | All itinerary legs in travel order                                    |
| `sourcePage`             | Integer | Search update in which the itinerary was first saved                  |
| `sourceUrl`              | String  | Skyscanner search URL associated with the request                     |
| `origin`                 | String  | Requested origin value                                                |
| `destination`            | String  | Requested destination value                                           |
| `outboundDate`           | String  | Departure date in `YYYY-MM-DD` format                                 |
| `inboundDate`            | String  | Return date when supplied                                             |
| `adults`                 | Integer | Number of adult passengers                                            |
| `childrenAges`           | Array   | Child ages included in the search when supplied                       |
| `cabinClass`             | String  | Requested cabin class                                                 |
| `market`                 | String  | Market used for localization                                          |
| `locale`                 | String  | Locale used for airport names and labels                              |
| `currency`               | String  | Requested three-letter fare currency                                  |
| `scrapedAt`              | String  | UTC timestamp for when the itinerary was saved                        |

Null values, empty strings, empty arrays, and empty objects are removed, so dataset items stay compact across JSON, CSV, Excel, and XML exports.

### How to use Skyscanner Flight Scraper

1. Open the Actor in Apify Console.
2. Paste a public Skyscanner flight-search URL, or enter the origin, destination, and outbound date.
3. Add an inbound date for a round trip, then choose passengers, cabin class, currency, and optional stop filters.
4. Set `results_wanted` to the maximum number of unique itineraries to save.
5. Run the Actor and review the default dataset.
6. Download the data or connect the run to your preferred integration.

### Input Parameters

| Parameter            | Type    | Required    | Default                       | Description                                                                                  |
| -------------------- | ------- | ----------- | ----------------------------- | -------------------------------------------------------------------------------------------- |
| `url`                | String  | Conditional | Example New York to Dubai URL | Public Skyscanner flight URL containing the route and dates                                  |
| `origin`             | String  | Conditional | -                             | Origin city, airport, IATA code, or Skyscanner route code; required when `url` is empty      |
| `destination`        | String  | Conditional | -                             | Destination city, airport, IATA code, or Skyscanner route code; required when `url` is empty |
| `outboundDate`       | String  | Conditional | -                             | Departure date in `YYYY-MM-DD` format; required when the URL does not contain it             |
| `inboundDate`        | String  | No          | -                             | Return date in `YYYY-MM-DD` format; omit it for a one-way search                             |
| `adults`             | Integer | No          | `1`                           | Adult passengers from 1 to 8                                                                 |
| `cabinClass`         | String  | No          | `economy`                     | `economy`, `premium_economy`, `business`, or `first`                                         |
| `locale`             | String  | No          | `en-US`                       | Locale for names and labels                                                                  |
| `currency`           | String  | No          | `USD`                         | Three-letter fare currency                                                                   |
| `preferDirects`      | Boolean | No          | `false`                       | Keep only itineraries with no stops                                                          |
| `maxStops`           | Integer | No          | -                             | Keep itineraries at or below this total stop count                                           |
| `results_wanted`     | Integer | No          | `20`                          | Maximum unique itineraries to save, up to 5,000                                              |
| `max_pages`          | Integer | No          | `20`                          | Maximum search-update responses to process, up to 100                                        |
| `proxyConfiguration` | Object  | No          | Residential Apify Proxy       | Proxy settings for reliable repeated and production runs                                     |

Provide either `url` or the combination of `origin`, `destination`, and `outboundDate`. Explicit route and date fields take priority when they are supplied alongside a URL.

### Usage Examples

#### Collect 100 flights from a Skyscanner URL

Use a complete search URL to reproduce its route, dates, passengers, and cabin class:

```json
{
    "url": "https://www.skyscanner.com/transport/flights/nyca/dxba/260825/260901/?adultsv2=1&cabinclass=economy&rtn=1",
    "results_wanted": 100,
    "max_pages": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

#### Search by airport codes and dates

Create a round-trip search without copying a URL:

```json
{
    "origin": "JFK",
    "destination": "DXB",
    "outboundDate": "2026-08-25",
    "inboundDate": "2026-09-01",
    "adults": 1,
    "cabinClass": "economy",
    "currency": "USD",
    "results_wanted": 50
}
```

#### Collect direct one-way flights

Omit `inboundDate` and enable the direct-flight filter:

```json
{
    "origin": "LON",
    "destination": "PAR",
    "outboundDate": "2026-09-15",
    "preferDirects": true,
    "maxStops": 0,
    "results_wanted": 25
}
```

### Sample Output

```json
{
    "itineraryId": "12712-2608251120--32348-0-11182-2608260845|11182-2609010955--32348-1-11442-2609012307",
    "price": {
        "raw": 1152.92,
        "formatted": "$1,153"
    },
    "score": 0.699217,
    "stopCount": 1,
    "totalDurationInMinutes": 2077,
    "airlines": [
        { "id": -32348, "name": "Emirates" },
        { "id": -31722, "name": "United" }
    ],
    "flightNumbers": ["204", "235", "6247"],
    "outbound": {
        "origin": { "displayCode": "JFK", "name": "New York John F. Kennedy" },
        "destination": { "displayCode": "DXB", "name": "Dubai" },
        "departure": "2026-08-25T11:20:00",
        "arrival": "2026-08-26T08:45:00",
        "durationInMinutes": 805,
        "stopCount": 0
    },
    "inbound": {
        "origin": { "displayCode": "DXB", "name": "Dubai" },
        "destination": { "displayCode": "EWR", "name": "New York Newark" },
        "departure": "2026-09-01T09:55:00",
        "arrival": "2026-09-01T23:07:00",
        "durationInMinutes": 1272,
        "stopCount": 1
    },
    "sourcePage": 1,
    "origin": "nyca",
    "destination": "dxba",
    "outboundDate": "2026-08-25",
    "inboundDate": "2026-09-01",
    "adults": 1,
    "cabinClass": "economy",
    "market": "US",
    "locale": "en-US",
    "currency": "USD",
    "scrapedAt": "2026-08-20T14:02:29.225Z"
}
```

### Tips for Best Results

- Use a complete Skyscanner URL when you need to reproduce a specific public search.
- Use an airport code for one airport, or a city code or city name to include nearby airports.
- Set `results_wanted` to the number you actually need. The Actor stops as soon as that count is saved.
- Increase `max_pages` when requesting an unusually large dataset or using restrictive stop filters.
- Keep Residential Proxy enabled for scheduled runs and repeated route searches.
- Flight fares and availability change frequently. Use `scrapedAt` to compare snapshots over time.

### Integrations

- **Google Sheets** - Send flight results to a spreadsheet for comparison and reporting.
- **Webhooks** - Notify another service when a route search finishes.
- **Make and Zapier** - Build fare alerts and no-code travel workflows.
- **Apify API** - Start runs and retrieve datasets from your own application.
- **CSV, Excel, JSON, and XML** - Download results in the format used by your analysis tools.
- **Schedules** - Refresh the same route daily, weekly, or at another interval.

### Frequently Asked Questions

#### Does `results_wanted` control how many flights are saved?

Yes. The Actor keeps collecting unique matching itineraries until it saves that number or the search is exhausted. It never intentionally saves more than the requested limit.

#### Why might a run return fewer flights than requested?

The route may publish fewer unique itineraries, a direct-flight or stop filter may remove results, or `max_pages` may stop an unusually large search. The final log reports the saved count and stop reason.

#### Can I collect one-way flights?

Yes. Omit `inboundDate`, or use a Skyscanner URL containing only the outbound travel date.

#### Can I export Skyscanner flight data to CSV or Excel?

Yes. Apify datasets support CSV, Excel, JSON, XML, and other export formats.

#### Can I schedule airfare monitoring?

Yes. Save the input as an Apify task and schedule repeat runs to build price-history snapshots or trigger fare alerts.

#### What happens if a request is temporarily blocked?

The Actor retries with bounded backoff and rotates the configured proxy session. Any flight batches saved before a later failure remain in the dataset.

#### Is it legal to collect Skyscanner flight data?

Collecting public data can be lawful, but requirements vary by jurisdiction and use case. You are responsible for complying with applicable laws, Skyscanner terms, privacy obligations, and contractual restrictions.

### Related Actors

- [Kayak Flights Scraper](https://apify.com/shahidirfan/kayak-flights-scraper)
- [Booking.com Scraper](https://apify.com/shahidirfan/booking-com-scraper)
- [Expedia Hotels Scraper](https://apify.com/shahidirfan/expedia-hotels-scraper)

### Support

For bug reports, route-specific issues, feature requests, or custom flight-data work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is intended for legitimate collection of publicly available flight information. Users are responsible for using the data responsibly and complying with applicable laws, website terms, privacy rules, rate limits, and contractual obligations.

# Actor input Schema

## `url` (type: `string`):

A public Skyscanner flight search URL. Route and dates are read from the URL; explicit filter inputs can refine the request.

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

Origin airport, city, IATA code, or Skyscanner route code. Used when URL is empty.

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

Destination airport, city, IATA code, or Skyscanner route code. Used when URL is empty.

## `outboundDate` (type: `string`):

Departure date in YYYY-MM-DD format. Used when URL is empty or to override the URL date.

## `inboundDate` (type: `string`):

Return date in YYYY-MM-DD format. Leave empty for one-way searches.

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

Number of adult passengers, from 1 to 8.

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

Economy, premium economy, business, or first.

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

Skyscanner locale used for airport names and result labels.

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

Three-letter currency code for prices.

## `preferDirects` (type: `boolean`):

Keep only itineraries with no stops.

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

Optional local filter for the maximum number of stops per itinerary.

## `results_wanted` (type: `integer`):

Maximum unique flight itineraries to save.

## `max_pages` (type: `integer`):

Maximum number of search responses to process. Increase this safety limit for unusually large searches.

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

Use Apify Proxy or custom proxies for reliable production runs and IP rotation.

## Actor input object example

```json
{
  "url": "https://www.skyscanner.com/transport/flights/nyca/dxba/260825/260901/?adultsv2=1&cabinclass=economy&childrenv2=&ref=home&rtn=1&outboundaltsenabled=false&inboundaltsenabled=false&preferdirects=false",
  "adults": 1,
  "cabinClass": "economy",
  "locale": "en-US",
  "currency": "USD",
  "preferDirects": false,
  "results_wanted": 20,
  "max_pages": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "url": "https://www.skyscanner.com/transport/flights/nyca/dxba/260825/260901/?adultsv2=1&cabinclass=economy&childrenv2=&ref=home&rtn=1&outboundaltsenabled=false&inboundaltsenabled=false&preferdirects=false",
    "results_wanted": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/skyscanner-flight-scraper-api").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 = {
    "url": "https://www.skyscanner.com/transport/flights/nyca/dxba/260825/260901/?adultsv2=1&cabinclass=economy&childrenv2=&ref=home&rtn=1&outboundaltsenabled=false&inboundaltsenabled=false&preferdirects=false",
    "results_wanted": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/skyscanner-flight-scraper-api").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 '{
  "url": "https://www.skyscanner.com/transport/flights/nyca/dxba/260825/260901/?adultsv2=1&cabinclass=economy&childrenv2=&ref=home&rtn=1&outboundaltsenabled=false&inboundaltsenabled=false&preferdirects=false",
  "results_wanted": 20
}' |
apify call shahidirfan/skyscanner-flight-scraper-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shahidirfan/skyscanner-flight-scraper-api"
        }
    }
}

```

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/qCiailTeWPwG3s8Gi/builds/IM6zO9HabqmjdPt8b/openapi.json
