Web research6 min readBy Purrkey team

How to explore cheap destinations from one city on Google Flights

Use Google Flights Explore to compare up to 20 destination prices from one departure airport and turn the results into a shortlist table

On this page

You have one departure airport, JFK, and a January trip window, and you need three warm-weather destinations to compare before booking. The deliverable is a shortlist table with one row per returned destination, a fare, dates, duration, stops, airline and a rank you assign. No run has been executed for this article, so the table below is a design, not a result

Example input and shortlist table design

Example input, not a live query. Replace JFK and the dates with your own

FieldExample valueNote
departure_idJFKRequired. Airport code or city location kgmid, with comma-separated airports allowed
outbound_date2027-01-11YYYY-MM-DD
return_date2027-01-18Required for round-trip searches
currencyUSDThree-letter code that defines returned prices
glusTwo-letter country code
hlenLanguage code with optional region

The contract lists departure_id as required. It accepts an airport code such as JFK or a city location kgmid, and comma-separated airports when you want more than one departure point. currency, gl, hl, outbound_date and return_date are the other input fields named in the contract. return_date is required for round-trip searches

The table has these columns. Values here are placeholders showing the shape

destination namedestination_idcountryairlineairline_codeflight_priceflight_durationnumber_of_stopsstart_dateend_dateshortlist_rank
Placeholder A(id)(country)(airline)(code)(number)(minutes)(integer)(YYYY-MM-DD)(YYYY-MM-DD)1
Placeholder B(id)(country)(airline)(code)(number)(minutes)(integer)(YYYY-MM-DD)(YYYY-MM-DD)2

A shortlist rank is your column, not a contract output. Assign it after you read the fields below

Step 1: set the departure and dates

The catalog entry is serpapi.google_flights.explore, called as POST /v1/runs. Set departure_id first. For a search from JFK, the example value is JFK. Use the kgmid form when you want a city rather than a single airport, and comma-separated values when you want to compare airports. Then set outbound_date and, for a round trip, return_date in YYYY-MM-DD format

currency defines the currency of the returned prices and follows a three-letter uppercase pattern. gl is the two-letter country code, and hl is the language code with optional region. currency is USD in the example. It sets the price unit you read in flight_price

Step 2: read the fields that rank a destination

The destinations array returns at most 20 items per call. That cap is the limit to plan around: one call cannot return a longer list, so a wider search needs another call with another departure point or date pair

Each item in destinations carries the fields that feed the shortlist row. name and country identify the destination. destination_id is the key to keep when you refresh the search. flight_price is the fare field to sort on first. number_of_stops is the screen for a nonstop preference, and flight_duration is the time cost in the same row. airline and airline_code name the carrier. start_date and end_date show the dates attached to the option

The top level has engine, which is google_travel_explore, and notice. A notice is set when the search engine returned no results for the query. The search still counts, so a no-result response is not a reason to repeat the same call

No weather field appears in the output. The warm-weather screen comes from your own list of destination names and countries. Drop rows that do not fit that list, then rank the rows that remain by flight_price. Use number_of_stops and flight_duration as tie-breakers. Keep the top three for a detailed fare check

Step 3: build the shortlist from the returned rows

Do not rank a row you cannot use. If the row has no usable flight_price or the dates do not fit the January window, leave the row out. If number_of_stops is above your limit, leave it out. The table then holds the usable options, ranked 1 for the lowest fare that passes the screen, 2 for the next, and 3 for the third

The deliverable is not a booking list. It is three routes to price in detail. Keep destination_id, airline_code, start_date and end_date in the shortlist so the next check can use the same row

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to run one destination search with serpapi.google_flights.explore for the example input below. Check the current inputs and price of serpapi.google_flights.explore before running. Use departure_id JFK, outbound_date 2027-01-11, return_date 2027-01-18, currency USD, gl us, hl en. Return a table with destination name, destination_id, country, airline, airline_code, flight_price, flight_duration, number_of_stops, start_date, end_date and shortlist_rank. Drop rows that do not fit my warm-weather list, rank the rest by flight_price, and keep the top three. If notice is set, report that the search returned no results. Do not book anything.

The dates and airport above are examples. Replace them with your own before running. Keep the first call to one lookup so you can see how many rows come back and whether the 20-item cap is enough for your shortlist

Estimated tool cost

The catalog lists the unit as max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
Single Explore lookupcalls x max price$0.015 per call1$0.015
Four weekly refreshescalls x max price$0.015 per call4$0.060

One Explore lookup is 1 call. Four weekly refreshes are 4 calls. A search that returns no results still counts as one search; failed searches are not charged. Model fees for the agent are not counted

Next action

Open the Google Flights Explore tool page to check the current input fields and price before your first run

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Google Flights.
Explore Google Flights tools and pricing

FAQ

How do I explore cheap destinations from JFK on Google Flights?

Run one serpapi.google_flights.explore call with departure_id JFK and your dates, then read the destinations list. The list has price, dates, duration, stops and airline fields for each option. The call returns at most 20 destination options.

What input does serpapi.google_flights.explore require?

departure_id is required. currency, gl, hl, outbound_date and return_date are optional in the contract, but return_date is required for round-trip searches.

What fields should I use to rank destinations?

Use flight_price to rank by fare, number_of_stops and flight_duration to set the travel-time screen, and airline or airline_code to note the carrier. Keep destination_id as the row key.

What happens when the search returns no destinations?

The notice field is set, and the search still counts as one search. Failed searches are not charged.

How much does one Google Flights Explore call cost?

It is $0.015 per call at the catalog max_call ceiling. One lookup is 1 call, so the planned total is $0.015.

How much do four weekly refreshes cost?

Four calls at $0.015 per call total $0.060. The totals are ceilings, and model fees for the agent are not counted.

Can one call return more than 20 destinations?

No. The destinations array returns at most 20 items per call. A larger shortlist needs another call.

Next step

Try this with Google Flights

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Google Flights tools

Share this article