# Ryanair Scraper (`epctex/ryanair-scraper`) Actor

Scrape flights from Ryanair. Crawl and extract flights, prices, availability, and more. Creates a Ryanair API to let you scrape based on round trip, one-way trip, and passenger management (adults, teens, children, infants) options.

- **URL**: https://apify.com/epctex/ryanair-scraper.md
- **Developed by:** [epctex](https://apify.com/epctex) (community)
- **Categories:** Travel, News
- **Stats:** 240 total users, 2 monthly users, 100.0% runs succeeded, 16 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$25.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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

## Actor - Ryanair Scraper

### Ryanair scraper

Since Ryanair doesn't provide a good API, this actor should help you to retrieve data from it.

The Ryanair data scraper supports the following features:

- Scrape round trip - you can scrape a complete round trip with departure and return dates.
- Scrape one-way trip - you can scrape a one way trip by just providing the departure date
- Scrape with multiple people options - You can scrape Ryanair with Adults, Teens, Children, and Infants options

### Bugs, fixes, updates, and changelog

This scraper is under active development. If you have any feature requests you can create an issue from [here](https://github.com/epctex-support/ryanair-scraper/issues).

### Input Parameters

The input of this scraper should be JSON-containing. Possible fields are:

- `mode`: (Required) (String) Mode for the actor. It can be either `ROUND` for Round trip or `ONEWAY` for One-way trips.

- `origin`: (Required) (String) 3-letter destination airport code. Ex: VIE.

- `destination`: (Required) (String) Mode for the actor. It can be either `ROUND` for Round trip or `ONEWAY` for One-way trips.

- `departureDate`: (Required) (String) Date for departure. Should be in the format of `YYYY-MM-DD`. Ex: 2021-02-21.

- `returnDate`: (Optional) (String) Date for return. It is required for Round trips. Should be in the format of `YYYY-MM-DD`. Ex: 2021-02-21.

- `adults`: (Required) (Number) Number of adults that will be included on the flight. The minimum number is 1.

- `teens`: (Optional) (Number) Number of teens (12-15 years old) that will be included on the flight.

- `children`: (Optional) (Number) Number of children (2-11 years old) that will be included on the flight.

- `infants`: (Optional) (Number) Number of teens (Under 2 years old) that will be included on the flight.

- `maxItems`: (Optional) (Number) You can limit scraped items. This should be useful when you search through the big lists or search results.

- `proxy`: (Required) (Proxy Object) Proxy configuration.

This solution requires the use of **Proxy servers**, either your own proxy servers or you can use <a href="https://www.apify.com/docs/proxy">Apify Proxy</a>.

#### Compute Unit Consumption

The actor is optimized to run in a very fast manner and scrape the flights in the most performant way. Therefore, it forefronts all flight result requests. If the actor doesn't block very often it'll scrape 10 flights in 3 seconds with ~0.005-0.01 compute units.

#### Ryanair Scraper Input example

```json
{
    "type": "ROUND",
    "origin": "VIE",
    "destination": "BCN",
    "departureTime": "2021-11-02",
    "returnTime": "2021-11-09",
    "adults": 4,
    "children": 3,
    "infants": 2,
    "teens": 1,
    "requestExtension": {
        "timeoutSecs": 100
    }
}
```

### During the Run

During the run, the actor will output messages letting you know what is going on.
When items are loaded from the page, you should see a message about this event with a loaded item count.

If you provide incorrect input to the actor, it will immediately stop with a failure state and output an explanation of what is wrong.

### Ryanair Export

During the run, the actor stores results into a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node JS/NPM). See the FAQ or <a href="https://www.apify.com/docs/api" target="blank">our API reference</a> to learn more about getting results from this Ryanair actor.

### Scraped Ryanair Flights

The structure of each item in Ryanair flights looks like this:

```json
[
    {
        "Origin": "VIE",
        "Destination": "BCN",
        "Flight duration": "02:20",
        "Flight number": "FR 7350",
        "Price": 19.79,
        "Time departure": "2021-05-02T16:55:00.000",
        "Time arrival": "2021-05-02T19:15:00.000",
        "key": "FR~7350~ ~~VIE~05/02/2021 16:55~BCN~05/02/2021 19:15~~",
        "scrapedAt": "2021-03-16T14:56:12.589Z",
        "regularFare": {
            "fareKey": "M4QWIFT5CMI6W554NIEL57IV6W6IKYDXA4HYK5TOZ3XDXKE5ZIEA2SAQMZI2ZHAVJRZE6PNUMMZ7KMWOLDIQQQ2HHNXOWJLJHJDQHLHLCGLC7XXCR37MU4LSLJKSBC3IISWCP5UWXAKWP2URYKOW6SL6RD5PP5C6G2LVCIRMU52U5OPUZ566RWCNU6MZGWKZO3STLR4N5MEEY",
            "fareClass": "W",
            "fares": [
                {
                    "type": "ADT",
                    "amount": 19.79,
                    "count": 1,
                    "hasDiscount": true,
                    "publishedFare": 19.92,
                    "discountInPercent": 10,
                    "hasPromoDiscount": false,
                    "discountAmount": 0.13,
                    "hasBogof": false
                }
            ]
        },
        "operatedBy": "Buzz"
    },
    {
        "Origin": "BCN",
        "Destination": "VIE",
        "Flight duration": "02:20",
        "Flight number": "FR 7351",
        "Price": 14.44,
        "Time departure": "2021-05-07T19:25:00.000",
        "Time arrival": "2021-05-07T21:45:00.000",
        "key": "FR~7351~ ~~BCN~05/07/2021 19:25~VIE~05/07/2021 21:45~~",
        "scrapedAt": "2021-03-16T14:56:12.589Z",
        "regularFare": {
            "fareKey": "PAZI5RTI7Q6XPJWZ7NWTM2L6ST4EGT5VMEUFJ6XELKMBYO6E32W5J5N7O4Q5CLXR5CGRECNSKTZTI4RKRXUINENX2PFLTWHHXJLAH7T6GXNF4TXMHSLS4XQPUMFFXA2R4HAIMVIEEALOODFNPIWICPXWWWM4NH3WFFECKOB6BG3EM5EO2FZRAG5I74AY26PWUQSTRWRZSY3TS",
            "fareClass": "T",
            "fares": [
                {
                    "type": "ADT",
                    "amount": 14.44,
                    "count": 1,
                    "hasDiscount": true,
                    "publishedFare": 14.63,
                    "discountInPercent": 15,
                    "hasPromoDiscount": false,
                    "discountAmount": 0.19,
                    "hasBogof": false
                }
            ]
        },
        "operatedBy": "Lauda Europe"
    },
    {
        "Origin": "BCN",
        "Destination": "VIE",
        "Flight duration": "02:20",
        "Flight number": "FR 7351",
        "Price": 25.19,
        "Time departure": "2021-05-09T19:50:00.000",
        "Time arrival": "2021-05-09T22:10:00.000",
        "key": "FR~7351~ ~~BCN~05/09/2021 19:50~VIE~05/09/2021 22:10~~",
        "scrapedAt": "2021-03-16T14:56:12.589Z",
        "regularFare": {
            "fareKey": "5DK4JGBZGI3LGJEY7PIPEHFS6AQV5IRPZTGV23N5AMBWJS4ZR22QAPTVTCGN24WMRSPLJGWCHJGIFLZQRXINUUEMCZX4Z5UPWN3RSKZ3R24BNFBGZIKWCFZWXI7IFPO3QDXJPS65E5E4I73IQHMLKGVT7PQ76AJUUPEK33SNLF5NNIMK3M5QCPFUJN3XP6KYFPJX3SC5IYATO",
            "fareClass": "A",
            "fares": [
                {
                    "type": "ADT",
                    "amount": 25.19,
                    "count": 1,
                    "hasDiscount": true,
                    "publishedFare": 25.32,
                    "discountInPercent": 10,
                    "hasPromoDiscount": false,
                    "discountAmount": 0.13,
                    "hasBogof": false
                }
            ]
        },
        "operatedBy": "Buzz"
    }
]
```

### Contact

Please visit us through [epctex.com](https://epctex.com) to see all the products that are available for you. If you are looking for any custom integration or so, please reach out to us through the chat box in [epctex.com](https://epctex.com). In need of support? <business@epctex.com> is at your service.

# Actor input Schema

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

Select if you want to search for Round trip or One way

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

3 letter airport code for origin. You can check the codes from here: https://www.nationsonline.org/oneworld/IATA\_Codes/airport\_code\_list.htm

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

3 letter airport code for destination. You can check the codes from here: https://www.nationsonline.org/oneworld/IATA\_Codes/airport\_code\_list.htm

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

Departure date. Should be in format of YYYY-MM-DD

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

Return date. Should be in format of YYYY-MM-DD. It is only being used for Round trips

## `flexDays` (type: `integer`):

Number of dates before and after departure date. It is being used for getting multiple dates.

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

Number of adults that you want to include to search

## `teens` (type: `integer`):

Number of teens that you want to include to search

## `children` (type: `integer`):

Number of children that you want to include to search

## `infants` (type: `integer`):

Number of infants that you want to include to search

## `maxItems` (type: `integer`):

Maximum number of items that you want as output. Default is all

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "mode": "ROUND",
  "origin": "BER",
  "destination": "BCN",
  "departureDate": "2023-10-10",
  "returnDate": "2023-10-14",
  "flexDays": 2,
  "adults": 1,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# 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": "ROUND",
    "origin": "BER",
    "destination": "BCN",
    "departureDate": "2023-10-10",
    "returnDate": "2023-10-14",
    "flexDays": 2,
    "adults": 1,
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epctex/ryanair-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": "ROUND",
    "origin": "BER",
    "destination": "BCN",
    "departureDate": "2023-10-10",
    "returnDate": "2023-10-14",
    "flexDays": 2,
    "adults": 1,
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/ryanair-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 '{
  "mode": "ROUND",
  "origin": "BER",
  "destination": "BCN",
  "departureDate": "2023-10-10",
  "returnDate": "2023-10-14",
  "flexDays": 2,
  "adults": 1,
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call epctex/ryanair-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/56ofuc7YBASB1uWGK/builds/fVWHEzdsEc3ezkA8N/openapi.json
