Google Flights shows price history in its price insights as a graph of daily prices for your trip, next to a typical range. Our API returns that daily history as JSON, 61 or 62 days per trip in one call, so you can keep it and compare routes.
What the history shows
Each /v1/google-flights/search response has data.price_insights, built from Google's own page. It holds price_history, one {date, price} point per day, Google's typical_price_range for the route, and lowest_price today. We make ToolzerHub; the Google Flights API is 1 credit a call with the x-api-key header.
export TOOLZERHUB_API_KEY=your_key
curl -H "x-api-key: $TOOLZERHUB_API_KEY" \
"https://api.toolzerhub.com/v1/google-flights/search?origin=ORD&destination=MIA&departure_date=2026-12-20"
Google's travel tips post gives Chicago to Miami as its example: December fares there are "usually lowest if you book two months in advance". That route is in our data below.
Save the history for a list of trips
The script takes trips as ORIGIN-DEST:date, saves every daily point to a CSV and prints today's price, the low, the high, the median and how often the price moved. Install requests (pip install requests) and save it as price_history.py.
import csv
import os
import statistics
import sys
import time
import requests
URL = "https://api.toolzerhub.com/v1/google-flights/search"
HEADERS = {"x-api-key": os.environ.get("TOOLZERHUB_API_KEY", "")}
def search(origin, destination, date, tries=3):
# Retry rate limits, server errors and dropped connections.
params = {"origin": origin, "destination": destination, "departure_date": date}
for attempt in range(tries):
last = attempt == tries - 1
try:
r = requests.get(URL, headers=HEADERS, params=params, timeout=120)
except requests.RequestException:
if last:
raise
time.sleep(10 * (attempt + 1))
continue
if r.status_code in (429, 500, 502, 503, 504) and not last:
time.sleep(10 * (attempt + 1))
continue
r.raise_for_status()
return r.json()["data"]
def main(trips, out="price_history.csv"):
with open(out, "w", newline="", encoding="utf-8-sig") as f:
writer = csv.writer(f)
writer.writerow(["origin", "destination", "departure_date", "seen_on", "price"])
for trip in filter(None, (t.strip() for t in trips.split(","))):
route, _, date = trip.partition(":")
origin, _, destination = route.upper().partition("-")
insights = (search(origin, destination, date) or {}).get("price_insights") or {}
history = insights.get("price_history") or []
if not history:
print(f"{trip}: no price history")
continue
for point in history:
writer.writerow([origin, destination, date, point["date"], point["price"]])
prices = [p["price"] for p in history]
low, high = insights.get("typical_price_range") or (None, None)
changes = sum(a != b for a, b in zip(prices, prices[1:]))
print(f"{trip}: now {prices[-1]}, low {min(prices)}, high {max(prices)}, "
f"median {statistics.median(prices)} over {len(prices)} days, "
f"{changes} changes, typical {low}-{high}")
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit('usage: python price_history.py "JFK-LAX:2026-12-10,LHR-CDG:2026-12-05" [out.csv]')
if not HEADERS["x-api-key"]:
sys.exit("set TOOLZERHUB_API_KEY first")
main(*sys.argv[1:])
Ten routes over two months
We ran it on 10 trips departing between December and February. It made 10 calls in 20 seconds and saved 614 daily prices.
| Trip | Today | 2-month low | Above low | Days the price moved | Google's typical range |
|---|---|---|---|---|---|
| Toronto to Vancouver | $166 | $106 | 57% | 23 | $55-145 |
| Chicago to Miami | $140 | $91 | 54% | 20 | $50-170 |
| Dubai to London | $359 | $246 | 46% | 13 | $260-710 |
| San Francisco to Tokyo | $484 | $359 | 35% | 9 | $280-475 |
| New York to Los Angeles | $159 | $129 | 23% | 25 | $90-320 |
| Sydney to Melbourne | $96 | $78 | 23% | 17 | $60-125 |
| Singapore to Bangkok | $157 | $129 | 22% | 21 | $130-220 |
| Delhi to Mumbai | $70 | $63 | 11% | 16 | $55-75 |
| Berlin to Barcelona | $117 | $110 | 6% | 17 | $60-200 |
| London to Paris | $87 | $86 | 1% | 8 | $90-185 |
On all 10 trips the fare on the day we checked was above its two-month low, by a median 23%. Lows were short: on 5 trips the low appeared on one day only, and the longest, San Francisco to Tokyo at $359, held for 7 days. Those lows came 34 to 108 days before departure.
On Chicago to Miami, the low of $91 came 61 days before the December 20 flight, and the fare is now 54% higher. Toronto to Vancouver and San Francisco to Tokyo were at their two-month high on the day we checked, both above Google's typical range. London to Paris was the reverse, a dollar off its low and below the typical range.
What it costs
One trip is one call, so checking 10 trips daily is about 300 credits a month and lets you keep the history past the 61 or 62 days one call returns. The 100 free credits a month cover a daily check of 3 trips; $19 buys 10,000 credits that never expire, and plans for higher volume cover more trips. Set your key and your first price history is a CSV in under a minute.
To find the cheapest day in a range, see does Google Flights have an API. For cached fares from another source, see is the Skyscanner API free.
We are not affiliated with Google.