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

Scrape Kiwi.com flight data with speed and accuracy. Extract routes, fares, airlines, departure and arrival times, durations, stopovers, and flight options for travel research, price monitoring, comparison tools, analytics, and travel datasets.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Kiwi.com Flight Scraper API do?

Kiwi.com Flight Scraper API collects structured flight itineraries from public Kiwi.com search routes. Provide a Kiwi search URL, or enter an origin and destination, and the Actor saves flight prices, carriers, segments, airport details, baggage information, booking options, and search context in an Apify dataset.

It supports return searches, one-way searches, route dates, passenger counts, cabin class, sorting, stop limits, duration limits, result limits, and Apify Proxy settings. Empty, null, and undefined values are omitted from saved records so the dataset stays easier to use in applications and analysis.

### Why use Kiwi.com Flight Scraper API?

- **Flight price research** - Compare current itinerary prices between cities or airports.
- **Travel planning** - Review departure times, arrival times, stopovers, carriers, baggage, and transfer details in one record.
- **Route monitoring** - Schedule repeat runs for selected routes and compare the resulting datasets over time.
- **Structured exports** - Download results as JSON, CSV, Excel, XML, or other Apify-supported formats.
- **Automation-ready workflows** - Connect completed runs to webhooks, Google Sheets, Make, Zapier, or your own service through the Apify API.
- **URL-first setup** - Reuse an existing Kiwi.com search URL without manually copying every route setting.

### What data can you extract from Kiwi.com?

| Data | Description |
|------|-------------|
| `id` and `shareId` | Kiwi itinerary identifiers. |
| `__typename` | Itinerary type, such as `ItineraryReturn` or `ItineraryOneWay`. |
| `price` | Amount, formatted value, and pre-discount price in the requested currency. |
| `priceEur` | Comparable EUR amount when provided by Kiwi. |
| `provider` | Kiwi.com or another available content provider. |
| `outbound` | Outbound journey duration and sector segments. |
| `inbound` | Return journey details for return itineraries. |
| `sector` | Journey details for one-way itineraries. |
| `sectors` | Journey details when a multi-city result is returned by Kiwi. |
| Segment route | Departure and arrival airports, cities, countries, coordinates, and local and UTC times. |
| Segment flight data | Flight number, carrier, operating carrier, cabin class, duration, and technical-stop flag. |
| Layovers | Layover duration, baggage recheck, walking-distance, and transfer information. |
| `bagsInfo` | Included bags and available hand-bag, checked-bag, and personal-item tiers. |
| `bookingOptions` | Booking URL, provider, price, Kiwi product, and disruption treatment. |
| `travelHack` | Self-transfer, virtual interlining, hidden-city, and throwaway-ticket flags when supplied. |
| `duration` | Total itinerary duration in seconds. |
| `pnrCount` and `partnerships` | Reservation and partnership information when available. |
| `search_context` | Resolved route, dates, currency, market, sort order, result count, and source status. |

### How to use the Actor

1. Open Kiwi.com Flight Scraper API in Apify Console.
2. Paste a complete Kiwi.com search URL, or enter both `origin` and `destination`.
3. Add dates and optional passenger, sorting, filtering, and result-limit values.
4. Run the Actor.
5. Open the default dataset to preview, export, or integrate the records.

When a user provides a value, that value takes priority over schema prefills and local development input. `INPUT.json` is only a local run input file and is not used to override values supplied through Apify.

### Input Parameters

All parameters are optional at schema level. You must provide either a valid Kiwi search URL or both an origin and a destination.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | String | No | Schema example URL | Kiwi.com search results URL. Route locations and dates are read from the URL when present. |
| `origin` | String | No | From `url` | City, airport name, airport code, Kiwi location ID, or Kiwi route slug. Overrides the URL origin. |
| `destination` | String | No | From `url` | City, airport name, airport code, Kiwi location ID, or Kiwi route slug. Overrides the URL destination. |
| `date` | String | No | From `url` | Departure date in `YYYY-MM-DD` format. A departure date without `return_date` runs a one-way search. |
| `return_date` | String | No | From `url` | Return date in `YYYY-MM-DD` format. Add it for a return search. |
| `adults` | Integer | No | `1` | Number of adult passengers, from 1 to 9. |
| `children` | Integer | No | `0` | Number of children, from 0 to 8. |
| `infants` | Integer | No | `0` | Number of infants, from 0 to 8. |
| `cabin_class` | String | No | `ECONOMY` | `ECONOMY`, `PREMIUM_ECONOMY`, `BUSINESS`, or `FIRST`. |
| `sort_by` | String | No | `QUALITY` | Kiwi result ordering, including `PRICE`, `DURATION`, `DATE`, and `POPULARITY`. An explicit value overrides `sortBy` in the URL. |
| `currency` | String | No | `usd` | Three-letter display currency such as `usd` or `eur`. |
| `locale` | String | No | `en-US` | Locale used for location matching and formatted values. |
| `market` | String | No | Origin country | Optional two-letter market code. |
| `max_stops` | Integer | No | Source default | Maximum number of stops. Use `0` for nonstop results where available. |
| `max_duration_hours` | Number | No | Source default | Maximum total itinerary duration in hours. |

