Our Google Flights API is the perfect tool for a countless number of use cases.
Monitor flight prices on specific routes over time to power fare-alert tools or identify the cheapest travel windows.
Pull live flight data into your own travel platform or comparison tool without manual scraping or expensive GDS feeds.
Analyse fare trends, airline pricing strategies, and route availability across markets to support travel industry intelligence.
Our customers use Zenserp for a countless number of use cases, at small and large scale.
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"];
Zenserp Google Flights API returns flight itineraries, pricing, and airline details for any route and travel date. For further testing, visit our Playground.
{
"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
}
]
}
]
}
Specify origin and destination using standard IATA airport codes (JFK, LHR, CDG) for precise route targeting.
Retrieve one-way itineraries by omitting return_date, or round-trip results by including it — the same endpoint handles both.
Set the currency parameter to receive all fares in your preferred currency.
Each itinerary includes per-leg data: airline, flight number, departure and arrival times, duration, and stop count.
Add gl and hl to retrieve flight results as they appear to users in a specific country and language.
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.
Need more? Contact us for a custom quote.
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.
Zenserp can return structured Google Flights data, including flight itineraries, prices, airlines, departure and arrival times, airports, flight legs, and durations.
Yes. You can search for flights based on your origin, destination, and travel dates, including domestic and international routes.
Yes. You can use the structured flight data to compare itineraries based on price, airline, departure time, arrival time, duration, and other available details.
Zenserp returns Google Flights results in structured JSON, making it easy to integrate flight data into applications, dashboards, comparison tools, and automated workflows.