How to compare Google Flights fares for a round trip
Build a round-trip fare table from the tool's top and additional itinerary groups plus price insights for one Tokyo route, then review the price level and typical range before booking
On this page
You have one Tokyo round trip in economy, two departure dates, and a fare table to fill with up to 10 best_flights and 10 other_flights per date. The table also carries price_insights so the operator can make a book-now-or-wait call. No run has been executed for this guide, so each table here is a design and the values are placeholders showing the shape
For destination ideas before fixing the route, the companion guide on Google Flights cheap destinations covers the earlier step
The fare table and example inputs
Example inputs, invented for this guide. JFK is an example departure value. Replace it and the Tokyo arrival placeholder with your route
| Search | departure_id | arrival_id | outbound_date | return_date | travel_class | type |
|---|---|---|---|---|---|---|
| 1 | JFK | Tokyo airport code or location kgmid | 2026-05-12 | 2026-05-19 | 1 | 1 |
| 2 | JFK | Tokyo airport code or location kgmid | 2026-05-26 | 2026-06-02 | 1 | 1 |
The deliverable is one table for the route. Values here are placeholders showing the shape
| itinerary group | price | total_duration | flights | layovers | carbon_emissions | price_level | typical_price_range |
|---|---|---|---|---|---|---|---|
best_flights item | number | integer minutes | array | array | object | string | array |
other_flights item | number | integer minutes | array | array | object | string | array |
Use the route-level price_insights values for price_level and typical_price_range, and repeat them on each row so the book-now-or-wait review stays beside the fare
What the tool takes
The contract lists required fields departure_id, arrival_id and outbound_date. Optional fields include gl, hl, return_date, travel_class and type. For a round trip, set return_date and set type to 1, which the contract defines as round trip and notes needs return_date. Set travel_class to 1 for economy. Dates use YYYY-MM-DD, gl is a two-letter country code, and hl is a language code. departure_id and arrival_id accept a three-letter airport code or a location kgmid, and multiple values may be comma-separated
Keep the example inputs labelled as examples and swap in the airport codes or location kgmid for the route you are pricing
How to read the output
best_flights holds the top itineraries and other_flights holds additional itineraries. Each group has a max of 10 items. Each item carries price, total_duration, flights, layovers, carbon_emissions and type. The route-level price_insights object carries lowest_price, price_history, price_level and typical_price_range
The fields that drive the fare table are price and total_duration for each itinerary, flights and layovers for the routing shape, and carbon_emissions for the emissions note. Use price_level and typical_price_range for the book-now-or-wait column. The contract gives the fields, not a decision rule, so keep the raw values and apply your own threshold
notice is set when the search engine returned no results for the query. The limit sits with that case: a search that returns no results still counts as one search; failed searches are not charged
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to compare round-trip economy fares for one Tokyo route on two departure dates. Check the current inputs and price of serpapi.google_flights.search before running anything. Call POST /v1/runs with the toolId once for each outbound_date below, with type 1, travel_class 1, and the matching return_date. Return a table with itinerary group, price, total_duration, flights, layovers, carbon_emissions, price_level and typical_price_range. Keep best_flights and other_flights as separate groups and include the notice field when it is present.
Example inputs to replace:
departure_id: JFK
arrival_id: Tokyo airport code or location kgmid
outbound_date: 2026-05-12, return_date: 2026-05-19
outbound_date: 2026-05-26, return_date: 2026-06-02
gl: us
hl: enEstimated tool cost
The catalog price is $0.015 per call. The table is a ceiling: the max_call unit means "Maximum per call. Successful runs settle at the actual AnyAPI charge." Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Round-trip search for date 1 | calls x price | $0.015 per call | 1 | $0.015 |
| Round-trip search for date 2 | calls x price | $0.015 per call | 1 | $0.015 |
| Two-date plan | 2 | $0.030 |
Next action
Open the Google Flights search tool page and run the two-date plan for your route
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.FAQ
How do I compare Google Flights round trip fares for two departure dates?
Call serpapi.google_flights.search once for each outbound_date, set return_date and type to 1, then put best_flights and other_flights in a fare table with price_insights.
What inputs does serpapi.google_flights.search need for a round trip?
The contract lists departure_id, arrival_id and outbound_date as required. For a round trip, set return_date and type to 1, and travel_class to 1 for economy.
What fields drive the book-now-or-wait review?
Use price_insights.price_level and price_insights.typical_price_range for the review, with itinerary price, total_duration, flights, layovers and carbon_emissions in the fare table.
How many itineraries can one search return?
best_flights has a max of 10 items and other_flights has a max of 10 items.
What happens if a search returns no results?
notice is set when the search engine returned no results for the query. A search that returns no results still counts as one search, while failed searches are not charged.
How much does it cost to compare two departure dates?
Two calls at $0.015 per call is $0.030 at most. The table is a ceiling and model fees for the agent are not counted.
Can the tool decide whether to book now?
The contract gives price fields but no book-now rule. Keep the raw price_level and typical_price_range values and apply your own threshold.
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.