| `results_wanted` | Integer | No | `20` | Number of itinerary records to save, or the source result count if fewer are available. |
| `max_pages` | Integer | No | Automatic | Optional safety cap for cumulative Kiwi GraphQL pages. If omitted, the Actor derives enough pages from `results_wanted`. There is no schema maximum. |
| `proxyConfiguration` | Object | No | Apify Proxy | Optional Apify Proxy configuration for request reliability. |

### Output Data

The Actor normally saves one dataset record per itinerary. The exact nested fields depend on what Kiwi supplies for that itinerary.

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Itinerary identifier. |
| `__typename` | String | Return or one-way itinerary type. |
| `price` | Object | Requested-currency price data. |
| `priceEur` | Object | EUR comparison price when available. |
| `provider` | Object | Provider identity and content source. |
| `outbound` | Object | Outbound sector and segment data for return itineraries. |
| `inbound` | Object | Inbound sector and segment data for return itineraries. |
| `sector` | Object | Sector and segment data for one-way itineraries. |
| `sectors` | Array | Sectors for multi-city results when returned. |
| `bagsInfo` | Object | Included and optional baggage data. |
| `bookingOptions` | Object | Booking links and associated prices and products. |
| `travelHack` | Object | Travel-hack flags supplied by Kiwi. |
| `duration` | Number | Total duration in seconds. |
| `pnrCount` | Number | Number of reservation records when supplied. |
| `partnerships` | Array | Partnership values when supplied. |
| `search_context` | Object | Input and source metadata for the search. |

Fields with null, undefined, empty-string, empty-array, or empty-object values are left out of the final dataset item.

### Usage Examples

#### Basic URL search

Use an existing Kiwi.com route URL for a return search:

```json
{
  "url": "https://www.kiwi.com/en/search/results/lahore-pakistan/manchester-united-kingdom/",
  "results_wanted": 20
}
```

#### One-way airport search

Provide airport codes and one departure date. Without a return date, the Actor requests one-way itineraries:

```json
{
  "origin": "LHE",
  "destination": "MAN",
  "date": "2026-09-21",
  "sort_by": "PRICE",
  "results_wanted": 5
}
```

#### Return search with dates and passengers

Use explicit dates, passengers, cabin class, and a nonstop preference:

```json
{
  "origin": "Lahore",
  "destination": "Manchester",
  "date": "2026-09-21",
  "return_date": "2026-09-28",
  "adults": 2,
  "children": 1,
  "cabin_class": "ECONOMY",
  "max_stops": 0,
  "currency": "eur",
  "results_wanted": 10
}
```

#### URL with route dates and filters

Kiwi route dates can be read directly from a URL. Additional inputs override matching URL values:

```json
{
  "url": "https://www.kiwi.com/en/search/results/lahore-pakistan/manchester-united-kingdom/2026-09-21/2026-09-28/",
  "sort_by": "DURATION",
  "max_duration_hours": 30,

  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "results_wanted": 20
}
```

### Sample Output

This shortened example shows the normal return-itinerary shape. Real records may contain more segments and additional non-empty fields.

