# Kiwi.com Flight Scraper (`confidential_gnat/kiwi-flight-scraper`) Actor

Scrapes flight prices and schedules from Kiwi.com, including airline, flight number, departure and arrival airports and times, layovers, total duration, price and a booking link, for one-way and return trips.

- **URL**: https://apify.com/confidential\_gnat/kiwi-flight-scraper.md
- **Developed by:** [ActorFlow](https://apify.com/confidential_gnat) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Kiwi.com Flight Scraper

**Scrape flight prices and schedules from Kiwi.com** for any route and date. This **Kiwi flight scraper** returns the airline, flight number, departure and arrival airports and local times, every layover, total journey time, the price in your chosen currency and a direct **booking link** — for both **one-way and return** trips. Export to JSON, CSV or Excel, or call it as an **API**. Give it a city name or an airport code and a date, press Start.

**Target website:** [kiwi.com](https://www.kiwi.com)

### ✨ Features of this Kiwi.com flight scraper

- **Flight price extraction** — price per itinerary in any currency, plus the EUR equivalent for comparison
- **One-way and return trips** — add a return date and both directions come back in one row
- **Full segment detail** — every leg with its flight number, airline, airports, local and UTC times
- **Layover information** — connection duration and whether baggage must be rechecked
- **Flexible place input** — search by city name (London), IATA airport code (LHR), or Kiwi place id
- **Cabin class and stops filters** — economy through first class, direct-only or up to three stops
- **Passenger mix** — adults, children and infants
- **Sort control** — best, cheapest or shortest first
- **Booking links** — a direct Kiwi booking URL for every itinerary
- **Repeat-run caching** — name a cache project and scheduled runs report only new itineraries
- **No browser required** — runs on plain HTTP requests, which makes it fast and cheap

### 🚀 How to scrape Kiwi.com flights in 5 steps

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Fill in **From**, **To** and (optionally) a **departure date** and **return date**.
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### 💰 Pricing

This actor uses **pay-per-result** billing based on the compute units a run consumes.

- New Apify accounts include **$5 of free monthly credit**.
- It runs on plain HTTP requests rather than a headless browser, so it costs significantly less to run than browser-based flight scrapers.
- Proxies are disabled by default, which keeps runs at their cheapest.

### 🔧 Input configuration

| Field                | Type    | Required | Default                    | Description                                                                              |
| -------------------- | ------- | -------- | -------------------------- | ---------------------------------------------------------------------------------------- |
| `from`               | string  | —        | —                          | Departure place — city name, IATA code or Kiwi place id.                                |
| `to`                 | string  | —        | —                          | Arrival place — city name, IATA code or Kiwi place id.                                  |
| `departureDate`      | string  | —        | today                      | Departure date (YYYY-MM-DD). Defaults to today if left empty.                           |
| `returnDate`         | string  | —        | —                          | Return date (YYYY-MM-DD). Leave empty for a one-way search.                             |
| `maxItems`           | integer | —        | `10`                       | Maximum itineraries returned. `0` returns as many as Kiwi offers.                        |
| `adults`             | integer | —        | `1`                        | Adult passengers (1–9).                                                                  |
| `children`           | integer | —        | `0`                        | Child passengers, 2–11 years.                                                            |
| `infants`            | integer | —        | `0`                        | Infant passengers, under 2 years.                                                        |
| `cabinClass`         | string  | —        | `ECONOMY`                  | `ECONOMY`, `PREMIUM_ECONOMY`, `BUSINESS` or `FIRST_CLASS`.                               |
| `maxStops`           | integer | —        | `2`                        | Maximum stops per direction. `0` means direct flights only.                              |
| `sortBy`             | string  | —        | `QUALITY`                  | `QUALITY` (best), `PRICE` (cheapest) or `DURATION` (shortest).                           |
| `currency`           | string  | —        | `usd`                      | Currency code for prices.                                                                |
| `locale`             | string  | —        | `en`                       | Language for place and airline names.                                                    |
| `cacheProjectName`   | string  | —        | —                          | Name a project to remember itineraries across runs.                                      |
| `proxyConfiguration` | object  | —        | `{"useApifyProxy": false}` | Proxy settings. Off by default.                                                          |

**Supported place formats:**

- City name — `London`, `New York`
- IATA airport code — `LHR`, `JFK`
- Kiwi place id — `City:london_gb`, `Airport:LHR`

### 📦 Kiwi.com flight scraper output data

Each result is a JSON object with the keys `itineraryId`, `searchUrl`, `tripType`, `price`, `currency`, `priceEur`, `bookingUrl`, `totalDurationSeconds`, `outbound`, `inbound`, `departureCode`, `arrivalCode`, `departureLocalTime`, `arrivalLocalTime`, `stops`, `airlines`, plus the `searchFrom`, `searchTo`, `searchDepartureDate` and `searchReturnDate` echoed from your input. The `outbound` and `inbound` objects each carry a `segments` array with one entry per leg. Key fields are repeated at the top level so a flat CSV export is readable without unpacking the nested sectors. The dataset ships with two views: **Overview**, a compact table of route, time, price and stops; and **Full flight details**, which adds every segment and layover.

**Sample output:**

```json
[
    {
        "itineraryId": "ItineraryOneWay:eyJwcm92aWRlcnMiOiJLSVdJIiwicm91dGVfZGF0YSI6IlUyOjI0Mzc6TFROOjE3OTIwNzczMDA6Q0RHOjE3OTIwODIxMDA6ZWNvbm9teTpGYWxzZTo6OlUyIiwicHJpY2UiOiI1NiJ9",
        "searchUrl": "https://www.kiwi.com/en/search/results/london/paris/2026-10-15",
        "tripType": "oneway",
        "price": 56,
        "currency": "USD",
        "priceEur": 48.217378,
        "bookingUrl": "https://www.kiwi.com/en/booking/?direct=true&locale=en&currency=usd&passengers=1…",
        "totalDurationSeconds": 4800,
        "outbound": {
            "durationSeconds": 4800,
            "stops": 0,
            "departureAirport": "Luton",
            "departureCode": "LTN",
            "departureCity": "London",
            "departureLocalTime": "2026-10-15T16:15:00",
            "arrivalAirport": "Charles de Gaulle Airport",
            "arrivalCode": "CDG",
            "arrivalCity": "Paris",
            "arrivalLocalTime": "2026-10-15T18:35:00",
            "airlines": ["easyJet"],
            "segments": [
                {
                    "flightNumber": "U22437",
                    "carrier": "easyJet",
                    "carrierCode": "U2",
                    "operatingCarrier": "easyJet",
                    "cabinClass": "ECONOMY",
                    "durationSeconds": 4800,
                    "departureAirport": "Luton",
                    "departureCode": "LTN",
                    "departureCity": "London",
                    "departureCountry": "United Kingdom",
                    "departureLocalTime": "2026-10-15T16:15:00",
                    "departureUtcTime": "2026-10-15T15:15:00",
                    "arrivalAirport": "Charles de Gaulle Airport",
                    "arrivalCode": "CDG",
                    "arrivalCity": "Paris",
                    "arrivalCountry": "France",
                    "arrivalLocalTime": "2026-10-15T18:35:00",
                    "arrivalUtcTime": "2026-10-15T16:35:00",
                    "layoverSeconds": null,
                    "baggageRecheck": null
                }
            ]
        },
        "inbound": null,
        "departureCode": "LTN",
        "arrivalCode": "CDG",
        "departureLocalTime": "2026-10-15T16:15:00",
        "arrivalLocalTime": "2026-10-15T18:35:00",
        "stops": 0,
        "airlines": ["easyJet"],
        "searchFrom": "London",
        "searchTo": "Paris",
        "searchDepartureDate": "2026-10-15",
        "searchReturnDate": null
    },
    {
        "itineraryId": "ItineraryReturn:eyJwcm92aWRlcnMiOiJLSVdJLUJBU0lDOktJV0kiLCJyb3V0ZV9kYXRhIjoiRUk6MzgxOkxIUjoxNzkzNjEzNjAwOlNOTjoxNzkzNjE5MDAwOmVjb25vbXk6RmFsc2U6OjpFSXxFSToxMTE6U05OOjE3OTM2MzA0MDA6SkZLOjE3OTM2NTgwMDA6ZWNvbm9teTpGYWxzZTo6OkVJfEVJOjExMDpKRks6MTc5NDI2ODIwMDpTTk46MTc5NDI5MTAwMDplY29ub215OkZhbHNlOjo6RUl8RUk6MzgwOlNOTjoxNzk0Mjk3MDAwOkxIUjoxNzk0MzAyMTAwOmVjb25vbXk6RmFsc2U6OjpFSSIsInByaWNlIjoiNTQwIn0=",
        "searchUrl": "https://www.kiwi.com/en/search/results/lhr/jfk/2026-11-02/2026-11-09",
        "tripType": "return",
        "price": 540,
        "currency": "USD",
        "priceEur": 464.953285,
        "bookingUrl": "https://www.kiwi.com/en/booking/?direct=true&locale=en&currency=usd&passengers=1…",
        "totalDurationSeconds": 78300,
        "outbound": {
            "durationSeconds": 44400,
            "stops": 1,
            "departureAirport": "Heathrow",
            "departureCode": "LHR",
            "departureCity": "London",
            "departureLocalTime": "2026-11-02T10:00:00",
            "arrivalAirport": "John F. Kennedy International",
            "arrivalCode": "JFK",
            "arrivalCity": "New York",
            "arrivalLocalTime": "2026-11-02T17:20:00",
            "airlines": ["Aer Lingus"],
            "segments": [
                {
                    "flightNumber": "EI381",
                    "carrier": "Aer Lingus",
                    "carrierCode": "EI",
                    "operatingCarrier": "Aer Lingus",
                    "cabinClass": "ECONOMY",
                    "durationSeconds": 5400,
                    "departureAirport": "Heathrow",
                    "departureCode": "LHR",
                    "departureCity": "London",
                    "departureCountry": "United Kingdom",
                    "departureLocalTime": "2026-11-02T10:00:00",
                    "departureUtcTime": "2026-11-02T10:00:00",
                    "arrivalAirport": "Shannon",
                    "arrivalCode": "SNN",
                    "arrivalCity": "Shannon, County Clare",
                    "arrivalCountry": "Ireland",
                    "arrivalLocalTime": "2026-11-02T11:30:00",
                    "arrivalUtcTime": "2026-11-02T11:30:00",
                    "layoverSeconds": null,
                    "baggageRecheck": null
                },
                {
                    "flightNumber": "EI111",
                    "carrier": "Aer Lingus",
                    "carrierCode": "EI",
                    "operatingCarrier": "Aer Lingus",
                    "cabinClass": "ECONOMY",
                    "durationSeconds": 27600,
                    "departureAirport": "Shannon",
                    "departureCode": "SNN",
                    "departureCity": "Shannon, County Clare",
                    "departureCountry": "Ireland",
                    "departureLocalTime": "2026-11-02T14:40:00",
                    "departureUtcTime": "2026-11-02T14:40:00",
                    "arrivalAirport": "John F. Kennedy International",
                    "arrivalCode": "JFK",
                    "arrivalCity": "New York",
                    "arrivalCountry": "United States",
                    "arrivalLocalTime": "2026-11-02T17:20:00",
                    "arrivalUtcTime": "2026-11-02T22:20:00",
                    "layoverSeconds": 11400,
                    "baggageRecheck": false
                }
            ]
        },
        "inbound": {
            "durationSeconds": 33900,
            "stops": 1,
            "departureAirport": "John F. Kennedy International",
            "departureCode": "JFK",
            "departureCity": "New York",
            "departureLocalTime": "2026-11-09T18:50:00",
            "arrivalAirport": "Heathrow",
            "arrivalCode": "LHR",
            "arrivalCity": "London",
            "arrivalLocalTime": "2026-11-10T09:15:00",
            "airlines": ["Aer Lingus"],
            "segments": [
                {
                    "flightNumber": "EI110",
                    "carrier": "Aer Lingus",
                    "carrierCode": "EI",
                    "operatingCarrier": "Aer Lingus",
                    "cabinClass": "ECONOMY",
                    "durationSeconds": 22800,
                    "departureAirport": "John F. Kennedy International",
                    "departureCode": "JFK",
                    "departureCity": "New York",
                    "departureCountry": "United States",
                    "departureLocalTime": "2026-11-09T18:50:00",
                    "departureUtcTime": "2026-11-09T23:50:00",
                    "arrivalAirport": "Shannon",
                    "arrivalCode": "SNN",
                    "arrivalCity": "Shannon, County Clare",
                    "arrivalCountry": "Ireland",
                    "arrivalLocalTime": "2026-11-10T06:10:00",
                    "arrivalUtcTime": "2026-11-10T06:10:00",
                    "layoverSeconds": null,
                    "baggageRecheck": null
                },
                {
                    "flightNumber": "EI380",
                    "carrier": "Aer Lingus",
                    "carrierCode": "EI",
                    "operatingCarrier": "Aer Lingus",
                    "cabinClass": "ECONOMY",
                    "durationSeconds": 5100,
                    "departureAirport": "Shannon",
                    "departureCode": "SNN",
                    "departureCity": "Shannon, County Clare",
                    "departureCountry": "Ireland",
                    "departureLocalTime": "2026-11-10T07:50:00",
                    "departureUtcTime": "2026-11-10T07:50:00",
                    "arrivalAirport": "Heathrow",
                    "arrivalCode": "LHR",
                    "arrivalCity": "London",
                    "arrivalCountry": "United Kingdom",
                    "arrivalLocalTime": "2026-11-10T09:15:00",
                    "arrivalUtcTime": "2026-11-10T09:15:00",
                    "layoverSeconds": 6000,
                    "baggageRecheck": false
                }
            ]
        },
        "departureCode": "LHR",
        "arrivalCode": "JFK",
        "departureLocalTime": "2026-11-02T10:00:00",
        "arrivalLocalTime": "2026-11-02T17:20:00",
        "stops": 1,
        "airlines": ["Aer Lingus"],
        "searchFrom": "LHR",
        "searchTo": "JFK",
        "searchDepartureDate": "2026-11-02",
        "searchReturnDate": "2026-11-09"
    }
]
```

### 🐍 How to scrape Kiwi.com flights with Python, JavaScript or the API

Run the actor programmatically with the official Apify clients. Replace `<YOUR_API_TOKEN>` with the token from your [Apify Console](https://console.apify.com/account/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("<username>/kiwi-flight-scraper").call(run_input={
    "from": "London",
    "to": "Paris",
    "departureDate": "2026-10-15",
    "maxItems": 10,
    "sortBy": "PRICE",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["departureCode"], item["arrivalCode"], item["price"], item["currency"])
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('<username>/kiwi-flight-scraper').call({
    from: 'London',
    to: 'Paris',
    departureDate: '2026-10-15',
    maxItems: 10,
    sortBy: 'PRICE',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** — start a run and wait for the dataset:

```bash
curl -X POST "https://api.apify.com/v2/acts/<username>~kiwi-flight-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"from": "London", "to": "Paris", "departureDate": "2026-10-15", "maxItems": 10}'
```

### 💡 What you can use Kiwi.com flight data for

- **Price monitoring** — track a route daily and spot when fares drop
- **Fare comparison** — compare airlines and routings for the same journey
- **Travel planning tools** — power a booking site or an internal travel dashboard
- **Corporate travel budgeting** — estimate real costs for planned trips
- **Route analysis** — see which carriers serve a city pair and at what price
- **Alert systems** — combine with a schedule and caching to be notified about new low fares

Travel agencies, price comparison sites, corporate travel managers, data analysts and travel bloggers use this data across travel, hospitality and market research.

### ❓ Frequently asked questions

#### Can I scrape Kiwi.com legally?

This actor only collects flight data that is already publicly visible on Kiwi.com — no login, paywall, or private content is accessed. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn* as precedent). Prices and schedules are facts rather than creative works, but you remain responsible for complying with Kiwi.com's Terms of Service, and you should not present scraped fares as bookable guarantees.

#### Does this scraper handle return flights?

Yes. Add a `returnDate` and the itinerary comes back with both an `outbound` and an `inbound` sector, each with its own segments, times and layovers.

#### Can I search by city instead of airport?

Yes. Type a city name like `London` and the actor resolves it to Kiwi's city id, which searches every airport serving that city — the sample output shows results from Luton, Gatwick and Southend for one London search. Use an IATA code such as `LHR` to pin the search to a single airport.

#### How many flights can I scrape per run?

`maxItems` limits how many itineraries a single run returns. Kiwi caps how many it returns per search, so very large values finish early rather than error.

#### Do I need a proxy to scrape kiwi.com?

No. Kiwi responds reliably without one, which is why proxies are off by default. Enable them if you monitor many routes at high frequency.

#### How do I scrape flight prices with Python?

Install `apify-client`, then call the actor with your `from`/`to`/`departureDate` and iterate the dataset — see the Python example above. Each itinerary comes back as JSON with the key fields flattened for pandas.

#### Can I run this Kiwi flight scraper on a schedule?

Yes, and this is the main use case. Use [Apify Schedules](https://docs.apify.com/platform/schedules) to re-run a route daily, and set `cacheProjectName` so each run reports only itineraries you have not already seen — which turns it into a price-drop alert.

#### What output formats are supported?

JSON, CSV, Excel, XML and RSS, either from the **Output** tab or through the Apify API.

#### What is the cheapest way to search Kiwi.com flights?

Search direct flights only (`maxStops: 0`) or a single cabin class to cut the number of itineraries Kiwi returns, and leave proxies off since Kiwi responds reliably without one. Pay-per-result billing means a smaller, more targeted search also costs less to run.

#### Does this actor find hidden-city or virtual interlining deals?

Yes — Kiwi.com's own search combines flights across airlines and alliances that don't otherwise interline, and this actor returns whatever itineraries Kiwi surfaces for your route and date, including multi-airline combinations.

#### Can I monitor multiple routes or dates at once?

Each run searches one `from`/`to` pair and date combination. To track several routes or a range of dates, schedule the actor once per combination — pair it with `cacheProjectName` so repeat runs only report new itineraries.

### 🔗 Other actors you may find useful

- ✍️ [Astral Codex Ten (ACX) Scraper](https://apify.com/confidential_gnat/astralcodexten-scraper) — Scrape Astral Codex Ten posts and reader comments, with cross-run caching so scheduled runs return only new posts.
- 📰 [Substack Scraper](https://apify.com/confidential_gnat/substack-newsletter-scraper) — Scrape Substack posts by keyword, publication or URL, with comments, sentiment and AI summaries.
- 🍷 [Total Wine Scraper](https://apify.com/confidential_gnat/totalwine-scraper) — Scrape Total Wine & More prices, ratings, reviews and product details from search, category or product pages.
- 🇩🇪 [German Imprint (Impressum) Scraper](https://apify.com/confidential_gnat/german-imprint-scraper) — Find the Impressum page on any German website and extract company details and decision-maker contacts with AI.
- ⭐ [Google Play Store Reviews Scraper](https://apify.com/confidential_gnat/google-play-reviews-scraper) — Scrape Google Play app reviews with rating, author, date, replies and sentiment tagging.
- 📄 [Google Patents Scraper](https://apify.com/confidential_gnat/google-patents-scraper) — Scrape Google Patents by keyword or URL, including inventors, assignee, filing dates and citations.

### 💬 Support & Contact

If you encounter any issues or have questions, please [open an issue](https://apify.com/confidential_gnat/kiwi-flight-scraper/issues/open)

You can also find more of our actors on the [Actor Flow ](https://apify.com/confidential_gnat).

# Actor input Schema

## `from` (type: `string`):

Departure place. A city name (London), an IATA code (LHR) or a Kiwi place id (City:london\_gb).

## `to` (type: `string`):

Arrival place. A city name (Paris), an IATA code (JFK) or a Kiwi place id (City:paris\_fr).

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

Defaults to today if left empty.

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

Leave empty for a one-way search.

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

Maximum number of itineraries to return per route. Set to 0 for as many as Kiwi returns.

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

Number of adult passengers.

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

Number of child passengers (2–11 years).

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

Number of infant passengers (under 2 years).

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

Travel class to search for.

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

Maximum number of stops per direction. 0 returns direct flights only.

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

Which flights to return first.

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

Currency code for prices, for example usd, eur, gbp.

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

Language code for place and airline names.

## `cacheProjectName` (type: `string`):

Optional. Name a project to remember which itineraries have already been returned across runs, so scheduled runs only report new ones.

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

Proxy settings. Kiwi is reachable without a proxy, so proxies are disabled by default to keep runs cheap.

## Actor input object example

```json
{
  "from": "London",
  "to": "Paris",
  "maxItems": 10,
  "adults": 1,
  "children": 0,
  "infants": 0,
  "cabinClass": "ECONOMY",
  "maxStops": 2,
  "sortBy": "QUALITY",
  "currency": "usd",
  "locale": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "from": "London",
    "to": "Paris"
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/kiwi-flight-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 = {
    "from": "London",
    "to": "Paris",
}

# Run the Actor and wait for it to finish
run = client.actor("confidential_gnat/kiwi-flight-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 '{
  "from": "London",
  "to": "Paris"
}' |
apify call confidential_gnat/kiwi-flight-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,confidential_gnat/kiwi-flight-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/78ZHyqRPoL9nVjTmm/builds/WxnDx0sco3ueIBUgg/openapi.json
