Scraper API

Google Flights API

with fares, layovers, and price trends

Search Google Flights by route and dates. One request returns fares, full itineraries, layovers, carbon estimates, and price trends as clean JSON. No sessions, no rendering to run.

SUCCESS
99.9%

of requests succeed

P50
1.5s

median response

P95
2.4s

95% finish faster

PRICE
$1.12

per 1k flight searches at volume

Stop maintaining scrapers

Fares change by the minute. Your code shouldn't care.

  • Session tokens that expire
  • Itineraries buried in nested JSON
  • Prices in a dozen formats
  • Headless browsers to keep warm
  • Fix the parsers again next week
One integration commit replaces a backlog you’ll never finish.
scraper | git log
hotfix: markup changed, nulls in price
fix: session token expired mid-crawl
fix: itinerary leg misparse on stops
chore: bump browser pool memory
fix: nested JSON path changed again
hotfix: price format switched with locale
fix: layover dedupe on codeshares
chore: re-run failed batch overnight
fix: pagination token stopped working
fix: retry storm on timeouts
hotfix: markup changed, nulls in price
fix: session token expired mid-crawl
fix: itinerary leg misparse on stops
chore: bump browser pool memory
fix: nested JSON path changed again
hotfix: price format switched with locale
fix: layover dedupe on codeshares
chore: re-run failed batch overnight
fix: pagination token stopped working
fix: retry storm on timeouts
hotfix: markup changed, nulls in price
fix: session token expired mid-crawl
fix: itinerary leg misparse on stops
chore: bump browser pool memory
fix: nested JSON path changed again
hotfix: price format switched with locale
fix: layover dedupe on codeshares
chore: re-run failed batch overnight
fix: pagination token stopped working
fix: retry storm on timeouts
hotfix: markup changed, nulls in price
fix: session token expired mid-crawl
fix: itinerary leg misparse on stops
chore: bump browser pool memory
fix: nested JSON path changed again
hotfix: price format switched with locale
fix: layover dedupe on codeshares
chore: re-run failed batch overnight
fix: pagination token stopped working
fix: retry storm on timeouts
feat: integrate HasData API
Code Examples

One GET Request. That's the whole integration.

Start with just a query. Add more parameters when your use case needs them.

request example
curl -G 'https://api.hasdata.com/scrape/google/flights' \
	--data-urlencode 'departureId=LHR' \
	--data-urlencode 'arrivalId=JFK' \
	--data-urlencode 'outboundDate=2026-08-15' \
	--data-urlencode 'returnDate=2026-08-20' \
	--header 'x-api-key: <YOUR_API_KEY>' \
	--header 'Content-Type: application/json'
departureId * Departure airport code / location kgmid
Specifies the departure airport code (IATA) or location kgmid. - **IATA Code**: A 3-letter uppercase code (e.g., SFO for San Francisco, LHR for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search). - **Location kgmid**: A string starting with `/m/`, found in Wikidata under "Freebase ID" (e.g., `/m/02_286` for New York, NY). Multiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).
arrivalId * Arrival airport code / location kgmid
Specifies the arrival airport code (IATA) or location kgmid. - **IATA Code**: A 3-letter uppercase code (e.g., `SFO` for San Francisco, `LHR` for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search). - **Location kgmid**: A string starting with `/m/`, found in Wikidata under "Freebase ID" (e.g., `/m/02_286` for New York, NY). Multiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).
outboundDate * Outbound Date
The outbound travel date in 'yyyy-MM-dd' format.
returnDate Return Date
The return travel date in 'yyyy-MM-dd' format. Required when **type** is `roundTrip`.
type Flight Type
Specifies the type of flight. Options: - `roundTrip` (default) - `oneWay` - `multiCity` (requires `multiCityJson` for flight details) For round trips, retrieve return flight details with a separate request using `departureToken`.
multiCityJson Multi-city JSON
This parameter specifies flight details for multi-city trips. It is a JSON string containing multiple flight objects. Each object must include the following fields: - **departureId** – The departure airport code or location KGMID. Uses the same format as the main `departureId` parameter. - **arrivalId** – The arrival airport code or location KGMID. Uses the same format as the main `arrivalId` parameter. - **date** – The flight date. Uses the same format as the `outboundDate` parameter. - **times** *(optional)* – The time range for the flight. Uses the same format as the `outboundTimes` parameter.
gl Country
The two-letter country code for the country you want to limit the search to.
hl Language
The two-letter language code for the language you want to use for the search.
currency Currency
Parameter defines the currency of the returned prices
travelClass Travel Class
The travel class for the flight (Economy, Premium Economy, Business, or First).
showHidden Show Hidden Fares
Indicates whether to include hidden options in the results.
adults Adults
Number of adult passengers (>= 1 if specified).
children Children
Number of child passengers.
infantsInSeat Infants in Seat
Number of infants occupying seats.
infantsOnLap Infants on Lap
Number of infants sitting on an adult's lap.
sortBy Sort By
Sort the flight results based on price, departure time, arrival time, etc.
stops Stops
Restrict the number of stops (layovers) in the flight itinerary.
excludeAirlines Exclude Airlines
A comma separated list of airline codes to exclude from results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines.
includeAirlines Include Airlines
A comma separated list of airline codes to exclusively include in results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines. `excludeAirlines` and `includeAirlines` parameters can't be used together.
bags Number of Bags
Number of carry-on bags per passenger.
maxPrice Maximum Price
Maximum price limit for the flight search, in the selected currency.
outboundTimes Outbound Times
Set up to 4 time boundaries (2 for departure, 2 for arrival) to filter flights. Each number represents the start of an hour. Examples: - `6,20` → 6:00 AM - 9:00 PM departure - `1,15` → 1:00 AM - 4:00 PM departure - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival
returnTimes Return Times
Set up to 4 time boundaries (2 for departure, 2 for arrival) to filter return flights. Each number represents the start of an hour. Examples: - `6,20` → 6:00 AM - 9:00 PM departure - `1,15` → 1:00 AM - 4:00 PM departure - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival
lessEmissions Fewer Emissions
Prefer flight options with lower carbon emissions.
layoverDuration Maximum Layover Duration
Set the maximum layover duration in minutes to filter flights. For example, `120, 360` filters layovers between 2 hours and 6 hours, while `45, 180` allows layovers from 45 minutes to 3 hours.
includeConnections Include Connections
A comma separated list of specific airports to allow as connections.
excludeConnections Exclude Connections
A comma separated list of specific airports to exclude as connections.
maxDuration Maximum Flight Duration
The maximum total flight duration in minutes.
deepSearch Deep Search
Enable deep search. Returns the same results as Google Flights in a browser, but takes longer to respond. Default is `false`.
departureToken Departure Token
Used to select a flight and retrieve return flights for a round trip or the next leg of the itinerary for a multi-city trip.
bookingToken Booking Token
Used to request booking options for selected flights. This token is found in the flight results and cannot be used with `departureToken`.
TRY ALL 31 PARAMETERS FREE
Response

