SheetSonar

Google Flights IMPORTXML not working: why, and what works

Your IMPORTXML on a Google Flights link returns an error or nothing. It is not your XPath. Copy this line into a cell instead:

=SONAR_FLIGHT("CDG", "JFK", TODAY()+30)

It returns the lowest Google Flights price for that route and date, as a normal cell value. Add a fourth value for a return date; leave it empty for one-way.

Install SheetSonar

After installing: Extensions › SheetSonar › Get a free key (no sign-up, no card), then paste the formula. A new search can take up to a minute (⏳ in the cell meanwhile).

Why IMPORTXML returns nothing

Google Flights builds its results in the browser with JavaScript. IMPORTXML, IMPORTHTML and IMPORTDATA read the page exactly as the server sends it, and never run that JavaScript, so there is no price in what they receive and no XPath can find one. Rewriting the XPath, or trying another link, will not change that.

What else people try

Variations

For a ready-made sheet with one route per row, see the flight price tracker template. To find the cheapest day to leave, see cheapest day to fly.

What it costs

The free plan gives 20 results a month; a result is one route on one date. A price is kept for 3 hours, so asking again within that time is free, and empty or failed searches are free too. Pro gives 1,000 results a month for €9.90. Plans.

Install SheetSonarFlight price tracker

Prices come from Google Flights' public pages at the time of the search and can change before you book. Always check the final price with the airline or on Google Flights.