Scrape flight prices with our Google Flights API

Our Google Flights API retrieves flight itineraries, prices, airlines, and leg details directly from Google Flights for any route and travel date. Sign up for our free plan to get started.

JFK → LHR
$589total
British Airways · BA178
7h 05m Nonstop
→
FLIGHTS JSON
USD 589 0 stops
Use cases

Plenty of use cases

Our Google Flights API is the perfect tool for a countless number of use cases.

①

Fare Tracking and Alerts

Monitor flight prices on specific routes over time to power fare-alert tools or identify the cheapest travel windows.

②

Travel Aggregation

Pull live flight data into your own travel platform or comparison tool without manual scraping or expensive GDS feeds.

③

Market Research

Analyse fare trends, airline pricing strategies, and route availability across markets to support travel industry intelligence.

④

Many More...

Our customers use Zenserp for a countless number of use cases, at small and large scale.

Example use cases

The following examples should give you an idea of what you can achieve with our Google Flights API. For further details, visit our Playground and our Documentation.

curl -X GET -G \
    'https://app.zenserp.com/api/v2/search' \
    -H "apikey: your-apikey" \
    -d "departure_id=JFK" \
    -d "arrival_id=LHR" \
    -d "tbm=flights" \
    -d "outbound_date=2026-09-01" \
    -d "currency=USD"

# Set tbm=flights and provide IATA airport codes
# outbound_date format: YYYY-MM-DD
import requests

headers = {"apikey": "your-apikey"}
params = {
    "departure_id": "JFK",
    "arrival_id": "LHR",
    "tbm": "flights",
    "outbound_date": "2026-09-01",
    "currency": "USD",
}

response = requests.get(
    "https://app.zenserp.com/api/v2/search",
    headers=headers,
    params=params,
)
data = response.json()

for f in data["flights"]:
    print(f["price"], f["currency"], f["total_duration"])
const axios = require("axios");