```json
{
  "__typename": "ItineraryReturn",
  "id": "ItineraryReturn:example",
  "shareId": "example-share-id",
  "price": {
    "amount": "496",
    "roundedFormattedValue": "$496",
    "priceBeforeDiscount": "496"
  },
  "priceEur": {
    "amount": "427.94"
  },
  "provider": {
    "id": "ItineraryProvider:KIWI-BASIC",
    "name": "Kiwi.com",
    "code": "KIWI-BASIC",
    "hasHighProbabilityOfPriceChange": false,
    "contentProvider": {
      "code": "KIWI-BASIC"
    }
  },
  "bagsInfo": {
    "includedCheckedBags": 0,
    "includedHandBags": 0,
    "includedPersonalItem": 1,
    "handBagTiers": [
      {
        "tierPrice": {
          "amount": "104.15"
        },
        "bags": [
          {
            "weight": {
              "value": 7
            }
          }
        ]
      }
    ]
  },
  "bookingOptions": {
    "edges": [
      {
        "node": {
          "bookingUrl": "/en/booking/?direct=true&currency=usd",
          "itineraryProvider": {
            "id": "ItineraryProvider:KIWI-BASIC",
            "name": "Kiwi.com",
            "code": "KIWI-BASIC"
          },
          "price": {
            "amount": "496"
          },
          "priceEur": {
            "amount": "427.94"
          },
          "kiwiProduct": "KIWI_BASIC",
          "disruptionTreatment": "CONNECTION_PROTECTION"
        }
      }
    ]
  },
  "travelHack": {
    "isVirtualInterlining": true,
    "isTrueHiddenCity": false,
    "isThrowawayTicket": false
  },
  "duration": 168000,
  "pnrCount": 6,
  "partnerships": [
    "ryanair"
  ],
  "outbound": {
    "id": "Sector:outbound-example",
    "duration": 84600,
    "sectorSegments": [
      {
        "segment": {
          "id": "Segment:example",
          "source": {
            "localTime": "2026-09-21T18:20:00",
            "utcTimeIso": "2026-09-21T13:20:00Z",
            "station": {
              "code": "LHE",
              "name": "Allama Iqbal International",
              "city": {
                "name": "Lahore",
                "slug": "lahore-pakistan"
              },
              "country": {
                "code": "PK"
              }
            }
          },
          "destination": {
            "localTime": "2026-09-22T13:50:00",
            "utcTimeIso": "2026-09-22T12:50:00Z",
            "station": {
              "code": "MAN",
              "name": "Manchester",
              "city": {
                "name": "Manchester",
                "slug": "manchester-united-kingdom"
              },
              "country": {
                "code": "GB"
              }
            }
          },
          "duration": 84600,
          "type": "FLIGHT",
          "code": "3223",
          "carrier": {
            "name": "Ryanair",
            "code": "FR"
          },
          "cabinClass": "ECONOMY"
        }
      }
    ]
  },
  "search_context": {
    "origin": {
      "id": "City:lahore_pk",
      "name": "Lahore",
      "code": "LHE",
      "countryCode": "PK"
    },
    "destination": {
      "id": "City:manchester_gb",
      "name": "Manchester",
      "code": "MAN",
      "countryCode": "GB"
    },
    "departure_date": "2026-09-21",
    "return_date": "2026-09-28",
    "currency": "usd",
    "sort_by": "QUALITY",
    "itineraries_count": 20,
    "has_more_pending": false
  }
}
```

### Tips for best results

- Use a complete public Kiwi.com search URL when you want Kiwi route settings to be reused.
- Use airport codes such as `LHE` and `MAN` when you want an unambiguous airport route.
- Use a departure date without `return_date` for one-way results.
- Use both `date` and `return_date` for a fixed-date return search.
- Start with `results_wanted: 1` or `5` while checking a new route, then increase the limit.
- Use `max_stops: 0` only when nonstop options are important. Some routes may return fewer results or none.
- The Actor requests additional cumulative Kiwi pages when needed, increases the GraphQL result limit, removes duplicate itineraries, and stops when `results_wanted` records are saved or the source ends. Use `max_pages` as an optional safety cap.
- Prices and availability can change after a run. Treat booking URLs and prices as time-sensitive.
- When a field is absent, check whether Kiwi supplied it for that itinerary. The Actor omits empty and null values by design.

### Integrations

- **Apify API** - Read the default dataset or start runs from your application.
- **Webhooks** - Notify another service when a route search finishes.
- **Google Sheets** - Export itinerary data for planning and comparison.
- **Make and Zapier** - Send new datasets into no-code workflows.
- **CSV, Excel, JSON, and XML** - Download data for analysis, reporting, or storage.
- **Scheduled runs** - Refresh selected routes on a recurring schedule in Apify Console.

### Frequently Asked Questions

#### Can I use a Kiwi.com search URL?

Yes. Put the URL in `url`. The Actor reads route slugs and route dates when they are present. Explicit `origin`, `destination`, `date`, and `return_date` values override corresponding URL values.

#### How do I request a one-way flight search?

Provide `date` and leave `return_date` empty. If no date is supplied, the Actor keeps the URL-only search behavior and uses the available Kiwi search result mode.

#### Does the Actor support return searches?

Yes. Provide both `date` and `return_date`, or use a Kiwi URL containing both route dates.

#### Can I search by airport code?

