# Cheapest Plane Tickets Scraper (`codingfrontend/cheapest-plane-tickets-scraper`) Actor

Compare direct and multi-city route options through public Google Flights search pages when fares are openly exposed.

- **URL**: https://apify.com/codingfrontend/cheapest-plane-tickets-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

### What this Actor does

The Cheapest Plane Tickets Scraper checks [Google Flights](https://www.google.com/travel/flights) for publicly displayed flight fares and the outbound itineraries behind them, including flight segments, airports, schedules, aircraft, cabin amenities, and environmental estimates when published. It can generate searches from airport routes, include one-stop alternatives, or inspect public Google Flights search URLs directly.

Google Flights is a dynamic application. The Actor opens the public search page and expands flight details for selected results; when the browser cannot finish, it retains valid fares exposed in the original public HTML and marks the run as limited. The Actor saves a row only when it can validate a fare and the dataset write succeeds. It does not sign in, use private endpoints, rotate proxies, solve CAPTCHAs, or bypass access controls. Results are observations to review; they do not guarantee current availability or a bookable price.

### Common uses

- Compare direct route searches with one-stop alternatives through selected airports.
- Collect fare observations for a small set of planned routes.
- Check public Google Flights search pages that you already have.

### Run the Actor

1. Open the Actor's **Input** tab.
2. Add airport routes or public Google Flights search URLs. All fields are optional; if you provide no route or URL, the default route is TPE to PRG.
3. Choose a result limit and start the run.
4. Open **Dataset** for saved fare rows. Open **Output summary** for the separate run status record.

### Input

No top-level input field is required. A route object must identify both an origin and a destination, using `origin`/`from` and `destination`/`to`. Malformed route entries and unsupported route-object keys are rejected. Route airport codes should be three-letter IATA codes. Dates are passed to the search as text; ISO dates such as `2026-11-20` are recommended.

#### Route and search settings

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `routes` | Array of strings or objects, max 20 | Optional | None | Search route strings such as `TPE-HKG`, or objects such as `{"origin":"TPE","destination":"HKG"}`. Objects also accept `from`/`to`, `date`/`departureDate`, and `returnDate`; date text is limited to 30 characters. Valid routes take precedence over the top-level `origin` and `destination`. |
| `origin` | Text, 3-letter airport code | Optional | `TPE` | Origin used when there is no valid route object or route string. |
| `destination` | Text, 3-letter airport code | Optional | `PRG` | Destination used with `origin` when there is no valid route. |
| `departureDate` | Text, max 30 characters | Optional | None | Departure-date text for the default origin/destination route. Use a route object's `departureDate` or `date` when supplying `routes`. |
| `returnDate` | Text, max 30 characters | Optional | None | Return-date text for the default origin/destination route. Use a route object's `returnDate` when supplying `routes`. |
| `intermediateAirports` | Array of airport-code text, max 10 | Optional | None | Adds one-stop alternatives through each listed airport to every generated route. A via fare is saved only when its result card confirms one stop at that airport. Codes equal to the route endpoints are skipped. Ignored when search URLs are used. |
| `startUrls` | Array of URLs, max 20 | Optional | None | Inspect public Google Flights URLs directly. When this array contains usable URLs, it takes precedence over generated routes and `urls`. Duplicate URLs are removed. |
| `urls` | Array of URLs, max 20 | Optional | None | Compatibility alias for `startUrls`; used when `startUrls` is omitted. |
| `currency` | Text, 3-letter code | Optional | `USD` | Currency hint used to build generated search URLs. The observed fare currency is taken from the page when it is stated there. |
| `locale` | Text, max 10 characters | Optional | `en` | Language/locale hint used to build generated search URLs. |

#### Result limits

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `maxItems` | Integer, 1–50 | Optional | `10` | Global maximum number of validated flight-result rows to save across all searches. The remaining budget is shared among remaining searches, taking their cheapest exposed cards first. Unsuccessful searches do not use the limit. |
| `maxResults` | Integer, 1–50 | Optional | None | Compatibility alias for `maxItems`. If both are supplied, `maxResults` takes precedence. |

#### Advanced settings (Developer Options)

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `timeoutSecs` | Integer, 5–180 seconds | Optional | `45` | Time budget for each HTTP attempt and, separately, each rendered search including its selected detail panels. HTTP requests can be retried once; browser searches are not retried. |
| `requestTimeoutSecs` | Integer, 5–180 seconds | Optional | None | Compatibility alias for `timeoutSecs`. If both are supplied, `requestTimeoutSecs` takes precedence. |

When `routes` is empty or has no valid entries, the Actor uses `origin` and `destination` (or their defaults). For a generated route, it searches the origin-to-destination itinerary and one option per valid intermediate airport. The baseline search can include connections; it is not a nonstop-only filter. Repeated identical generated searches are deduplicated. A via search saves the cheapest exposed cards showing one stop at the requested airport, within its share of the global result limit; unavailable or unrecognized stop details produce no via row. English (`en`) is recommended for recognizing fare and stop text. If `startUrls` is supplied, usable URLs replace these generated searches. If both URL fields are omitted, `urls` can be used in its place.

#### Example: a small route search

```json
{
  "routes": [
    {
      "origin": "TPE",
      "destination": "PRG",
      "departureDate": "2026-11-20",
      "returnDate": "2026-11-27"
    }
  ],
  "maxItems": 3,
  "currency": "USD"
}
```

#### Example: several routes and one-stop alternatives

```json
{
  "routes": [
    { "origin": "SFO", "destination": "FCO", "date": "2026-12-02" },
    "JFK-LHR"
  ],
  "intermediateAirports": ["KEF", "DUB"],
  "maxItems": 10,
  "locale": "en"
}
```

#### Example: inspect several public search URLs

```json
{
  "startUrls": [
    "https://www.google.com/travel/flights?q=TPE-HKG",
    "https://www.google.com/travel/flights?q=JFK-LHR",
    "https://www.google.com/travel/flights?q=TPE-HKG"
  ],
  "maxItems": 5,
  "timeoutSecs": 30
}
```

Repeated usable URLs are deduplicated before requests. Only HTTPS Google Flights URLs are accepted; unsupported URLs are ignored. A URL-based row includes the search URL, fare, and available source itinerary details. Requested route fields are omitted when the route cannot be determined from the supplied input; actual airports still appear in `itinerary`. The Actor deduplicates repeated cards within a search, but distinct searches can legitimately contain the same flight.

#### Compatibility aliases (Developer Options)

For older inputs, use `urls` in place of `startUrls`, `maxResults` in place of `maxItems`, or `requestTimeoutSecs` in place of `timeoutSecs`. If both URL fields are supplied, `startUrls` takes precedence; if either numeric alias is supplied with its primary field, the alias takes precedence. No proxy, fixture, dummy-data, debug, or diagnostic-output inputs are supported.

### Output

Each dataset row describes a displayed fare and its outbound flight itinerary. The required fields are always present after validation; requested route and date fields are included only when the input identifies them. A round-trip price can cover both directions even though the displayed outbound card supplies only outbound segment details. The Actor does not select a return flight or proceed to booking.

#### Illustrative fare row

The values and search link below are illustrative and are not a verified live result.

```json
{
  "searchUrl": "https://www.google.com/travel/flights?hl=en&curr=USD&q=Flights%20from%20SFO%20to%20JFK%20via%20BOS%20departing%202026-11-20%20returning%202026-11-27",
  "price": 699,
  "currency": "USD",
  "matchedPriceText": "699 US dollars",
  "origin": "SFO",
  "destination": "JFK",
  "via": "BOS",
  "legs": [
    {
      "origin": "SFO",
      "destination": "BOS"
    },
    {
      "origin": "BOS",
      "destination": "JFK"
    }
  ],
  "departureDate": "2026-11-20",
  "returnDate": "2026-11-27",
  "tripType": "round trip",
  "priceIncludesText": "Prices include required taxes + fees for 1 adult. Optional charges and bag fees may apply.",
  "itinerary": {
    "descriptionText": "From 699 US dollars round trip total. 1 stop flight with JetBlue. Leaves San Francisco International Airport at 6:00 AM on Friday, November 20 and arrives at John F. Kennedy International Airport at 7:46 PM on Friday, November 20. Total duration 10 hr 46 min. Layover (1 of 1) is a 3 hr 55 min layover at Boston Logan International Airport in Boston. 0 carry-on bags included. 0 checked bags included.",
    "airlines": [
      {
        "code": "B6",
        "name": "JetBlue",
        "accessibilityUrl": "https://www.jetblue.com/at-the-airport/accessibility-assistance",
        "logoUrl": "https://www.gstatic.com/flights/airline_logos/70px/B6.png"
      }
    ],
    "departure": {
      "airport": {
        "code": "SFO",
        "name": "San Francisco International Airport",
        "city": "San Francisco",
        "latitude": 37.6188889,
        "longitude": -122.37556,
        "countryCode": "US",
        "country": "United States"
      },
      "timeText": "6:00 AM",
      "dateText": "Friday, November 20"
    },
    "arrival": {
      "airport": {
        "code": "JFK",
        "name": "John F. Kennedy International Airport",
        "city": "New York",
        "latitude": 40.6397222,
        "longitude": -73.778889,
        "countryCode": "US",
        "country": "United States"
      },
      "timeText": "7:46 PM",
      "dateText": "Friday, November 20"
    },
    "durationText": "10 hr 46 min",
    "durationMinutes": 646,
    "stopCount": 1,
    "layovers": [
      {
        "airport": {
          "code": "BOS",
          "name": "Boston Logan International Airport",
          "city": "Boston",
          "latitude": 42.3630556,
          "longitude": -71.006389,
          "countryCode": "US",
          "country": "United States"
        },
        "city": "Boston",
        "durationText": "3 hr 55 min",
        "durationMinutes": 235
      }
    ],
    "segments": [
      {
        "origin": {
          "code": "SFO",
          "name": "San Francisco International Airport",
          "city": "San Francisco",
          "latitude": 37.6188889,
          "longitude": -122.37556,
          "countryCode": "US",
          "country": "United States"
        },
        "destination": {
          "code": "BOS",
          "name": "Boston Logan International Airport",
          "city": "Boston",
          "latitude": 42.3630556,
          "longitude": -71.006389,
          "countryCode": "US",
          "country": "United States"
        },
        "departureDate": "2026-11-20",
        "arrivalDate": "2026-11-20",
        "departureTime": "06:00",
        "arrivalTime": "14:31",
        "durationMinutes": 331,
        "airlineCode": "B6",
        "flightNumber": "1834",
        "airline": "JetBlue",
        "aircraft": "Airbus A320",
        "seatPitch": "33 in",
        "cabinClass": "Economy",
        "amenities": [
          "Above average legroom (33 in)",
          "Free Wi-Fi",
          "In-seat power & USB outlets",
          "Live TV",
          "Emissions estimate: 448 kg CO2e",
          "Contrail warming potential: Medium"
        ]
      },
      {
        "origin": {
          "code": "BOS",
          "name": "Boston Logan International Airport",
          "city": "Boston",
          "latitude": 42.3630556,
          "longitude": -71.006389,
          "countryCode": "US",
          "country": "United States"
        },
        "destination": {
          "code": "JFK",
          "name": "John F. Kennedy International Airport",
          "city": "New York",
          "latitude": 40.6397222,
          "longitude": -73.778889,
          "countryCode": "US",
          "country": "United States"
        },
        "departureDate": "2026-11-20",
        "arrivalDate": "2026-11-20",
        "departureTime": "18:26",
        "arrivalTime": "19:46",
        "durationMinutes": 80,
        "airlineCode": "B6",
        "flightNumber": "717",
        "airline": "JetBlue",
        "aircraft": "Airbus A220-300 Passenger",
        "seatPitch": "32 in",
        "cabinClass": "Economy",
        "amenities": [
          "Above average legroom (32 in)",
          "Free Wi-Fi",
          "In-seat power & USB outlets",
          "Live TV",
          "Emissions estimate: 68 kg CO2e",
          "Contrail warming potential: Medium"
        ],
        "delayNotice": "Often delayed by 30+ min"
      }
    ],
    "emissions": {
      "co2eKg": 516,
      "typicalCo2eKg": 359,
      "differencePercent": 44,
      "estimateUrl": "https://www.travelimpactmodel.org/lookup/flight?itinerary=SFO-BOS-B6-1834-20261120,BOS-JFK-B6-717-20261120"
    },
    "baggage": {
      "carryOnIncluded": 0,
      "checkedIncluded": 0,
      "conditionsText": "0 carry-on bags included. 0 checked bags included. Bag fees may apply."
    }
  }
}
```

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `origin` | String | Optional | Requested starting airport. Omitted for URL searches when not known from input. |
| `destination` | String | Optional | Requested destination airport. Omitted for URL searches when not known from input. |
| `via` | String | Optional | Requested intermediate airport, confirmed by the saved fare’s one-stop result card. The return-flight connection is not independently checked. |
| `legs` | Array of objects | Optional | Each object has `origin` and `destination` airport codes for one requested leg. For a via row, the two legs describe the confirmed outbound connection; they are not separate booked tickets. |
| `departureDate` | String | Optional | Requested departure-date text. |
| `returnDate` | String | Optional | Requested return-date text. |
| `searchUrl` | String (URL) | Required | Public Google Flights search page used for this fare observation. |
| `price` | Number | Required | Positive displayed fare amount for this card. Rows are ordered by price within each search, not globally across different searches. |
| `currency` | String | Required | Three-letter currency code associated with the fare. |
| `matchedPriceText` | String | Required | Page text that supported the fare extraction. |

| `tripType` | String | Optional | Source fare basis: `round trip` or `one way`. |
| `priceIncludesText` | String | Optional | Published taxes, fees, passenger count, and optional-charge statement. |
| `itinerary` | Object | Optional | Source-backed outbound itinerary details described below. |

#### Itinerary details

All nested fields are optional and absent when the source does not expose them. Numeric zero is retained only when explicitly published, such as no stops or no included bags. Array entries stay associated with their own flight; they are not separate dataset rows.

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `itinerary.descriptionText` | String | Optional | Complete accessible description of the displayed flight card. |
| `itinerary.airlines` | Array of objects | Optional | Carriers shown for the itinerary. Each entry can have `code`, `name`, `accessibilityUrl` (public assistance page), and `logoUrl` (published airline image). |
| `itinerary.departure`, `itinerary.arrival` | Objects | Optional | Each contains an `airport` object, source `timeText`, and source `dateText`. These describe actual displayed endpoints, rather than requested route labels. |
| `itinerary.durationText` | String | Optional | Displayed total outbound journey duration. |
| `itinerary.durationMinutes` | Integer | Optional | Total duration converted from the displayed hours/minutes. |
| `itinerary.stopCount` | Integer | Optional | Published number of outbound stops; `0` means nonstop. |
| `itinerary.layovers` | Array of objects | Optional | Ordered connections containing `airport`, source `city`, `durationText`, and parsed `durationMinutes`. Nonstop flights omit this array. |
| `itinerary.segments` | Array of objects | Optional | Ordered individual flights, with the fields below. |
| `itinerary.baggage` | Object | Optional | `carryOnIncluded` and `checkedIncluded` are published bag counts; `conditionsText` retains the card’s allowance statement. Missing information is not treated as a free allowance. |
| `itinerary.emissions` | Object | Optional | `co2eKg` and `typicalCo2eKg` are source carbon-dioxide-equivalent estimates in kilograms; `differencePercent` is the source comparison with a typical flight; `estimateUrl` links to its public Travel Impact Model flight lookup. These are estimates, not measured emissions. |

Airport objects appear under endpoints, layovers, and segment origins/destinations. Their fields describe the airport, not the city centre or a guessed passenger address.

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `code` | String | Optional | Source three-letter IATA airport code. |
| `name` | String | Optional | Full source airport name. |
| `city` | String | Optional | City explicitly associated with this airport by the source. |
| `countryCode` | String | Optional | Published two-letter country code. |
| `country` | String | Optional | Published country name. |
| `latitude`, `longitude` | Numbers | Optional | Source airport coordinates in decimal degrees. |

Each `itinerary.segments` entry supports:

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `origin`, `destination` | Airport objects | Optional | Actual segment endpoints with the airport fields above. |
| `departureDate`, `arrivalDate` | Strings (`YYYY-MM-DD`) | Optional | Source calendar dates for this segment; arrival may be on a different day. |
| `departureTime`, `arrivalTime` | Strings (`HH:mm`) | Optional | Local airport times. No UTC offset or timezone is inferred. |
| `durationMinutes` | Integer | Optional | Source flight duration in minutes, excluding the following layover. |
| `airlineCode`, `flightNumber`, `airline` | Strings | Optional | Source carrier code, flight number, and displayed carrier name. Their combination with dates/endpoints identifies the flight; no artificial itinerary ID is added. |
| `aircraft` | String | Optional | Published aircraft type, subject to airline changes. |
| `seatPitch` | String | Optional | Source legroom value with its original unit. |
| `cabinClass` | String | Optional | Cabin shown in the expanded segment detail panel. |
| `amenities` | Array of strings | Optional | Complete published segment amenity list, including Wi-Fi/power/entertainment and segment environmental advisories when shown. |
| `delayNotice` | String | Optional | Published segment delay advisory, when present. |

Only source-published values are saved. Detail panels add cabin and amenity information; if opening one fails, available base fares remain and the run is marked limited. Airline and airport values may be absent if the page’s structured data is unavailable or changes. English (`en`) is recommended; other languages and layouts may not be recognized. The Actor does not currently expand additional result lists, select return flights, inspect sellers or booking pages, or verify seat inventory, refund rules, fare brands, booking URLs, or availability. Public pages can change prices while loading, so each saved fare and its details are read from the same final page. Search-based observations can overlap across separate searches. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Run status and output summary

A run is **SUCCEEDED** when one or more validated fare rows were saved. If a search, optional detail collection, or dataset write fails and the run saves at least one row, it succeeds with limited results and the summary marks `isPartial` as `true`. Reaching `maxItems` is normal completion. A run with no real fare rows—including blocked, empty, unpriced, invalid, or diagnostic-only results—**FAILED** with exit code 1. No dummy rows are added.

The separate **Output summary** link opens the `OUTPUT_SUMMARY` record in the run's default **Key-value store**. The summary has exactly these three fields:

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `status` | String | Required | `SUCCEEDED` when at least one real fare row was saved; otherwise `FAILED`. |
| `itemsStored` | Nonnegative integer | Required | Number of validated fare rows whose dataset writes completed. |
| `isPartial` | Boolean | Required | `true` when collection encountered an issue and one or more fare rows were saved. |

Illustrative summary:

```json
{
  "status": "SUCCEEDED",
  "itemsStored": 3,
  "isPartial": false
}
```

Detailed request failures stay in the run log, separate from both the dataset rows and the compact summary.

### Tips, access, and costs

- Start with one route and a low `maxItems` value. Increase the limit only when the public page returns fare details.
- Use a public Google Flights URL if you need a particular search setup. A URL alone does not guarantee that its fares are present in the returned HTML.
- Recheck taxes, baggage allowances, sellers, itinerary details, availability, and current price with Google Flights and the booking provider before purchasing.
- HTTP requests are bounded and retried at most once. Each rendered search has a separate bounded time budget and uses the same browser session across searches. Provider access boundaries and rate limits are respected; the Actor does not try to bypass them.
- Expanding flight details requires browser time. Apify usage cost depends on run time, storage, and the pricing on your Apify account. Check the Actor's current pricing and your account usage in Apify Console; no fixed price is stated here.
- For help, share the run ID, input shape, and relevant run-log message through the Actor's Apify support channel or the [repository issue tracker](https://github.com/KumarLakshmanan/codingfrontend-actors/issues). Do not include account credentials in an issue.

# Actor input Schema

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

Up to 20 route strings such as TPE-HKG, or route objects with an origin/from and destination/to. Route objects may include departureDate (or date) and returnDate. Valid routes take precedence over origin and destination.

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

Origin airport IATA code used when no valid route is supplied. Defaults to TPE.

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

Destination airport IATA code used when no valid route is supplied. Defaults to PRG.

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

Optional departure-date text for the default origin and destination route. Route-object dates take precedence when routes is supplied.

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

Optional return-date text for the default origin and destination route. Route-object dates take precedence when routes is supplied.

## `intermediateAirports` (type: `array`):

Up to 10 IATA codes. Each code adds a one-stop alternative for every generated route; ignored when public search URLs are supplied.

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

Up to 20 public Google Flights search URLs to inspect directly. When this array contains supported URLs, they take precedence over generated routes and the urls alias.

## `urls` (type: `array`):

Backward-compatible alias for startUrls. Used only when startUrls is omitted.

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

Three-letter currency hint for generated public search URLs. Defaults to USD.

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

Google Flights language/locale hint for generated public search URLs. Defaults to en.

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

Maximum number of validated fare rows saved. Failed or unpriced searches do not use this limit.

## `maxResults` (type: `integer`):

Backward-compatible alias for maxItems. If both fields are supplied, this alias takes precedence.

## `timeoutSecs` (type: `integer`):

Maximum wait for each public provider request. Defaults to 45 seconds.

## `requestTimeoutSecs` (type: `integer`):

Backward-compatible alias for timeoutSecs. If both fields are supplied, this alias takes precedence.

## Actor input object example

```json
{
  "origin": "TPE",
  "destination": "PRG",
  "currency": "USD",
  "locale": "en",
  "maxItems": 10,
  "timeoutSecs": 45
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing validated fare observations.

## `runSummary` (type: `string`):

The OUTPUT_SUMMARY record in the run's default key-value store.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/cheapest-plane-tickets-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/cheapest-plane-tickets-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 '{}' |
apify call codingfrontend/cheapest-plane-tickets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/cheapest-plane-tickets-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/PUmgcZ1QYPBiwFXnT/builds/G0pLRPkQ8V9RUql9M/openapi.json