Every route, one predictable schema

The same keys come back on every request. Map the fields once and forget about it.

bestFlights.json
[
  {
    "price": 758,
    "type": "Round trip",
    "totalDuration": 490,
    "flights": [
      {
        "departureAirport": {
          "id": "LHR",
          "name": "Heathrow Airport",
          "time": "2026-08-15 8:20"
        },
        "arrivalAirport": {
          "id": "JFK",
          "name": "John F. Kennedy International Airport",
          "time": "2026-08-15 11:30"
        },
        "airline": "Virgin Atlantic",
        "airplane": "Airbus A350",
        "flightNumber": "VS 3",
        "travelClass": "Economy",
        "legroom": "31 in",
        "duration": 490
      }
    ],
    "carbonEmissions": {
      "thisFlight": 243000,
      "typicalForThisRoute": 326000,
      "differencePercent": -25
    },
    "departureToken": "W1t7ImRlcGFydHVyZUlkIjoiTEhSI…"
  }
]
Fields in bestFlights
price number

Total price for the itinerary

type string

Round trip | One way

totalDuration number

Total travel time in minutes

flights[] object[]

Each leg of the itinerary

flights[].departureAirport / arrivalAirport object

id, name, and local time

flights[].airline / airplane string

Carrier and aircraft

flights[].travelClass / legroom string

Cabin and seat pitch

carbonEmissions object

This flight vs typical, with % difference

departureToken string

Token to fetch return/onward options

What We Offer

An all-in-one scraping service

Every feature you need to collect data from thousands to millions of requests.

Loved by developers

Teams that deleted their scraper

Now it's the part of the pipeline they don't think about

4.8 ★★★★★
across 100+ reviews on 5 platforms
Clutch Clutch ★★★★★

Their ability to handle dynamic content, including time-sensitive flight pricing, was particularly impressive.

BT
Bunny Tharpe
Former VP at Quark Software Inc.
Trustpilot Trustpilot ★★★★★

HasData delivers exactly what we need: speed and comprehensive search features. It's the fastest API we've used in this space. Plus, their customer support is fantastic.

Denver Sinclair
Denver Sinclair
Capterra Capterra ★★★★★

We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.

JN
Jacob N.
Trustpilot Trustpilot ★★★★★

Great web scraping API which is incredibly easy to use. It requires minimal effort to get up and running, and the documentation is very clear and helpful.

Arnold Foster
Arnold Foster
Trustpilot Trustpilot ★★★★★

I needed to scrape some information they didn't already support, and they wrote the code for me right away, which was super nice of them.

Hussein Ali
Hussein Ali
Pricing

Plans that get cheaper at scale

Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.

Free
$0 /mo
One-time free trial
67 flight searches to start
1 concurrent request
Team seats
Community support
Start free
Startup
$41 /mo
$3.06 / 1k flight searches
13.3K flight searches / month
15 concurrent requests
Team seats
Email support
Get started
Business
Recommended
$83 /mo
$1.24 / 1k flight searches
66.7K flight searches / month
30 concurrent requests
Team seats
Priority email support
Get started
Enterprise
$208 /mo
$1.04 / 1k flight searches
50 concurrent requests
Team seats
Dedicated account manager
Get started
Monthly flight search volume
Free 66.7K 333.3K 1.3M 4M 6.7M
Best fit
Business
flight searches / mo
66.7K
Concurrency
30
$ / 1k flight searches
$1.24
$83 /mo
Get Started

Start with 66 free flight searches. No credit card required.

FAQ

Questions, answered

1 Grab your API key 2 Send a GET request 3 Get structured JSON

Your first Google Flights response
is minutes away

66 flight searches free · no credit card