Yes. Airport codes such as `LHE`, `MAN`, `JFK`, and `DXB` are accepted. City names and Kiwi location IDs are also supported.

#### Why did I receive fewer records than requested?

Kiwi may have fewer matching itineraries for the selected dates and filters, or the source may still be preparing more results. The Actor follows Kiwi's cumulative continuation pages when a server token is available, then stops when the source ends or the requested count is reached. The `search_context` object includes the available result count and pending status when supplied.

#### Are null fields included in the dataset?

No. Null, undefined, empty strings, empty arrays, and empty objects are removed recursively before a record is saved.

#### Can I export the dataset to CSV or Excel?

Yes. Apify dataset exports include JSON, CSV, Excel, XML, and other supported formats.

#### Can I run this Actor on a schedule?

Yes. Create an Apify schedule and provide the route and filters you want refreshed.

#### Is the Actor an official Kiwi.com API?

No. It is an independent Apify Actor for collecting publicly available Kiwi.com search results. It is not affiliated with or endorsed by Kiwi.com.

#### Is it legal to collect Kiwi.com flight data?

You are responsible for complying with applicable law, Kiwi.com terms, intellectual-property rights, access restrictions, and any contractual requirements. Use the Actor only for legitimate purposes and respect the source website's rules.

### Related Actors

- [Kayak Flights Scraper](https://apify.com/shahidirfan/kayak-flights-scraper)
- [Skyscanner Flight Scraper API](https://apify.com/shahidirfan/skyscanner-flight-scraper-api)
- [Skiplagged Flight Scraper API](https://apify.com/shahidirfan/skiplagged-flight-scraper-api)

### Support

For a bug report or feature request, use the Issues tab on the Actor page and include the input shape, route pattern, run ID, and a short description of the result. Do not include private credentials, proxy URLs, or booking tokens in a public issue.

### Legal Notice

This Actor is intended for responsible collection of publicly available flight-search data. Kiwi.com names, trademarks, prices, routes, and availability belong to their respective owners. The Actor developer does not guarantee ticket availability, price accuracy, booking completion, or continued availability of any source field. Users are responsible for their own use of the data and for complying with applicable laws and website terms.

# Actor input Schema

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

A Kiwi.com search results URL. Route slugs and dates in the URL are used automatically.

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

Optional city name, airport code, Kiwi location ID, or Kiwi location slug. Overrides the origin in the URL.

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

Optional city name, airport code, Kiwi location ID, or Kiwi location slug. Overrides the destination in the URL.

## `date` (type: `string`):

Optional departure date in YYYY-MM-DD format. Overrides a date in the URL.

## `return_date` (type: `string`):

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

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

Number of adult passengers.

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

Number of children travelling.

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

Number of infants travelling.

## `cabin_class` (type: `string`):

Preferred cabin class.

## `sort_by` (type: `string`):

Ordering used by Kiwi for the returned itineraries.

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

Three-letter output currency code, such as USD or EUR.

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

Kiwi locale used for location matching and formatted values.

## `market` (type: `string`):

Optional two-letter market code. If empty, the origin country is used.

## `max_stops` (type: `integer`):

Optional maximum number of stops.

## `max_duration_hours` (type: `number`):

Optional maximum total itinerary duration.

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

Maximum number of itinerary records to save. The Actor follows cumulative Kiwi pages until this number is reached or the source ends.

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

Optional safety cap for cumulative Kiwi GraphQL pages. If omitted, the Actor derives enough pages from results\_wanted and stops when the source ends.

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

Optional Apify Proxy configuration for reliable requests.

## Actor input object example

```json
{
  "url": "https://www.kiwi.com/en/search/results/lahore-pakistan/manchester-united-kingdom/",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "cabin_class": "ECONOMY",
  "currency": "usd",
  "locale": "en-US",
  "results_wanted": 20,
  "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 = {
    "url": "https://www.kiwi.com/en/search/results/lahore-pakistan/manchester-united-kingdom/",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "cabin_class": "ECONOMY",
    "currency": "usd",
    "locale": "en-US",
    "results_wanted": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/kiwi-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.kiwi.com/en/search/results/lahore-pakistan/manchester-united-kingdom/",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "cabin_class": "ECONOMY",
    "currency": "usd",
    "locale": "en-US",
    "results_wanted": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/kiwi-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.kiwi.com/en/search/results/lahore-pakistan/manchester-united-kingdom/",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "cabin_class": "ECONOMY",
  "currency": "usd",
  "locale": "en-US",
  "results_wanted": 20
}' |
apify call shahidirfan/kiwi-flight-scraper-api --silent --output-dataset

```

## MCP server setup

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