John Cole

Jul 02, 2026 • 4 min read

Give your AI agent real flight prices: the Google Flights API guide

Wire Google Flights into Claude or Cursor via MCP and search live fares, itineraries, and booking links in plain English

Every LLM can talk about flights. None of them know what a flight costs today. The Google Flights API on Apify closes that gap: it searches live Google Flights data and returns structured JSON your agent, script, or workflow can actually use, with itineraries, prices, airlines, stops, price trends, and resolved booking links.

I built it so my own agents could stop hallucinating fares. Here is what it returns, how to wire it into Claude or Cursor over MCP, and three ready-made examples you can run in one click.

What the Google Flights API returns

One search request covers one-way, round-trip, or multi-city itineraries, with filters for max price, stop count, preferred airlines, basic-economy exclusion, and passenger mix. Each result set includes the top-recommended and alternative itineraries (route, price, airline, departure and arrival times, stops, duration, per-leg details), price insights and trend data, airport details and codes, and optionally booking options with fare family, baggage info, and direct airline or OTA booking links.

It supports 29+ languages, 39+ countries, and currency localization, so "cheapest Tokyo flights priced in yen" works as a query. Pricing is pay per event: about $0.01 setup per run plus roughly $0.02 per page of results, so a full search costs pennies.

The MCP setup (this is the whole point)

Add the Actor to any MCP client and flights become a tool your agent can call mid-conversation. With Apify's hosted MCP server, the config is one URL:

https://mcp.apify.com/?actors=johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search

Authenticate with your Apify token, and then just talk to it. "Find me a sub-$600 round trip from NYC to Lisbon in September, max one stop" comes back as real itineraries with booking links. Your agent can compare fares, watch trends, and hand you the link to book, no browser tab surfing required.

Three examples you can run right now

The Actor ships with three example tasks. Each opens preconfigured so you can run it on your own account in one click.

How do I use Google Flights in Claude via MCP?

The vibe-coder starting point: this task shows the MCP connection end to end, so Claude can search flights in plain English. Run the Google Flights in Claude task and steal the setup for your own agent.

How do I track NYC to London flight prices?

A repeatable transatlantic price-monitoring query. Cron it, pipe it into a spreadsheet, or let an n8n workflow ping you when fares drop. Run the NYC to London task to see the output shape.

How do I find cheap flights from NYC to Europe?

Fan out one search across European destinations and rank the results by price. Good bones for a deal-hunting bot or a travel newsletter. Run the cheap flights to Europe task to try it.

Calling it from code

Prefer a script over an agent? The Apify client gets you the same data in four lines:

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search").call(run_input={"departure_id": "JFK", "arrival_id": "LHR", "outbound_date": "2026-10-05", "return_date": "2026-10-12", "max_stops": 1})
flights = list(client.dataset(run.default_dataset_id).iterate_items())

There is also an n8n community node for workflow builders, and a plain REST endpoint if you want raw HTTP. A free Apify account includes enough credit to run all three example tasks.

FAQ About Scraping Google Flights

Is there an official Google Flights API?

No. Google retired public access to its flights data years ago. Scraping the results page, which is what this Actor does for you, is the practical way in.

Can my AI agent book the flight?

Not yet; the Actor returns resolved booking links, so the human (or another tool) handles checkout. What it removes is the search-and-compare grind.

How much does a search cost?

Pennies: about $0.01 setup plus roughly $0.02 per page of results, pay per event.

Does it handle multi-city trips?

Yes. One-way, round-trip, and multi-city, with per-leg details in the response.

Can my AI agent use this without code?

Yes. The Actor runs over MCP, so Claude, Cursor, or any MCP client can call it as a tool in plain English and get structured fare rows back.

If you want your agent quoting real fares instead of vibes, try the Google Flights API on a free account and start with the MCP example task.

Join John on Peerlist!

Join amazing folks like John and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

0

0

0