Google Flights Data for Fare Tracking and Price Alerts
To track a flight fare every day, call the Google Flights API once per route with price_insights=true and save four fields: lowest_price, price_level, typical_price_low and typical_price_high. The first answer also returns a price history you can store to backfill. Alert when the level is low, the fare is under your target, or it sits well below the last week of price history the answer returns.
Below: what the fields hold, from one real answer saved on 29 November 2026; a short Python routine that stores each day's result and flags a drop; the limits; and what a daily tracker costs, with the arithmetic. The values are from one JFK to LAX search, not a survey of fares, and the Python is example code.
Short answer: A traveler watching one trip needs one call a day with price_insights=true, an alert on a target price or on price_level low, and about 30 calls a month. A deal site or travel agency watching 20 routes on two travel dates each (40 route-dates, one call each per day) makes 1,200 calls a month: $0.90 on pay as you go with insights at $0.75 per 1K API calls, $0.528 on Enterprise Plus at $0.44 per 1K API calls. A team that only needs the lowest fare for a route can skip insights and pay the plain rate, from $0.60 down to $0.35 per 1K API calls. price_insights=true is billed at the insights rate also when no insights come back for a search.
Fare tracking is mostly bookkeeping. The hard parts are remembering yesterday's fare, deciding what counts as a drop, and not raising an alert on an empty answer. Google Flights already does a version of this for travelers: its help pages describe tracking a route or a flight and getting an email when the price changes significantly. An API lets you do it for your own list of routes, on your own schedule, into your own database.
For what Google Flights data costs from different sellers, see the price comparison. For the three calls that take you from a search to a booking link, see searching Google Flights from Python and Node. The endpoint is described on the Google Flights API page and in the documentation.
What does a price-insights answer hold?
Add price_insights=true to a one-way or round-trip search and the answer carries five extra fields next to the flights list: lowest_price, price_level, typical_price_low, typical_price_high and price_history. This is the answer saved on 29 November 2026 for departure_id=JFK, arrival_id=LAX and outbound_date=2027-01-12, with the flights list and the price history shortened:
{
"success": true,
"departure_id": "JFK",
"arrival_id": "LAX",
"outbound_date": "2027-01-12",
"return_date": "",
"currency": "USD",
"flights": [ … 87 flights, each with airlines, price, stops, segments … ],
"lowest_price": 179,
"price_level": "typical",
"typical_price_low": 70,
"typical_price_high": 215,
"price_history": [
{ "date": "2026-11-25", "price": 179 },
{ "date": "2026-11-26", "price": 179 },
{ "date": "2026-11-27", "price": 179 },
{ "date": "2026-11-28", "price": 179 },
{ "date": "2026-11-29", "price": 179 }
],
"booking_options": []
}
| Field | What it holds | What you do with it | In the saved answer |
|---|---|---|---|
| lowest_price | Lowest price shown for the search, in the answer's currency | The number you store each day | 179 (USD) |
| price_level | low, typical or high; an empty string when not shown | A ready-made alert trigger | typical |
| typical_price_low | Lower end of the usual price range; null when not shown | A "below the usual range" test | 70 |
| typical_price_high | Upper end of the usual price range; null when not shown | Context for how wide the range is | 215 |
| price_history | Daily price history for the route, date and price; an empty list when not shown | Backfills your table on day one | Five entries, 25 to 29 Nov, $179 each (the saved list was shortened for display) |
| flights | The itineraries: airlines, price, stops, legs with flight numbers and times | Which flight sets the lowest price | 87 flights |
The two flights kept in the saved file are both nonstops at $179: JetBlue B6 723, 13:59 to 17:21 local time, and Delta DL 738, 15:20 to 18:35. That matches lowest_price, so the flights list tells you which flight is behind the number. The whole answer took 4.5 seconds, which does not matter for a job that runs once a day.
The history in this sample is flat: $179 on each of the five days. A flat line is a real result, not an error. A tracker should treat it as "no movement yet" and keep storing, because the value of tracking only shows up on the day the line breaks.
What does price_level mean?
price_level is derived: it comes back as low, typical or high depending on where lowest_price sits against the usual range, typical_price_low to typical_price_high. In the saved answer $179 sits inside $70 to $215, so the level is typical. When no range is shown, the level is an empty string, not a guess.
Google describes the same idea on its own side. A 2023 post on its blog says Google Flights shows whether current prices for a search are low, typical or high compared with past averages for the same route. A Google help page says that, for its deal labels, the typical price is the median of the cheapest prices found for the route over the past 12 months, taking into account the time of year, trip length and cabin class. I did not check that the range in the API answer is worked out the same way, so read it as the answer's own idea of usual and keep your own stored history next to it.
One detail from the saved answer matters for alert rules. The usual range runs from $70 to $215, a spread of $145. On a range that wide, a fare would have to fall below $70 to count as under the usual range, so a "below the range" alert would almost never fire on this route. A target price or a drop against the last week of price history the answer returns is the better trigger there.
How do you set up a daily route tracker?
Run one search per route-date per day with price_insights=true, store the result keyed by route and day, and compare each day with what you stored before. The steps:
- Pick routes as airport pairs, each with a travel date. A route-date is
departure_id,arrival_idandoutbound_date, plusreturn_datefor a round trip. Watching two dates for the same airports means two route-dates. Three-letter airport codes only; JFK and EWR are two routes to Los Angeles, not one. - Keep every other parameter fixed. The same number of adults (insights need 1), the same cabin, the same
currencyandcountryevery day. Change one and you start a new series, because the numbers no longer compare. - Make one call per route-date per day. Google's help page says flight prices there are updated approximately once every 24 hours. That is Google Flights' own update rate, and I did not measure how often our answer changes, so a second check of the same route-date on the same day may add nothing. A second call per route is better spent on a second travel date.
- Store what came back. The day you checked,
lowest_price,price_level, the two range ends and the currency. Iflowest_priceis null, log the day as a silent day with empty values and raise no alert: an empty answer is not a price of zero. - Backfill on day one. Save the
price_historyentries before you check the rules, so the weekly comparison can work from the first run when the answer returns five or more earlier days, instead of after a week of waiting. Skip any entry whose price is null. - Check the rules, then alert. Send the route, date, price and which rule fired to e-mail, Slack or a sheet. A booking link needs the extra calls that use the tokens, shown in the Python and Node walkthrough, so make them only for an alert, not in the daily loop. Each of those is one more call at the plain rate, because price insights apply to first searches only: one for a one-way booking link, two for a round trip (the return-flight step, then the booking step).
- Stop when the date passes. Drop a route once its outbound date is behind you, or the tracker pays for answers nobody wants.
The same loop works for any price you watch. If you track rents instead of fares, see Craigslist data for rental price research; for nightly stay prices, Airbnb data for short-term rental pricing.
How do you store the fares and flag a drop in Python?
The routine below makes one call per route, stores the check and the history in SQLite, and prints an alert when a rule fires. It uses the standard sqlite3 and statistics modules and the requests package, and it is example code, run once against the live service on 29 November 2026 for JFK to LAX. The checks table is the daily log, written every day with empty days included; the alert rules read only the history table. Run it once a day from cron or any scheduler.
import datetime
import sqlite3
import statistics
import requests
API = 'https://apiserpent.com/api/google/flights'
KEY = 'YOUR_API_KEY'
ROUTES = [('JFK', 'LAX', '2027-01-12')] # departure, arrival, outbound date
TARGET = 150 # alert when the lowest price is at or under this
db = sqlite3.connect('fares.db')
# checks is the daily log (one row per route per day, empty days included); the rules read only history
db.execute('CREATE TABLE IF NOT EXISTS checks (route TEXT, day TEXT, lowest REAL, level TEXT, '
'typ_low REAL, typ_high REAL, PRIMARY KEY (route, day))')
db.execute('CREATE TABLE IF NOT EXISTS history (route TEXT, day TEXT, price REAL, PRIMARY KEY (route, day))')
def fetch(dep, arr, outbound):
resp = requests.get(API, headers={'X-API-Key': KEY}, timeout=60, params={
'departure_id': dep, 'arrival_id': arr, 'outbound_date': outbound, 'price_insights': 'true'})
resp.raise_for_status()
return resp.json()
def alerts(a, route, today):
low, found = a['lowest_price'], []
if low is None: # no insights came back: nothing to compare, and not a price of zero
return found
if a['price_level'] == 'low':
found.append('price_level is low')
if a['typical_price_low'] is not None and low < a['typical_price_low']:
found.append('below the usual range')
if low <= TARGET:
found.append(f'at or under your target of {TARGET}')
prior = [p for (p,) in db.execute(
'SELECT price FROM history WHERE route=? AND day<? AND price IS NOT NULL '
'ORDER BY day DESC LIMIT 7', (route, today))] # day < today keeps today out of its own comparison
if len(prior) >= 5 and low <= 0.9 * statistics.median(prior):
found.append('10% or more under the last week')
return found
def record(a, today):
route = f"{a['departure_id']}-{a['arrival_id']}-{a['outbound_date']}"
for h in a['price_history']: # store the history first, so day one can already use it
if h['price'] is not None:
db.execute('INSERT OR REPLACE INTO history VALUES (?,?,?)', (route, h['date'], h['price']))
found = alerts(a, route, today)
db.execute('INSERT OR REPLACE INTO checks VALUES (?,?,?,?,?,?)', ( # a silent day is logged too, with NULLs
route, today, a['lowest_price'], a['price_level'], a['typical_price_low'], a['typical_price_high']))
db.commit()
return route, found
if __name__ == '__main__':
today = datetime.date.today().isoformat()
for dep, arr, outbound in ROUTES:
a = fetch(dep, arr, outbound)
route, found = record(a, today)
if a['lowest_price'] is None:
print(route, 'no price returned today')
elif found:
print(route, '->', '; '.join(found))
Four choices in it are worth copying. The history rows are stored before the rules run, and the weekly rule leaves today out (day < today), so a fare is never judged against itself and the rule can already fire on day one.
A null lowest_price raises no alert, and a null price inside price_history is skipped. The weekly rule only runs once five earlier days with a price are stored. And every day is logged, so a silent day shows up as a row with empty values and a line saying no price was returned today.
I ran record() offline against the answers saved on 29 November 2026. On the JFK to LAX insights answer it stored one log row (179, typical, 70, 215) and five history rows, and returned no alerts: the level is typical, $179 is above $70 and above the example target of $150, and with today left out the five saved history entries leave four earlier days, one short of the five the weekly rule needs. On the round-trip answer saved the same day, requested without price_insights, it logged an empty row, stored no history and returned no alerts.
Five synthetic checks, made up and not real fares, exercised the rest. Eight earlier days at $199 and a lowest price of $150 on day one made the weekly rule fire, because $150 is below 90% of $199, which is $179.10; the target was set to $100 so only that rule could fire.
The same case with two null prices among the eight earlier entries still fired on the six usable ones. Five earlier entries that were all null stored nothing and did not fire. A lowest price of $60 fired the below-range and target rules together, and a level changed to low fired the level rule.
Which alert rules are worth using?
Four rules cover most trackers. Start with all four and log which one fired, so you can drop the noisy ones after a few weeks. The level rule and the below-range rule both come from the same comparison of the lowest price with the usual range, so expect them to fire together.
| Rule | Fires when | Good for | Watch out for |
|---|---|---|---|
| Level is low | price_level is low | Hands-off alerts on routes you do not know well | Depends on the answer's usual range; may rarely fire on a route with a wide range |
| Below the usual range | lowest_price is under typical_price_low | A strong, rare signal | On the saved JFK to LAX range ($70 to $215) only a fare under $70 would fire it |
| Target price | lowest_price is at or under your number | Trips with a budget | A target set once goes stale; revisit it as the date nears |
| Drop against last week | 10% or more under the median of the last seven stored days | Any route, including ones with a flat history | Needs five earlier days; a route that never moves never fires |
The target and weekly rules are the two you control, so they are the ones to tune. The level and range rules lean on Google Flights' own idea of usual, which is useful when you do not have a view and unhelpful when you do.
What are the limits of price insights?
Insights cover one-way and round-trip first searches for one adult, and they cannot be combined with max_price or outbound_times. These are the limits to design around:
- Airport codes only.
departure_idandarrival_idtake three-letter airport codes. City codes such as NYC or LON are refused with a clear message, and there is no airport lookup endpoint, so keep your own list. IATA publishes a free airline and airport code search. - Restricted searches get a clear error. Send
price_insights=truewith more than one adult, withmax_priceor withoutbound_timesand the call answers with a clear 400 message; a refused call is not charged. The documentation lists the restrictions: one way or round trip first search, 1 adult, nomax_priceoroutbound_times. - Not every search has insights. When they are not available the five fields keep their empty values, null, an empty string and an empty list, and the answer has the same shape.
- Some flight rows have no price.
priceis null on them, more often in some markets, India for example. If you compute your own minimum from the flights list, skip the nulls. - One series per set of parameters. The answer's
currencyfield tells you what the numbers are in. Store it with every row.
A call that ends in an error or a timeout is not charged. An answer with empty insights fields is a real answer and is billed, at the insights rate when you sent price_insights=true.
What does a daily fare tracker cost?
Each call is one charge, and price_insights=true is an optional add-on of about a quarter. It is billed at the insights rate whenever you send it, also when no insights come back for that search. Per 1K API calls the plain rates are $0.60, $0.52, $0.46, $0.40 and $0.35 across pay as you go, Growth, Scale, Enterprise and Enterprise Plus, and the insights rates are $0.75, $0.65, $0.58, $0.50 and $0.44.
A route-date is one airport pair on one travel date, and the tracker makes one call per route-date per day. Watching one date per route is 30 calls a month: 30 ÷ 1,000 × $0.60 = $0.018 plain, or 30 ÷ 1,000 × $0.75 = $0.0225 with insights, at the pay-as-you-go rate. For 20 routes that is 600 calls, $0.36 plain or $0.45 with insights.
The table and figure price a wider tracker: each route on two travel dates, say the date you want and one a week later. One route is then 2 × 30 = 60 calls a month. At the pay-as-you-go rate, 60 ÷ 1,000 × $0.60 = $0.036 plain; with insights, 60 ÷ 1,000 × $0.75 = $0.045. For 20 routes, 20 × 2 × 30 = 1,200 calls: 1,200 ÷ 1,000 × $0.60 = $0.72 plain and 1,200 ÷ 1,000 × $0.75 = $0.90 with insights.
| Tier | Plain per 1K API calls | With insights per 1K API calls | 1 route, 2 dates, plain (60 calls) | 1 route, 2 dates, with insights | 20 routes, 2 dates, plain (1,200 calls) | 20 routes, 2 dates, with insights |
|---|---|---|---|---|---|---|
| Pay as you go | $0.60 | $0.75 | $0.036 | $0.045 | $0.72 | $0.90 |
| Growth | $0.52 | $0.65 | $0.0312 | $0.039 | $0.624 | $0.78 |
| Scale | $0.46 | $0.58 | $0.0276 | $0.0348 | $0.552 | $0.696 |
| Enterprise | $0.40 | $0.50 | $0.024 | $0.03 | $0.48 | $0.60 |
| Enterprise Plus | $0.35 | $0.44 | $0.021 | $0.0264 | $0.42 | $0.528 |
If only one of the two dates per route needs insights, the other can go at the plain rate. On pay as you go, 20 routes with 600 insights calls and 600 plain calls cost 600 ÷ 1,000 × $0.75 + 600 ÷ 1,000 × $0.60 = $0.45 + $0.36 = $0.81, nine cents less than $0.90 for all 1,200 with insights. Insights are the smaller part of the cost anyway: at every tier the add-on is about a quarter on top of the plain rate.
Pay as you go needs a $10 minimum deposit and no subscription; once your lifetime deposits reach $50, the minimum for any further top-up is $100. At $0.90 a month the 20-route, two-date tracker would use a first $10 deposit for about eleven months.
Growth, Scale, Enterprise and Enterprise Plus are priced by deposit size, from $100 up to $1,250; the pricing page lists them. Flights is eligible for the 10 free calls shared across endpoints, so you can try a route before you add credit. For a comparison with other sellers, see the Google Flights price comparison.
What can make a fare tracker mislead you?
Four things: empty answers read as zero, a changed parameter that starts a new series, a lowest price that is not the fare you can book, and a quiet route that never alerts. Each has a cheap fix.
An empty answer is not a zero
When insights are missing, lowest_price is null. A script that coerces null to 0 will log a fare of zero and fire every "below target" rule. Test for null first, as the routine above does.
A changed parameter is a new series
Switching currency, cabin, or the number of adults changes the numbers. If you must change one, start a new route key rather than appending to the old series, or the weekly median compares unlike things.
The lowest price is not yet a booking
The lowest price is for the search. To see who sells it, a round trip needs the extra calls that use departure_token and booking_token, and a booking option's price covers the flight_numbers listed. When tickets is not empty, the trip is sold as separate tickets and price is their total. Do that only for the alert, as the walkthrough shows.
A quiet route is not a broken tracker
The saved history is flat at $179 for five days. If your tracker alerts only on movement, it will stay silent on such a route, and that is correct. Log the daily check anyway, so you can see later that it ran.
How we checked this
The numbers. Every fare, range and history value comes from one JFK to LAX one-way answer for 12 January 2027 requested with price_insights=true and saved on 29 November 2026. It held 87 flights, and the saved file shortens the flights list and the price history for display. The round-trip statement comes from the round-trip answer saved the same day, requested without price_insights.
The Python. I ran the routine offline against those saved answers, two real and five synthetic cases described above; the routine is example code, run once against the live service on 29 November 2026 for JFK to LAX: it stored one check row (179, typical, 70 to 215) and 62 history rows and printed no alert, as it should, because $179 is above the $150 target and the level was typical. The 10% and seven-day values are my own starting points and were not tuned on a real route history.
Costs. Computed from Serpent's Flights rates per 1K API calls as listed on 29 November 2026; the arithmetic is shown beside each figure.
Sources. Four Google pages (three help pages and one blog post), the IATA location-code page, and the Python documentation for sqlite3, statistics and requests, read 29 November 2026.
What I could not verify:
- Unverified: whether the usual range in the API answer is worked out as Google's help page describes its typical price. I cite Google's description and do not claim a match.
- Unverified: how many days of
price_historyother routes return; the saved list was shortened. - Unverified: how often our answer changes within a day. I did not measure it.
- Unverified: how often insights are available for a given route and date. They vary by search.
- One saved answer is not a fare study. These values describe one search on one day.
Start tracking your first route
Serpent's Google Flights API returns the flights for a route and, with price insights, the lowest price, price level, usual range and price history, from $0.35 per 1K API calls on Enterprise Plus and $0.60 on pay as you go with no subscription. With price insights the rates are $0.44 and $0.75. Try one route on the Google Flights API page first.
Get Your API KeyExplore: Google Flights API · Docs · Pricing · About
FAQ
How do I track a flight price over time with an API?
Call the Google Flights API once a day for each route with price_insights=true, and save the day, lowest_price, price_level and the usual range from every answer. The first answer also returns a price_history list you can store to backfill earlier days. Then alert when price_level is low, when the fare falls under a target you set, or when it sits well under the last week of price history the answer returns.
What do price_level low, typical and high mean?
price_level is derived: it comes back as low, typical or high depending on where lowest_price sits against the usual range given by typical_price_low and typical_price_high. In one saved JFK to LAX answer from 29 November 2026 the lowest price was 179 dollars inside a usual range of 70 to 215 dollars, so the level was typical.
Do price insights cost extra?
Yes, they are an optional add-on of about a quarter. With price_insights=true a call is billed at the insights rate, 0.75 dollars per 1K API calls on pay as you go against 0.60 for a plain search, and that applies also when no insights come back for that search. Without price_insights=true you pay the plain rate.
How much does it cost to track 20 routes every day?
Twenty routes watched on two travel dates each, with one call per route-date per day for 30 days, is 20 x 2 x 30 = 1,200 calls a month; one date per route is 600 calls. With price insights that is 0.90 dollars at the pay-as-you-go rate of 0.75 dollars per 1K API calls and 0.528 dollars at the Enterprise Plus rate of 0.44 dollars per 1K API calls. Without insights it is 0.72 and 0.42 dollars.
Can I track a city such as New York with one code?
No. The Google Flights API takes three-letter airport codes only, and city codes such as NYC or LON are refused with a clear message. There is no airport lookup endpoint, so keep your own list. For a city with several airports, track each airport pair as its own route, for example JFK to LAX and EWR to LAX.
Why are the price insights fields empty?
Either you did not send price_insights=true, or insights are not available for that search. The fields then keep their empty values, null, an empty string and an empty list, and the answer shape does not change. A call with price_insights=true is billed at the insights rate even when no insights come back.
Sources
Google (read 29 Nov 2026):
- Google Travel Help: Track flights & prices
- Google Travel Help: Find plane tickets on Google Flights (prices updated about once every 24 hours)
- Google Travel Help: Find flight deals with AI in Google Flights (how the typical price is determined)
- Google blog: 3 ways to find a great deal with Google Flights (28 Aug 2023)
Standards (read 29 Nov 2026):
Documentation (read 29 Nov 2026):




