# AirAsia Flights Scraper - Pay Per Result (`mscraper/airasia-flights-scraper`) Actor

Get one-way flight offers from AirAsia, including partner airlines, prices, schedules, stops and baggage. Managed browser access is included.

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

## Pricing

from $8.00 / 1,000 flight offers

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

## AirAsia Flights Scraper

Get one-way economy flight offers from AirAsia, including partner airlines and connecting itineraries. Each result includes the price in your chosen currency, airports, local and UTC times, airlines, flight numbers, stops, available seats and baggage information when supplied by AirAsia.

Managed browser access through Zyte is included. You do not need a Zyte account, API key or proxy subscription.

### Search coverage

This Actor captures the **initial search results, up to 30 offers**, including AirAsia recommendations. It does not paginate through every flight advertised on the website. AirAsia can display a higher total, such as 77 flights, while supplying 30 initial offers. The `SEARCH_REPORT` record shows the advertised total when available, captured offers, saved results and stop reason. It never marks this as a guaranteed complete search.

One-way economy searches are supported. Run another search with the airports reversed for a return journey. Results can include partner airlines, connections and self-transfers. Prices and availability are a snapshot of the search, and can change before booking. The Actor does not book tickets.

### Input

```json
{
  "origin": "KUL",
  "destination": "SIN",
  "departureDate": "24/10/2026",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "currency": "EUR",
  "countryCode": "PL",
  "maxResults": 30
}
```

Use three-letter IATA airport codes. Dates accept `DD/MM/YYYY` or `YYYY-MM-DD`; if omitted, the Actor searches 30 days from today. Past dates are rejected. Up to 9 adults and children combined, and one infant per adult, are supported. `maxResults` accepts 1–30. `countryCode` sets the search location.

### API

Start a search and receive the dataset directly:

```bash
curl --request POST \
  'https://api.apify.com/v2/acts/mscraper~airasia-flights-scraper/run-sync-get-dataset-items?timeout=360&memory=256' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"origin":"KUL","destination":"SIN","currency":"EUR","maxResults":30}'
```

For scheduled searches or asynchronous processing, start the Actor via `/v2/acts/mscraper~airasia-flights-scraper/runs`, wait for it to finish, and download its default dataset. The Actor makes up to two browser attempts for an incomplete search. Most searches finish within a minute, but slow searches can take several minutes; use asynchronous runs if your HTTP client has a shorter timeout. JSON, CSV, Excel and other Apify dataset export formats are available.

### Results

Each dataset item represents one flight offer. Key fields:

| Field | Meaning |
| --- | --- |
| `offerId` | Deterministic offer identifier for deduplication within the search |
| `origin`, `destination`, `departureDate` | Requested route and departure date |
| `price`, `currency` | AirAsia's converted offer price for the requested passengers, rounded to 2 decimal places |
| `departureTimeLocal`, `arrivalTimeLocal` | Airport local wall-clock times, without a UTC suffix |
| `departureTimeUtc`, `arrivalTimeUtc` | UTC timestamps supplied by AirAsia |
| `airlines`, `stops`, `durationSeconds` | Itinerary summary |
| `segments` | Flight numbers, airlines, airports, times and transfer information for each segment |
| `seatsAvailable`, `baggage` | Availability and baggage details, or null when unavailable |
| `passengers`, `provider`, `capturedAt`, `searchUrl` | Search context and source |

Empty or blocked pages fail the run instead of being reported as successful searches with zero results. A successful zero-result search requires an explicit no-flights indication or only sold-out offers. Provider credentials and browser session headers are never included in the dataset.

### Pricing

Pay per saved flight offer, with managed browser access included:

| Apify plan tier | Price per 1,000 offers |
| --- | ---: |
| Free / Bronze | $10.00 |
| Silver | $9.00 |
| Gold / Platinum / Diamond | $8.00 |

The Actor start event costs $0.0001 at the default 256 MB memory. At the Free tier, a run with 30 saved offers costs $0.3001 in Actor events. No result event is charged for duplicates, errors or unsaved offers. A startup event can still apply to a failed or empty run. Apify's maximum charge limit caps the number of saved offers; a budget too small for one result skips the provider request.

### Migrating from AirAsia Scraper

This is a separate replacement for the [legacy AirAsia Scraper](https://apify.com/mscraper/airasia-scraper). Change the Actor ID in your integration to `mscraper~airasia-flights-scraper`. The route, date, passenger, currency and country inputs carry over. Legacy `mode: "ONEWAY"` and an empty `returnDate` are accepted; legacy proxy input is ignored because managed access is included. Update your output mapping to the normalized fields documented above.

For help, open an issue on the Actor's Issues tab and include the run URL.

# Actor input Schema

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

Three-letter IATA airport code.

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

Three-letter IATA airport code.

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

DD/MM/YYYY or YYYY-MM-DD. Leave empty to search 30 days from today. One-way economy flights only.

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

At least one adult. At most 9 adults and children combined.

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

Children aged 2-11.

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

Infants under 2. At most one infant per adult.

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

Three-letter currency code used for the returned prices.

## `countryCode` (type: `string`):

Two-letter country code for the managed browser location.

## `maxResults` (type: `integer`):

Returns the initial results only (up to 30 offers, including recommendations). This does not paginate through all flights advertised by AirAsia.

## Actor input object example

```json
{
  "origin": "KUL",
  "destination": "SIN",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "currency": "EUR",
  "countryCode": "PL",
  "maxResults": 30
}
```

# Actor output Schema

## `flights` (type: `string`):

No description

## `report` (type: `string`):

Captured and saved offer counts, advertised total when available, and the reason the search stopped.

# 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": "KUL",
    "destination": "SIN",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "currency": "EUR",
    "countryCode": "PL",
    "maxResults": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("mscraper/airasia-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 = {
    "origin": "KUL",
    "destination": "SIN",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "currency": "EUR",
    "countryCode": "PL",
    "maxResults": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("mscraper/airasia-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 '{
  "origin": "KUL",
  "destination": "SIN",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "currency": "EUR",
  "countryCode": "PL",
  "maxResults": 30
}' |
apify call mscraper/airasia-flights-scraper --silent --output-dataset

```

## MCP server setup

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