# Booking Flights Scraper (`romy/booking-flights-scraper`) Actor

Get flight search results with baggage/fare detail from Booking. Talks directly to Booking.com's own mobile app API, no login or API key needed. Split from the mature, published booking-all-in-one-api for a focused, single-purpose workflow.

- **URL**: https://apify.com/romy/booking-flights-scraper.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 flight chargeds

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?

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 Booking.com Flights Scraper do?

**Booking.com Flights Scraper** searches Booking.com flights round-trip or one-way, with real airline/price/duration data — confirmed live: a real Bangkok-Singapore search returned 956 real results. Free-text origins/destinations are resolved to Booking's internal location id format automatically. Optionally fetches full baggage-policy/fare-rule detail for every offer in one run. Also works as a standalone airport/city lookup.

It talks directly to the same internal API the official [Booking.com](https://www.booking.com/) Android app uses, reverse-engineered by capturing live traffic from a real device — flights is a genuinely separate backend from hotels, confirmed live by opening the app's own Flights tab. No Booking.com account, no API key of your own. This is the flights slice of [Booking.com All-in-One API](https://apify.com/romy/booking-all-in-one-api), split out as its own focused Actor.

### Why use Booking.com Flights Scraper?

- **Real results, confirmed live** — 956 real flights with real airline/price/duration data for a real Bangkok-Singapore search
- **Real multi-region pricing** — the same search with a different `currency` returns genuinely different prices, not a symbol swap
- **Automatic location resolution** — pass plain city/airport names; this Actor resolves them to Booking's internal id format for you
- **Optional full fare-rule detail in the same run** — baggage policy and fare rules, no separate Actor call needed
- **No account needed** — every request works fully anonymously
- **Use cases:** flight price monitoring, travel search products, fare-rule comparison

### Input

| Field                   | Type          | Description                                                                                                                  |
| ----------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `locationQuery`         | string        | If set, this Actor only looks up matching airports/cities and pushes them — no flight search. Leave empty to search flights. |
| `locationType`          | string        | `from` | `to`. Narrows `locationQuery` suggestions by leg.                                                                  |
| `from` / `to`           | string        | Exact resolved id, e.g. `BKK.AIRPORT` / `SIN.CITY`. Skips resolution.                                                        |
| `fromQuery` / `toQuery` | string        | Free-text origin/destination, e.g. `Bangkok`. Resolved automatically (first match). Ignored if `from`/`to` is set.           |
| `departDate`            | string (date) | `YYYY-MM-DD`. Required for a flight search.                                                                                  |
| `returnDate`            | string (date) | `YYYY-MM-DD`. Omit for a one-way search.                                                                                     |
| `adults`                | integer       | Default `1`                                                                                                                  |
| `cabinClass`            | string        | `ECONOMY` | `PREMIUM_ECONOMY` | `BUSINESS` | `FIRST`                                                                      |
| `sort`                  | string        | `BEST` | `CHEAPEST` | `FASTEST`                                                                                            |
| `page`                  | integer       | Default `1`                                                                                                                  |
| `currency`              | string        | Confirmed live to change returned prices.                                                                                    |
| `includeDetail`         | boolean       | Fetch full baggage-policy/fare-rule detail per offer. Default `false`.                                                       |
| `maxItems`              | integer       | Stop once this many offers have been pushed. Default: push every result from the search.                                     |

Example (search):

```json
{
    "fromQuery": "Bangkok",
    "toQuery": "Singapore",
    "departDate": "2026-09-19",
    "returnDate": "2026-09-26",
    "currency": "USD",
    "maxItems": 20
}
```

Example (location lookup only):

```json
{ "locationQuery": "Bangkok", "locationType": "from" }
```

### Output

One dataset row per flight offer (trimmed example):

```json
{
    "token": "d6a1f_H4sIAAAAAAAA...",
    "segments": [
        {
            "departureAirport": { "code": "BKK", "name": "Suvarnabhumi Airport" },
            "arrivalAirport": { "code": "SIN", "name": "Changi Airport" },
            "departureTime": "2026-09-20T10:55:00"
        }
    ],
    "detail": { "...": "full baggage policy/fare rules, only present when includeDetail is true" }
}
```

### Known limitations

- **Location resolution takes the first autocomplete match.** For an ambiguous `fromQuery`/`toQuery`, run a `locationQuery` lookup first and pass the exact `from`/`to` id instead.
- **No cross-search pagination beyond `page`.** This mirrors the parent Actor's own `/flights?page=` parameter — there's no cursor/offset scheme beyond it.
- This is an unofficial, reverse-engineered integration, not affiliated with or endorsed by Booking.com B.V. Behavior may change if Booking.com changes its API.

### Pricing

Pay-per-event: $0.0025 per `flight` result (FREE plan; BRONZE/SILVER/GOLD/PLATINUM/DIAMOND get automatic discounts based on your Apify plan). Location suggestion lookups are not charged.

# Actor input Schema

## `locationQuery` (type: `string`):

If set, this Actor only looks up matching airports/cities and pushes them (no flight search). Leave empty to search flights.

## `locationType` (type: `string`):

Narrows locationQuery suggestions by leg. Only used with locationQuery.

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

Exact id, e.g. "BKK.AIRPORT" or "BKK.CITY". Skips fromQuery resolution.

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

e.g. "SIN.CITY".

## `fromQuery` (type: `string`):

Free-text origin, e.g. "Bangkok". Resolved to an id automatically (first match). Ignored if from is set.

## `toQuery` (type: `string`):

Ignored if to is set.

## `departDate` (type: `string`):

YYYY-MM-DD. Required for a flight search.

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

YYYY-MM-DD. Omit for a one-way search.

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

Adult guests.

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

Cabin class for the flight search.

## `sort` (type: `string`):

Sort order for results.

## `page` (type: `integer`):

Page number to fetch.

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

Confirmed live to change returned prices.

## `includeDetail` (type: `boolean`):

Fetch full baggage policy/fare rules per offer (one extra request per offer).

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

Stop once this many flight offers have been pushed. Leave empty to push every result from the search.

## Actor input object example

```json
{
  "fromQuery": "Bangkok",
  "toQuery": "Singapore",
  "departDate": "2026-10-15",
  "adults": 1,
  "cabinClass": "ECONOMY",
  "sort": "BEST",
  "page": 1,
  "includeDetail": false,
  "maxItems": 5
}
```

# Actor output Schema

## `dataset` (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 = {
    "fromQuery": "Bangkok",
    "toQuery": "Singapore",
    "departDate": "2026-10-15",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/booking-flights-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 = {
    "fromQuery": "Bangkok",
    "toQuery": "Singapore",
    "departDate": "2026-10-15",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("romy/booking-flights-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 '{
  "fromQuery": "Bangkok",
  "toQuery": "Singapore",
  "departDate": "2026-10-15",
  "maxItems": 5
}' |
apify call romy/booking-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/booking-flights-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/MdwLcs391X5epxhsY/builds/FDRyjalZA5gQ033x5/openapi.json
