# Google Flights Scraper API - Fares, Durations, Layovers, Emissions > Source: https://scrape.do/products/ready-api/google-flights-scraper/ Scrape Google Flights with prices, durations, layovers, airline metadata, carbon emissions, and price insights. Multi-airport search, six sort modes, 200+ countries and currencies. No JavaScript rendering. > Each successful request costs **10 credits**. **Google Flights Data in One JSON Call** Search flights for any route and date and get back structured fares, layovers, durations, airline metadata, carbon emissions, and price insights, without rendering JavaScript or scraping the booking flow. ![Google Flights Data in One JSON Call](/uploads/google-flights-api.svg) ## Highlights ### Price Insights and Carbon Emissions Built In - Every response includes **`price_insights`**: `lowest_price`, `price_level` (low / typical / high), `typical_price_range`, and a sparse `price_history` time series. Compare current fares against route averages without running your own statistics. - Per-itinerary **`carbon_emissions`** with `this_flight`, `typical_for_this_route`, and `difference_percent`. Sort by emissions (`sort_by=6`) to surface lower-impact options first. ### 200+ Countries, Multi-Airport Origin/Destination - Pass **comma-separated IATA codes** for multi-airport search: `departure_id=JFK,LGA,EWR&arrival_id=LAX` searches all three NYC airports in a single call. - 240+ countries via `gl`, 150+ languages via `hl`, and **independent currency** via `currency`. Request EUR pricing from a US perspective for unified multi-region comparison. ## How It Works ### Search Flights Search Google Flights for a route and date and get up to 30 itineraries with per-segment details, layovers, prices, durations, airline metadata, and carbon emissions. Round-trip and one-way both supported. ![Search Flights](/uploads/google-flights-results.png) **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/plugin/google/flights?token=&departure_id=JFK&arrival_id=LAX&outbound_date=2026-06-15' ``` **Python (API mode)** ```python import requests import json token = "" url = f"https://api.scrape.do/plugin/google/flights?token={token}&departure_id=JFK&arrival_id=LAX&outbound_date=2026-06-15" response = requests.request("GET", url) print(json.dumps(response.json(), indent=2)) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = ""; const url = `https://api.scrape.do/plugin/google/flights?token=${token}&departure_id=JFK&arrival_id=LAX&outbound_date=2026-06-15`; axios.get(url) .then(response => { console.log(JSON.stringify(response.data, null, 2)); }) .catch(error => { console.error(error); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* **Example response** ```json { "search_parameters": { "engine": "google_flights", "type": 2, "departure_id": "JFK", "arrival_id": "LAX", "outbound_date": "2026-06-15", "adults": 1, "currency": "USD", "gl": "us", "hl": "en" }, "best_flights": [ { "flights": [ { "departure_airport": { "name": "John F. Kennedy International Airport", "id": "JFK", "time": "2026-06-15 08:29" }, "arrival_airport": { "name": "Los Angeles International Airport", "id": "LAX", "time": "2026-06-15 11:25" }, "duration": 356, "airplane": "Airbus A320", "airline": "JetBlue", "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/B6.png", "travel_class": "Economy", "flight_number": "B6 323", "legroom": "32 inches", "extensions": ["Wi-Fi for a fee", "In-seat power"], "overnight": false } ], "layovers": [], "total_duration": 356, "carbon_emissions": { "this_flight": 405000, "typical_for_this_route": 316000, "difference_percent": 28 }, "price": 149, "type": "One way", "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/B6.png", "booking_token": "CjRIVVBMZHNBZEpBRDhBQmN1QndCRy0..." } ], "other_flights": [], "price_insights": { "lowest_price": 149, "price_level": "typical", "typical_price_range": [90, 205], "price_history": [ [1771218000000, 169], [1771304400000, 169] ] }, "airports": [ { "departure": [ { "airport": { "id": "JFK", "name": "John F. Kennedy International Airport" }, "city": "New York", "country": "United States", "country_code": "US", "latitude": 40.6397, "longitude": -73.7789 } ], "arrival": [ { "airport": { "id": "LAX", "name": "Los Angeles International Airport" }, "city": "Los Angeles", "country": "United States", "country_code": "US", "latitude": 33.9425, "longitude": -118.4081 } ] } ] } ``` ## FAQ ### How does this differ from scraping Google Flights myself? Google Flights loads results through internal RPC calls and renders them with JavaScript. Scraping it directly means a headless browser, session token management, and reverse-engineered request signing. This API consumes Google's structured Flights feed directly. No JavaScript rendering, no booking-flow navigation. You send a route and date and get back parsed JSON with prices, durations, layovers, airlines, and emissions. ### What's the difference between `best_flights` and `other_flights`? `best_flights` is Google's curated top picks for the route, typically nonstop or convenient itineraries the algorithm scores highly. `other_flights` is the longer list of alternatives (often with stops or off-peak times). Together they cover what the Google Flights UI shows under "Best departing flights" and "Other departing flights." ### How do I do a round-trip search? Pass `return_date=YYYY-MM-DD` along with `outbound_date`. `type` is auto-set to `1` (round trip). Or set `type=1` explicitly. Itineraries returned will reflect the full round-trip price. ### Can I search multiple origin or destination airports at once? Yes. `departure_id` and `arrival_id` accept **comma-separated IATA codes**. `departure_id=JFK,LGA,EWR&arrival_id=LAX` searches all three NYC airports for flights to LAX in a single call. Useful for "any NYC airport to LA" or "any London airport to Paris" patterns. ### How do I sort results? `sort_by` takes six values: `1` (top, default), `2` (price low to high), `3` (departure time), `4` (arrival time), `5` (total duration), `6` (carbon emissions). Combine with `stops=1` for nonstop-only and `travel_class` for cabin class. ### Can I filter by airline? Yes. `include_airlines=DL,B6` whitelists specific carriers by IATA code. `exclude_airlines=AA,UA` blacklists them. The two parameters are mutually exclusive, pass only one. Useful for loyalty-program tracking or filtering out connection-heavy carriers. ### What's the carbon emissions data? Every itinerary has a `carbon_emissions` block with `this_flight`, `typical_for_this_route`, and `difference_percent`. Values are in grams. `difference_percent` is positive when the flight emits more than typical, negative when less. Sort by emissions with `sort_by=6` to find the lowest-impact options. ### What about price history? `price_insights.price_history` returns sparse `[unix_ms, price]` pairs Google ships for the route. It's empty for routes Google doesn't track. Combine with `price_level` (low / typical / high) and `typical_price_range` to show whether the current best fare is a good deal. ### Are multi-city itineraries supported? Not yet. `type=3` (multi-city) returns `400 multi-city is not yet supported`. Build multi-city itineraries by chaining one-way searches for each leg. Booking-page expansion (`booking_token` → fare detail / baggage / seat maps) is also not yet exposed. ### What currencies are supported? Any currency Google Flights supports: `USD`, `EUR`, `GBP`, `JPY`, `TRY`, `CAD`, `AUD`, `INR`, `BRL`, `MXN`, `CNY`, `KRW`, and more. `currency` is independent of `gl`. Request EUR pricing from a US perspective for unified multi-country comparison. ### Where can I find the full API reference? The [Google Flights API documentation](/documentation/google-scraper-api/flights/) covers the full parameter list, response schema (including the nested `airports[].departure[].airport` shape), sort/filter modes, error responses, and localization details.