Scrapingdog

Google Flights API

The Google Flights API retrieves flight data from Google Flights supporting one-way, round-trip, and multi-city searches with filtering and sorting capabilities. Costs 5 API credits per request.

Endpoint: https://api.scrapingdog.com/google_flights

API Parameters

πŸ”‘

Scrapingdog Parameters

  • api_key Required
    This is your API key.

    Type: String
  • html Optional
    This will return the full HTML of the Google page.

    Default Value - false

    Type - Boolean
πŸ”

Search Query

  • departure_id Required
    The parameter sets the departure point using either an airport code or a location kgmid. Airport codes are 3-letter uppercase identifiers (e.g., JFK, LHR). Location kgmids begin with "/m/" (e.g., /m/02_286 for San Francisco). Multiple departure points can be separated by commas.

    Type - String
  • arrival_id Required
    An airport code is a 3-letter uppercase identifier. Location kgmids begin with "/m/". Multiple arrival points can be separated by commas.

    Type - String
🌍

Geographic Location and Localization

  • country Optional
    This parameter specifies the country for the Google search using a two-letter country code (e.g., US for the United States, UK for the United Kingdom, or FR for France).

    Default Value - us

    Type - String
  • language Optional
    Language of the results. Possible Values - en, es, fr, de, etc.

    Default Value - en

    Type - String
  • currency Optional
    This parameter sets the currency for the returned prices. For a complete list, see the Supported Google Flights Currency Codes.

    Default: USD

    Type - String
✈

️ Advanced Google Flights Parameters

  • type Optional
    This parameter specifies the flight type.

    Available values:
    • 1 β€” Round trip (default)
    • 2 β€” One way
    • 3 β€” Multi-city
    Type - String
  • outbound_date Optional
    This parameter sets the outbound travel date. The value must be in YYYY-MM-DD format. Example: 2026-03-05.

    Type - String
  • return_date Optional
    This parameter sets the return travel date. The value must be provided in YYYY-MM-DD format, for example: 2026-03-06.

    Note: It is required when the type parameter is set to 1 (Round trip).
  • travel_class Optional
    This parameter specifies the travel class.

    Available values:
    • 1 β€” Economy (default)
    • 2 β€” Premium economy
    • 3 β€” Business
    • 4 β€” First class
    Type - String
  • multi_city_json Optional
    This parameter is used to provide flight details for multi-city trips. It should be passed as a JSON string containing an array of flight segment objects.

    Type - JSON
πŸ‘₯

Number of Passengers

  • adults Optional
    Number of adult passengers.

    Default: 1

    Type - String
  • children Optional
    Number of child passengers.

    Default: 0

    Type - String
  • infants_in_seat Optional
    Number of infants travelling in their own seat.

    Default: 0

    Type - String
  • infants_on_lap Optional
    Number of infants traveling on an adult's lap.

    Default: 0

    Type - String
πŸ”ƒ

Sorting

  • sort_by Optional
    This parameter sets how the flight results are sorted.

    Available values:
    • 1 β€” Top flights (default)
    • 2 β€” Price
    • 3 β€” Departure time
    • 4 β€” Arrival time
    • 5 β€” Duration
    • 6 β€” Emissions
    Type - String
βš™

️ Advanced Filters

  • stops Optional
    This parameter specifies the maximum number of stops for the flight.

    Available values:
    • 0 β€” Any number of stops (default)
    • 1 β€” Nonstop only
    • 2 β€” Up to 1 stop
    • 3 β€” Up to 2 stops
    Type - String
  • exclude_airlines Optional
    This parameter lets you exclude specific airlines from the results. Each airline must be provided as a 2-character IATA code. Cannot be used together with include_airlines.

    Type - String
  • include_airlines Optional
    This parameter lets you include only specific airlines in the results. Each airline must be provided as a 2-character IATA code. Cannot be used together with exclude_airlines.

    Type - String
  • bags Optional
    This parameter sets the number of carry-on bags.

    Default: 0

    Type - String
  • max_price Optional
    This parameter sets the maximum ticket price allowed in the results. By default, there is no price limit.

    Type - String
  • outbound_times Optional
    This parameter sets the preferred time range for the outbound flight. Each number represents the start of an hour.

    Type - String
  • return_times Optional
    This parameter sets the preferred time range for the return flight. Each number represents the start of an hour.

    Note: Use this parameter only when the type parameter is set to 1 (Round trip).

    Type - String
  • emissions Optional
    This parameter filters flights based on emission level.

    Available value: 1 β€” Show only flights with lower emissions.

    Type - String
  • layover_duration Optional
    This parameter sets the preferred layover duration in minutes. Example: 75,240 means 1 hour 15 minutes to 4 hours.

    Type - String
  • exclude_conns Optional
    This parameter lets you exclude specific connecting airports from the results. You can exclude multiple airports by separating them with commas.

    Type - String
  • max_duration Optional
    This parameter sets the maximum total flight duration in minutes. Example: 960 means up to 16 hours.

    Type - String
πŸ›«

Next Flights

  • departure_token Optional
    This parameter is used to select a departure flight and retrieve the next set of results: for Round trip, it returns the available return flights; for Multi-city, it returns flights for the next segment.

    Note: This token cannot be used with booking_token.

    Type - String
🎟

️ Booking Flights

  • booking_token Optional
    This parameter retrieves booking options for the selected flight. It cannot be used together with departure_token. When this token is used, date-based parameters and any parameters listed under Advanced Filters are ignored.

    Type - String

API Examples

Code to Integrate
curl "https://api.scrapingdog.com/google_flights?api_key=APIKEY&departure_id=JFK&arrival_id=LHR&type=2&outbound_date=2026-03-05"
API Response
{
  "best_flights": [
    {
      "flights": [
        {
          "departure_airport": {"id": "JFK", "name": "John F. Kennedy International Airport", "time": "2026-03-05 8:05"},
          "arrival_airport": {"id": "LHR", "name": "Heathrow Airport", "time": "2026-03-05 20:00"},
          "duration": 415,
          "airplane": "Boeing 777",
          "travel_class": "Economy",
          "flight_number": "BA 178",
          "airline": "British Airways",
          "legroom": "31 in"
        }
      ],
      "total_duration": 415,
      "price": 27733,
      "type": "One Way"
    }
  ]
}