# Qatar Airways Flight Scraper (`datascrapers/qatarairways-scraper`) Actor

Search Qatar Airways fares for one-way, round-trip, and multi-city trips. Returns flight offers, fare families, and flexible-date prices with the booking widget filters.

- **URL**: https://apify.com/datascrapers/qatarairways-scraper.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

**Qatar Airways Flight Scraper** creates a structured dataset of flight options collected from Qatar Airways. Each dataset item is one fare on one bound and can include the origin, destination, flight numbers, duration, stops, cabin, fare family, base price, total price, currency, and a booking URL. Query the source with airport codes and a date, a round trip, or multi-city legs. Choose the cabin and passenger counts, and limit results with `maxItems`. Retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, or XML.

[![Qatar Airways Flight Scraper — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/qatarairways-scraper/qatarairways-scraper-value-demo.gif)](https://apify.com/datascrapers/qatarairways-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | Qatar Airways |
| Record unit | One fare on one flight bound |
| Input methods | Airport codes and dates, or `legs` / `trips` |
| Main identifiers | `fareOfferId`, `flightNumbers`, `route` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, RSS |
| Update model | Fresh fares per Actor run |
| Pricing | $2.00 per 1,000 results on the free plan |

### Coverage and available records

The console prefill is Berlin (`BER`) to Islamabad (`ISB`), one way on `2026-12-31`, with a return date of `2027-01-15` available for round trips. `tripType` accepts `one-way`, `round-trip`, and `multi-city`. Cabin is `ECONOMY`, `PREMIUM`, or `FIRST`. `fetchReturnFlights` defaults to true. `includeFlexibleDates` defaults to false.

`maxItems` at `0` means no cap. A stored sample is a premium multi-city leg from Berlin to Doha, nonstop QR84, 5h 40m, with two fares on the same flights and one one-stop itinerary. The Actor collects public fares. It does not create a booking.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| recordType | string | yes | flight or calendar row | flight |
| tripType | string | yes | Search trip type | multi-city |
| bound | string | yes | Which leg this row belongs to | leg-1 |
| legNumber | number | yes | Leg index | 1 |
| origin | string | yes | Origin IATA | BER |
| destination | string | yes | Destination IATA | DOH |
| originCity | string | yes | Origin city | Berlin |
| destinationCity | string | yes | Destination city | Doha |
| departureDate | string | yes | Departure date | 2026-12-31 |
| returnDate | string | yes | Return date when the search has one | null |
| cabinClass | string | yes | Requested cabin | PREMIUM |
| duration | string | yes | Duration label | 5h 40m |
| durationSeconds | number | yes | Duration in seconds | 20400 |
| stops | number | yes | Stop count | 0 |
| arrivalDaysDifference | number | yes | Extra calendar days to arrival | 1 |
| flightNumbers | array | yes | Flight numbers | \["QR84"] |
| airlines | array | yes | Airline names | \["Qatar Airways"] |
| aircraft | array | yes | Aircraft names | \["Boeing 787-8"] |
| route | string | yes | Route label | BER – DOH |
| fareOfferId | string | no | Fare offer id. Use this to deduplicate | BC1-2-OFR-1061307970940911-1-1-1 |
| fareFamily | string | yes | Fare family label | Comfort |
| fareFamilyCode | string | yes | Fare family code | BUSINESS_COMFORT |
| totalPrice | number | yes | Total fare | 1951.78 |
| basePrice | number | yes | Base fare | 1216.0 |
| currency | string | yes | Currency | EUR |
| qsuite | boolean | yes | Qsuite flag | false |
| isLowestFare | boolean | yes | Lowest fare flag on that search | true |
| bookingUrl | string | yes | Link into the airline search | null |
| segments | array | yes | Segment objects | \[] |

Deduplicate on `fareOfferId`. The same flights can appear once per fare family.

### Example dataset record

```json
{
  "recordType": "flight",
  "tripType": "multi-city",
  "bound": "leg-1",
  "legNumber": 1,
  "origin": "BER",
  "destination": "DOH",
  "originCity": "Berlin",
  "destinationCity": "Doha",
  "departureDate": "2026-12-31",
  "cabinClass": "PREMIUM",
  "duration": "5h 40m",
  "durationSeconds": 20400,
  "stops": 0,
  "arrivalDaysDifference": 1,
  "flightNumbers": ["QR84"],
  "airlines": ["Qatar Airways"],
  "aircraft": ["Boeing 787-8"],
  "route": "BER – DOH",
  "fareOfferId": "BC1-2-OFR-1061307970940911-1-1-1",
  "fareFamily": "Comfort",
  "fareFamilyCode": "BUSINESS_COMFORT",
  "totalPrice": 1951.78,
  "basePrice": 1216.0,
  "currency": "EUR",
  "qsuite": false,
  "isLowestFare": true
}
```

This record is a stored premium fare from Berlin to Doha. The same QR84 flight also has a second stored total of 3084.78 EUR.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| tripType | string | no | one-way | one-way, round-trip, multi-city | Trip type |
| origin | string | no | none | IATA | Prefill is `BER` |
| destination | string | no | none | IATA | Prefill is `ISB` |
| departureDate | string | no | none | YYYY-MM-DD | Prefill is `2026-12-31` |
| returnDate | string | no | none | YYYY-MM-DD | Prefill is `2027-01-15` |
| legs | array | no | none | leg objects | Multi-city legs |
| cabinClass | string | no | ECONOMY | ECONOMY, PREMIUM, FIRST | Cabin |
| adults | integer | no | 1 | count | Adults |
| children | integer | no | 0 | count | Children |
| infants | integer | no | 0 | count | Infants |
| teenagers | integer | no | 0 | count | Teenagers |
| overseasFilipinoWorkers | integer | no | 0 | count | OFW count |
| currency | string | no | none | currency code | Requested currency |
| promoCode | string | no | none | code | Promo code |
| includeFlexibleDates | boolean | no | false | true, false | Also collect flexible dates |
| flexibility | integer | no | 7 | days | Flexible window |
| flexibleDateSpanDays | integer | no | 60 | days | Span for flexible dates |
| fetchReturnFlights | boolean | no | true | true, false | Include the return bound |
| directFlightsOnly | boolean | no | false | true, false | Nonstop only |
| maxStops | integer | no | none | integer | Maximum stops |
| language | string | no | en | language code | Language |
| trips | array | no | \[] | trip objects | Extra trips |
| maxItems | integer | no | 0 | 0 or a positive integer | Cap. 0 means no cap |
| proxyConfiguration | object | no | Apify residential | Apify proxy object | Proxy used for the request |

Minimal request:

```json
{
  "origin": "BER",
  "destination": "DOH",
  "departureDate": "2026-12-31",
  "tripType": "one-way",
  "maxItems": 5
}
```

### Retrieve the data through the API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/qatarairways-scraper").call(
    run_input={
        "origin": "BER",
        "destination": "DOH",
        "departureDate": "2026-12-31",
        "tripType": "one-way",
        "maxItems": 5,
    }
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["fareOfferId"], item["flightNumbers"], item["totalPrice"])
```

### Data quality and record handling

Each saved row charges `dataset-item`, whether it is a flight fare or a flexible-date row. The same flight number can appear more than once when two fare families are returned. `totalPrice` and `basePrice` are numbers. Deduplicate on `fareOfferId`. A later run can return a new offer id and a new price.

### Pricing and cost examples

Platform usage is included. One `dataset-item` charge is created for each saved row.

| Plan | Price per result | 1,000 results |
|---|---:|---:|
| Free | $0.002 | $2.00 |
| Bronze | $0.0019 | $1.90 |
| Silver | $0.0018 | $1.80 |
| Gold, Platinum, Diamond | $0.0017 | $1.70 |

### Limitations and responsible data use

Fares and seat counts change up to departure. A row is the offer at run time, not a ticket. Flexible-date rows are a different record shape from a booked itinerary. This is not a historical archive unless you store the dataset yourself. Use the records in line with the airline's terms.

### Dataset questions

#### What does one dataset item represent?

One Qatar Airways fare on one bound, or one flexible-date row when that option is on.

#### Which field should I use as a unique identifier?

Use `fareOfferId` for a fare. Keep `flightNumbers` with the departure date when you compare flights across runs.

#### Are fields nullable or conditional?

`returnDate` is null on a one-way leg. Flexible-date searches add calendar rows beside flight rows.

#### Can I retrieve the records as CSV or JSON?

Yes. Export the dataset as JSON, CSV, Excel, XML, or RSS, or read it from the Dataset API.

#### What counts as a billable result?

Each saved flight fare or calendar row charges one `dataset-item` event.

### Related datasets from Data Scrapers

- [Turkish Airlines Flight Scraper](https://apify.com/datascrapers/turkishairlines-scraper) for Turkish Airlines itineraries.
- [Ryanair Flight Scraper](https://apify.com/datascrapers/ryanair-scraper) for Ryanair availability and prices.
- [Skyscanner Scraper](https://apify.com/datascrapers/skyscanner-scraper) for fares across airlines.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.

# Actor input Schema

## `tripType` (type: `string`):

One-way, round-trip, or multi-city. Ignored when trips is set.

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

Departure airport IATA code, for example BER.

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

Arrival airport IATA code, for example ISB.

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

Outbound departure date in YYYY-MM-DD format.

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

Return date in YYYY-MM-DD format. Required for round-trip.

## `legs` (type: `array`):

Required for multi-city. Each leg needs origin, destination, and departureDate. Example: \[{"origin":"BER","destination":"DOH","departureDate":"2026-12-31"},{"origin":"DOH","destination":"ISB","departureDate":"2027-01-02"}].

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

Cabin sent to Qatar Airways. Economy is E, Premium (business) is B, and First is F on the website.

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

Passengers aged 16 and over.

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

Children aged 2 to 11.

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

Infants under 2. Cannot exceed the number of adults.

## `teenagers` (type: `integer`):

Teenagers aged 12 to 15. Qatar Airways only offers this passenger type on some routes.

## `overseasFilipinoWorkers` (type: `integer`):

OFW passengers. Qatar Airways only offers this passenger type on some routes.

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

Optional 3-letter currency code, for example USD or EUR. Leave empty to use the website default for the route.

## `promoCode` (type: `string`):

Optional promotional code. Invalid codes are ignored, matching the website.

## `includeFlexibleDates` (type: `boolean`):

Also collect lowest fares on nearby dates, the same window as See more dates / the flexible calendar.

## `flexibility` (type: `integer`):

How many days before and after each calendar anchor to request. The flight page uses 3 and the flexible calendar uses 7.

## `flexibleDateSpanDays` (type: `integer`):

How many days before and after the departure date to cover when See more dates is on.

## `fetchReturnFlights` (type: `boolean`):

For round-trip and multi-city, load the next leg using the cheapest fare from the previous leg. The website does this after you select a fare.

## `directFlightsOnly` (type: `boolean`):

Keep flights with no stops.

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

Optional cap on stops per flight. Leave empty to keep every flight.

## `language` (type: `string`):

Language code for fare labels, for example en.

## `trips` (type: `array`):

Optional list of searches. When this array is not empty it replaces the single trip above. Each object accepts tripType, origin, destination, departureDate, returnDate, legs, cabinClass, adults, children, infants, teenagers, overseasFilipinoWorkers, currency, promoCode, includeFlexibleDates, flexibility, and flexibleDateSpanDays.

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

Maximum fare and calendar records to save. 0 means no limit.

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

Residential proxy used for the search. Leave the default unless you have a reason to change it.

## Actor input object example

```json
{
  "tripType": "one-way",
  "origin": "BER",
  "destination": "ISB",
  "departureDate": "2026-12-31",
  "returnDate": "2027-01-15",
  "legs": [],
  "cabinClass": "ECONOMY",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "teenagers": 0,
  "overseasFilipinoWorkers": 0,
  "includeFlexibleDates": false,
  "flexibility": 7,
  "flexibleDateSpanDays": 60,
  "fetchReturnFlights": true,
  "directFlightsOnly": false,
  "language": "en",
  "trips": [],
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset of flight offers and calendar prices.

## `runStats` (type: `string`):

Record count and run timestamps.

# 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 = {
    "origin": "BER",
    "destination": "ISB",
    "departureDate": "2026-12-31",
    "returnDate": "2027-01-15",
    "legs": [],
    "trips": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/qatarairways-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 = {
    "origin": "BER",
    "destination": "ISB",
    "departureDate": "2026-12-31",
    "returnDate": "2027-01-15",
    "legs": [],
    "trips": [],
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/qatarairways-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 '{
  "origin": "BER",
  "destination": "ISB",
  "departureDate": "2026-12-31",
  "returnDate": "2027-01-15",
  "legs": [],
  "trips": []
}' |
apify call datascrapers/qatarairways-scraper --silent --output-dataset

```

## MCP server setup

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