axios.get("https://app.zenserp.com/api/v2/search", {
  headers: { apikey: "your-apikey" },
  params: {
    departure_id: "JFK",
    arrival_id: "LHR",
    tbm: "flights",
    outbound_date: "2026-09-01",
    currency: "USD",
  },
}).then(({ data }) => {
  data.flights.forEach((f) => console.log(f.price, f.currency, f.total_duration));
});
<?php
$params = http_build_query([
    "departure_id" => "JFK",
    "arrival_id" => "LHR",
    "tbm" => "flights",
    "outbound_date" => "2026-09-01",
    "currency" => "USD",
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, "https://app.zenserp.com/api/v2/search?" . $params);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["apikey: your-apikey"]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

foreach ($data["flights"] as $f) {
    echo $f["price"] . " " . $f["currency"] . " " . $f["total_duration"] . PHP_EOL;
}
curl -X GET -G \
    'https://app.zenserp.com/api/v2/search' \
    -H "apikey: your-apikey" \
    -d "departure_id=JFK" \
    -d "arrival_id=LHR" \
    -d "tbm=flights" \
    -d "outbound_date=2026-09-01" \
    -d "return_date=2026-09-08" \
    -d "currency=USD"

# Add return_date for round-trip itineraries
# Omit return_date for one-way results
import requests

headers = {"apikey": "your-apikey"}
params = {
    "departure_id": "JFK",
    "arrival_id": "LHR",
    "tbm": "flights",
    "outbound_date": "2026-09-01",
    "return_date": "2026-09-08",
    "currency": "USD",
}

data = requests.get(
    "https://app.zenserp.com/api/v2/search",
    headers=headers,
    params=params,
).json()

cheapest = min(data["flights"], key=lambda f: f["price"])
print(cheapest["price"], cheapest["currency"])
const axios = require("axios");

axios.get("https://app.zenserp.com/api/v2/search", {
  headers: { apikey: "your-apikey" },
  params: {
    departure_id: "JFK",
    arrival_id: "LHR",
    tbm: "flights",
    outbound_date: "2026-09-01",
    return_date: "2026-09-08",
    currency: "USD",
  },
}).then(({ data }) => {
  const cheapest = data.flights.reduce((a, b) => (a.price < b.price ? a : b));
  console.log(cheapest.price, cheapest.currency);
});
<?php
$params = http_build_query([
    "departure_id" => "JFK",
    "arrival_id" => "LHR",
    "tbm" => "flights",
    "outbound_date" => "2026-09-01",
    "return_date" => "2026-09-08",
    "currency" => "USD",
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, "https://app.zenserp.com/api/v2/search?" . $params);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["apikey: your-apikey"]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

usort($data["flights"], fn($a, $b) => $a["price"] <=> $b["price"]);
echo $data["flights"][0]["price"] . " " . $data["flights"][0]["currency"];

Try Zenserp complete and easy-to-use Google Flights API

Zenserp Google Flights API returns flight itineraries, pricing, and airline details for any route and travel date. For further testing, visit our Playground.

Sample JSON response
{
  "query": { "departure_id": "JFK", "arrival_id": "LHR", "tbm": "flights", "outbound_date": "2026-09-01" },
  "flights": [
    {
      "price": 589,
      "currency": "USD",
      "total_duration": "7h 05m",
      "legs": [
        {
          "airline": "British Airways",
          "flight_number": "BA178",
          "departure": "JFK 21:30",
          "arrival": "LHR 09:35",
          "duration": "7h 05m",
          "stops": 0
        }
      ]
    },
    {
      "price": 412,
      "currency": "USD",
      "total_duration": "11h 45m",
      "legs": [
        {
          "airline": "Iberia",
          "flight_number": "IB6253",
          "departure": "JFK 18:10",
          "arrival": "MAD 07:25",
          "duration": "7h 15m",
          "stops": 1
        }
      ]
    }
  ]
}
Full coverage

Zenserp covers all available flight features and filters

1

IATA airport codes

Specify origin and destination using standard IATA airport codes (JFK, LHR, CDG) for precise route targeting.

2

One-way and return trips

Retrieve one-way itineraries by omitting return_date, or round-trip results by including it — the same endpoint handles both.

3

Currency selection

Set the currency parameter to receive all fares in your preferred currency.

4

Leg-level detail

Each itinerary includes per-leg data: airline, flight number, departure and arrival times, duration, and stop count.

5

Geolocated searches

Add gl and hl to retrieve flight results as they appear to users in a specific country and language.

Start using our free SERP API today!

Get 50 Free Requests

Simple and Economical pricing

Choose from a variety with different usage limits and features to match the size and scope of your project. All plans include real-time scraping capabilities and 24/7 customer support.

Free

All basic to get started
$0/mo
  • 50 Searches
Try Now

Small

Best for hobby projects
$49.99/mo
  • 25,000 Searches
  • All SERP Types
Try Now

Large

More requests
$299.99/mo
  • 250,000 Searches
  • All SERP Types
  • Batch Endpoint
  • Keyword Search Volume
  • Keyword CPC
  • Bulk Index Checker (GUI)
  • Personal Support
  • Concierge Onboarding
  • Service Level Agreement
  • Google Flights Access
Try Now

Premium

For large SERP projects
$499.99/mo
  • 500,000 Searches
  • All SERP Types
  • Batch Endpoint
  • Keyword Search Volume
  • Keyword CPC
  • Bulk Index Checker (GUI)
  • Personal Support
  • Concierge Onboarding
  • Service Level Agreement
  • Custom Queue
  • Google Flights Access
Try Now

Enterprise

For large SERP projects
$899.99/mo
  • 1,000,000 Searches
  • All SERP Types
  • Batch Endpoint
  • Keyword Search Volume
  • Keyword CPC
  • Bulk Index Checker (GUI)
  • Personal Support
  • Concierge Onboarding
  • Service Level Agreement
  • Custom Queue
  • All features of Premium, 1,000,000 Searches
  • Google Flights Access
Try Now

Need more? Contact us for a custom quote.

Frequently asked questions

Are flight prices real-time?

Yes. Zenserp scrapes Google Flights in real time at the point of request. Prices are dynamic and may change between requests, exactly as they do on Google Flights itself.

What data can I get from the Google Flights API?

Zenserp can return structured Google Flights data, including flight itineraries, prices, airlines, departure and arrival times, airports, flight legs, and durations.

Can I search flights for specific routes and dates?

Yes. You can search for flights based on your origin, destination, and travel dates, including domestic and international routes.

Can I compare flight prices with the API?

Yes. You can use the structured flight data to compare itineraries based on price, airline, departure time, arrival time, duration, and other available details.

What format does the Google Flights API return?

Zenserp returns Google Flights results in structured JSON, making it easy to integrate flight data into applications, dashboards, comparison tools, and automated workflows.