# Kiwi Scraper (`kazadoiyul/kiwi-scraper`) Actor

The Kiwi Scraper is a tool that helps you extract data from kiwi.com website. After entering input, the scraper sends multiple requests to get proper data in the end and the user can get a list of possible travel options.

- **URL**: https://apify.com/kazadoiyul/kiwi-scraper.md
- **Developed by:** [Yuliya Kazadoi](https://apify.com/kazadoiyul) (community)
- **Categories:** Travel, Other
- **Stats:** 75 total users, 3 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.

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 Scraper

### Description

The scraper takes user's input and gets the flight options from the kiwi website for the entered places, dates and
filtering options given.

### Technical details

The scraper uses fetch requests to access the data and extracts the needed fields only.
Further expanding of filtering options and output fields is possible, however, right now the input with
all the possible fields entered will look like that:

```json
{
    "currency": "USD",
    "cabin": 0,
    "checked": 0,
    "stops": "1",
    "cabinClass": "ECONOMY",
    "from": "Prg",
    "to": "New",
    "resultAmt": 11,
    "oneway": false,
    "departure": "2025-08-28",
    "returning": "2025-08-30"
}
```

*Important specification: the returning data is ignored if oneWay is set to true*

**The maximum number of results may vary depending on the location, dates, filtering options
and the final output may contain fewer elements in the end.**

### Output

There are two types of output: dataset that is preview on the Actor's page and OUTPUT.json file that
is containing all the important information about the options. It is tedious for a human to read but can be helpful
for further analysis. Each element in the output file looks like this:

```json
{
    "outbound": {
        "sectorSegments": [
            {
                "segment": {
                    "source": {
                        "station": {
                            "code": "PRG",
                            "city": {
                                "name": "Prague"
                            },
                            "name": "Václav Havel Airport Prague"
                        },
                        "localTime": "2025-08-28T11:15:00"
                    },
                    "destination": {
                        "station": {
                            "code": "VIE",
                            "city": {
                                "name": "Vienna"
                            },
                            "name": "Vienna International Airport"
                        },
                        "localTime": "2025-08-28T12:05:00"
                    },
                    "carrier": {
                        "name": "Austrian Airlines"
                    }
                }
            }
        ],
        "duration": 3000
    },
    "inbound": {
        "sectorSegments": [
            {
                "segment": {
                    "source": {
                        "station": {
                            "code": "VIE",
                            "city": {
                                "name": "Vienna"
                            },
                            "name": "Vienna International Airport"
                        },
                        "localTime": "2025-08-30T21:00:00"
                    },
                    "destination": {
                        "station": {
                            "code": "PRG",
                            "city": {
                                "name": "Prague"
                            },
                            "name": "Václav Havel Airport Prague"
                        },
                        "localTime": "2025-08-30T21:50:00"
                    },
                    "carrier": {
                        "name": "Austrian Airlines"
                    }
                }
            }
        ],
        "duration": 3000
    },
    "price": {
        "amount": "370"
    },
    "priceEur": {
        "amount": "313.923527"
    },
    "duration": 6000,
    "stopover": {
        "nightsCount": 2
    }
}
```

# Actor input Schema

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

Airport/city to depart from

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

Airport/city to arrive to

## `departure` (type: `string`):

Departure date in YYYY-MM-DD format

## `returning` (type: `string`):

Return date in YYYY-MM-DD format

## `oneway` (type: `boolean`):

Is it a one-way ticket

## `resultAmt` (type: `integer`):

Amount of results returned back

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

Select the desired currency for prices.

## `cabin` (type: `integer`):

Amount of cabin baggage(0-1)

## `checked` (type: `integer`):

Amount of checked baggage(0-2)

## `stops` (type: `string`):

Filter flights by the number of stops.

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

Desired class in a plane

## Actor input object example

```json
{
  "from": "Prague",
  "to": "New York",
  "oneway": false,
  "currency": "EUR",
  "cabin": 0,
  "checked": 0,
  "stops": "-1",
  "cabinClass": "ECONOMY"
}
```

# 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("kazadoiyul/kiwi-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("kazadoiyul/kiwi-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 kazadoiyul/kiwi-scraper --silent --output-dataset

```

## MCP server setup

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