# Google Flights API (`kaizu/google-flights-api`) Actor

\[ALMOST FREE FOR LIMITED TIME] The fastest Google Flights API. Real-time prices with direct booking URLs, and price insights. one-way or round-trip, filter by stops/airlines/cabin class. Returns aircraft types, layover details, airport info. 40 currencies.

- **URL**: https://apify.com/kaizu/google-flights-api.md
- **Developed by:** [Tonny](https://apify.com/kaizu) (community)
- **Categories:** Travel, SEO tools, Other
- **Stats:** 20 total users, 0 monthly users, 0.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$0.00003 / run actor

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?

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

## Google Flights Scraper - Real-Time Flight Prices & Calendar

**The most reliable Google Flights API on Apify. Get real-time prices, schedules, and booking links for any route worldwide.**

[![Price per run](https://img.shields.io/badge/price-%240.00003%2Frun-success)](https://apify.com/kaizu/google-flights-api)
[![Response time](https://img.shields.io/badge/response-2--5%20seconds-blue)](https://apify.com/kaizu/google-flights-api)
[![Currencies](https://img.shields.io/badge/currencies-40%2B-orange)](https://apify.com/kaizu/google-flights-api)

***

### Limited Time Offer

**Promotional pricing is now live!**

Run this Actor for just **$0.00003 per execution** — platform usage included for free. That's 500x cheaper than most competitors. This offer won't last long, so take advantage while it lasts.

***

### Why Choose This Scraper?

**⚡ Blazing Fast** — Results in 2-5 seconds (5x faster than competitors)

**🌍 Global Coverage** — 9,000+ airports worldwide, all major airlines

**💰 Best Value** — Only $0.00003 per run (promotional pricing)

**🔗 Direct Booking Links** — Get clickable Google Flights URLs to book instantly

**🌱 Carbon Footprint** — Track CO2 emissions for eco-conscious travel

**📊 Rich Data** — Layover details, aircraft types, price insights, airport info

***

### What You Get

#### For Every Flight Search:

- ✅ **Real-time prices** from Google Flights (not cached)
- ✅ **Direct booking URLs** — Click to book on Google Flights
- ✅ **Complete itineraries** — All legs, layovers, aircraft types
- ✅ **Carbon emissions** — Environmental impact data
- ✅ **Price insights** — "Typical", "Low", or "High" price indicator
- ✅ **Airport details** — Full airport names, cities, countries
- ✅ **37 currencies** — Local pricing for global markets

#### Price Calendar Mode:

Find the cheapest dates across any date range. Perfect for flexible travelers.

***

### Perfect For

| Use Case | How It Helps |
|----------|--------------|
| **Travel Startups** | Power your flight comparison app with real Google data |
| **Price Tracking** | Monitor routes and get alerts when prices drop |
| **Travel Agencies** | Quote accurate prices to customers instantly |
| **Data Science** | Analyze airline pricing patterns & trends |
| **Trip Planning** | Find the cheapest dates to fly with calendar view |
| **Affiliate Sites** | Monetize with direct booking links |

***

### Live Example

**Input:**

```json
{
  "departure_id": "JFK",
  "arrival_id": "LAX",
  "outbound_date": "2026-06-15",
  "adults": 1,
  "currency": "USD"
}
```

**Output (Real Flight):**

```json
{
  "airline": "JetBlue",
  "flightNumber": "B6 1523",
  "departureAirport": "JFK",
  "arrivalAirport": "LAX",
  "departureTime": "15:15",
  "arrivalTime": "18:17",
  "duration": "6 hr 2 min",
  "durationMinutes": 362,
  "price": 169,
  "priceFormatted": "$169",
  "booking_url": "https://www.google.com/travel/flights/booking?tfs=...",
  "carbonEmissions": {
    "totalKg": 145,
    "differencePercent": -12
  },
  "layovers": [],
  "legs": [
    {
      "airline": "JetBlue",
      "flightNumber": "B6 1523",
      "departure": "JFK",
      "arrival": "LAX",
      "departureTime": "15:15",
      "arrivalTime": "18:17",
      "duration": "6 hr 2 min",
      "durationMinutes": 362,
      "aircraft": "Airbus A320"
    }
  ]
}
```

***

### Output Fields Reference

| Field | Description | Example |
|-------|-------------|---------|
| `airline` | Airline name | "JetBlue" |
| `flightNumber` | Full flight number | "B6 1523" |
| `price` | Price in selected currency | 169 |
| `priceFormatted` | Human-readable price | "$169" |
| `booking_url` | Direct booking link | "https://www.google.com/travel/flights/booking?..." |
| `durationMinutes` | Total flight time | 362 |
| `stops` | Number of stops | 0 |
| `layovers` | Stop details with duration | \[{"airport": "AUH", "duration": "2 hr 20 min"}] |
| `carbonEmissions` | CO2 data | {"totalKg": 145, "differencePercent": -12} |
| `legs` | Individual flight segments | See above |
| `isBest` | Google "best" flag | true |

**Bonus:** OUTPUT key-value includes `airports`, `priceInsights`, and `flightsUrl`

***

### How to Use

#### 1. Quick Start (30 seconds)

1. Click **Try for free**
2. Enter airport codes (e.g., JFK → LAX)
3. Set your travel date
4. Click **Start**
5. Download JSON/CSV/Excel

#### 2. Advanced Filters

- **Max stops:** 0 (nonstop) to 3
- **Max price:** Set your budget limit
- **Airlines:** Filter by specific carriers (AA, DL, UA)
- **Cabin class:** Economy to First
- **Currency:** 40+ currencies supported

#### 3. One-Way vs Round-Trip

**One-way flight:** Leave `return_date` empty

```json
{
  "departure_id": "JFK",
  "arrival_id": "LAX",
  "outbound_date": "2026-06-15",
  "return_date": null
}
```

**Round-trip flight:** Add `return_date`

```json
{
  "departure_id": "JFK",
  "arrival_id": "LAX",
  "outbound_date": "2026-06-15",
  "return_date": "2026-06-22"
}
```

#### 4. Price Calendar

Set `type: "calendar"` to find cheapest dates across a range.

***

### Pricing

This Actor's pricing details are outlined in the table below. Visit our [pricing page](https://apify.com/pricing) to compare plans and see how much you can save.

| Pricing | Cost |
|---------|------|
| **Run actor** | |
| One-time event | |
| Just the run of the actor, no matter how many results. | **$0.00003** |
| **Additional costs** | |
| Platform usage | Included |
| Platform usage costs are tied to the Actor's performance in terms of the underlying platform resources it consumes. [Learn more](https://docs.apify.com/platform/actors/running/compute-units) | **Free** |

See all usage prices - we give it almost for free!

***

### Supported Currencies (40+)

USD, EUR, GBP, JPY, CNY, KRW, INR, BRL, CAD, AUD, CHF, SEK, NOK, DKK, PLN, CZK, HUF, TRY, THB, MXN, SGD, HKD, NZD, ZAR, RUB, ILS, AED, SAR, PHP, MYR, IDR, TWD, ARS, CLP, COP, PEN, VND, EGP, NGN, KES

***

### Integrations

**Export to:**

- 📊 Google Sheets
- 📧 Email notifications
- 💬 Slack alerts
- 🔄 Webhooks
- ☁️ Amazon S3
- 🗄️ Any REST API

**Scheduling:**

- Run hourly, daily, or custom intervals
- Get alerts when prices drop
- Monitor competitor routes

***

### Data Reliability

✅ **Real-time data** — Direct from Google Flights (not cached)\
✅ **99%+ uptime** — Enterprise-grade infrastructure\
✅ **Automatic retries** — Handles transient failures\
✅ **Input validation** — Clear error messages\
✅ **Structured output** — Clean JSON, no HTML parsing

***

### Limits

- Max 9 adult passengers per search
- Valid IATA airport codes only (3 letters)
- Future dates only (YYYY-MM-DD format)
- 30-second timeout per request

***

### For Actor Owners (Setting Up This Actor)

**To configure pricing:**

1. Push to Apify: `npx apify push`
2. Go to [Apify Console](https://console.apify.com) → Your Actor
3. Click **"Monetization"** in left sidebar
4. Set **Pay-per-event** pricing:
   - Price: $0.015 per run
   - Event name: "Actor run"
5. Click **Save**

**To set environment variables:**

1. Actor Settings → Environment variables
2. Add secrets:
   - `API_URL` = `https://flights-api.wonderbook.co.il`
   - `API_KEY` = your production API key
3. Mark both as **Secret** (encrypted)

See `DEPLOYMENT.md` for full deployment guide.

***

### Need Help?

- 📖 **Documentation:** Check the OUTPUT tab for each run
- 💬 **Support:** Message via Apify platform
- 🐛 **Issues:** Include your input JSON and error message

***

**Start extracting flight data today. Click "Try for free" →**

# Actor input Schema

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

Choose between flight search or price calendar.

## `departure_id` (type: `string`):

IATA airport code (e.g. JFK, LAX, CDG). For multiple airports, comma-separate: CDG,ORY

## `arrival_id` (type: `string`):

IATA airport code (e.g. LAX, LHR, NRT). For multiple airports, comma-separate: LHR,LGW

## `outbound_date` (type: `string`):

Departure date in YYYY-MM-DD format.

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

Return date for round-trip flights (YYYY-MM-DD). Leave empty for one-way.

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

Number of adult passengers (1-9).

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

Number of child passengers.

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

Number of infant passengers (lap).

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

ISO 4217 currency code for prices.

## `seat` (type: `string`):

Seat/cabin class.

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

Filter by maximum number of stops. 0 = nonstop only. Leave empty for any.

## `max_price` (type: `integer`):

Filter flights above this price. Leave empty for no limit.

## `airlines` (type: `string`):

Comma-separated IATA airline codes (e.g. AA,DL,UA). Leave empty for all airlines.

## `hl` (type: `string`):

Language code for results.

## `gl` (type: `string`):

Country code (affects pricing region).

## Actor input object example

```json
{
  "type": "search",
  "departure_id": "JFK",
  "arrival_id": "LAX",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "currency": "USD",
  "seat": "economy",
  "hl": "en",
  "gl": "us"
}
```

# Actor output Schema

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

Flight search results with prices, schedules, aircraft types, and booking links

## `searchSummary` (type: `string`):

Summary of search results including price insights, airports, and flights URL

# 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 = {
    "departure_id": "JFK",
    "arrival_id": "LAX",
    "outbound_date": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaizu/google-flights-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 = {
    "departure_id": "JFK",
    "arrival_id": "LAX",
    "outbound_date": "",
}

# Run the Actor and wait for it to finish
run = client.actor("kaizu/google-flights-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 '{
  "departure_id": "JFK",
  "arrival_id": "LAX",
  "outbound_date": ""
}' |
apify call kaizu/google-flights-api --silent --output-dataset

```

## MCP server setup

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