{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & Google Flights API: Fares, Calendar",
    "description": "Google Flights searches as a flight data API, no login: every itinerary Google lists (not only the first 30) with airlines, flight numbers, times, stops, aircraft, legroom, CO2, exact fare, price insight; round trip flights, multi-city, booking options, price calendar, Explore, 40+ markets.",
    "version": "0.1",
    "x-build-id": "9AGpwt5VHnwYBxhdZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-google-flights-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/hyperbach~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-google-flights-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/hyperbach~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-google-flights-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "origin": {
            "title": "From (airport code)",
            "pattern": "^((/m/[0-9a-z_]+|[A-Za-z]{3})(\\s*,\\s*(/m/[0-9a-z_]+|[A-Za-z]{3}))*)?$",
            "type": "string",
            "description": "The departure airport as a 3-letter IATA code (`LAX`); several airports comma-separated (`LAX,BUR`). Leave `destination` empty to get the cheapest destinations from here (Explore). A metro code (`NYC`, `LON`, `PAR`, `TYO`, `CHI`, `WAS`, …) or a Google city id (`/m/02_286`) searches every airport of the city; city names are not looked up. Not searched when `searches` or `searchUrls` has an item: the list is then the whole run, and the dates and options here are its defaults.",
            "default": ""
          },
          "destination": {
            "title": "To (airport code)",
            "pattern": "^((/m/[0-9a-z_]+|[A-Za-z]{3})(\\s*,\\s*(/m/[0-9a-z_]+|[A-Za-z]{3}))*)?$",
            "type": "string",
            "description": "The arrival airport as a 3-letter IATA code (`JFK`); several comma-separated (`JFK,EWR`), or a metro code (`NYC`) for every airport of the city. Empty = Explore: one row per destination Google prices from the origin on the departure date.",
            "default": ""
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\+\\d{1,3})?$",
            "type": "string",
            "description": "The departure date, `YYYY-MM-DD`, or `+N` for N days after the day of the run (UTC): `+30` keeps a saved task or a schedule on a date ahead. A date in the past is a free `search` row that says so.",
            "default": ""
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\+\\d{1,3})?$",
            "type": "string",
            "description": "Set it for a round trip (`YYYY-MM-DD`, or `+N` days after the day of the run: `+30` and `+37` for a week a month ahead): the rows are the outbound flights priced as the round trip, as Google shows them; `returnsFor` adds the return flights of the first N outbounds.",
            "default": ""
          },
          "legs": {
            "title": "Multi-city legs",
            "type": "array",
            "description": "A multi-city trip as a list of legs, each `{\"origin\": \"LAX\", \"destination\": \"JFK\", \"date\": \"2026-11-04\"}` (2 to 6 legs; a date may be `+N` days after the day of the run). When given, the fields above are ignored; not searched when `searches` or `searchUrls` has an item. The rows are leg 1 priced as the whole trip; `returnsFor` adds the next legs for the first N itineraries of the leg before.",
            "default": []
          },
          "searches": {
            "title": "Many searches in one run",
            "type": "array",
            "description": "A list of searches, each an object `{\"origin\", \"destination\", \"departureDate\", \"returnDate\", \"legs\", \"cabin\", \"adults\", \"children\", \"infantsInSeat\", \"infantsOnLap\", \"maxStops\", \"includeAirlines\", \"excludeAirlines\", \"market\", \"language\", \"currency\"}` (the run's fields apply where an object leaves one out: an object without a date takes the run's `departureDate` and `returnDate`; its route is its own), a text `\"LAX JFK 2026-11-04\"` or `\"LAX JFK +30 +37\"` or a Google Flights URL. Up to 500 searches a run. The list is the whole run: the run's `origin`, `destination` and `legs` are then not searched.",
            "default": []
          },
          "searchUrls": {
            "title": "Google Flights URLs",
            "type": "array",
            "description": "One Google Flights URL per line, as copied from the browser (`https://www.google.com/travel/flights/search?tfs=…` or `…/flights?q=Flights to JFK from LAX on 2026-11-04 one way`): the route, dates, trip type, cabin, passengers, stops and airlines are read from it, `hl` / `gl` / `curr` too. With a URL here, the run's `origin`, `destination` and `legs` are not searched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "flexibleDays": {
            "title": "Also search the next N days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "One more search for each of the N days after the departure date (a round trip keeps its length). 0 = the dates given only.",
            "default": 0
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers (1–9; at most 9 passengers in all). Prices are the total for every passenger.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children (2–11).",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 on an adult's lap (at most one per adult).",
            "default": 0
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "The cabin class of the search; every row carries it.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "one_stop",
              "two_stops"
            ],
            "type": "string",
            "description": "Applied by Google (the list is filtered at the source).",
            "default": "any"
          },
          "includeAirlines": {
            "title": "Only these airlines",
            "type": "array",
            "description": "2-letter airline codes (`DL`, `B6`, `AA`) or an alliance (`STAR_ALLIANCE`, `ONEWORLD`, `SKYTEAM`); applied by Google. Empty = every airline.",
            "items": {
              "type": "string",
              "pattern": "^([A-Za-z0-9]{2}|STAR_ALLIANCE|ONEWORLD|SKYTEAM|star_alliance|oneworld|skyteam)$"
            },
            "default": []
          },
          "excludeAirlines": {
            "title": "Not these airlines",
            "type": "array",
            "description": "2-letter airline codes (or an alliance) to leave out; applied by Google.",
            "items": {
              "type": "string",
              "pattern": "^([A-Za-z0-9]{2}|STAR_ALLIANCE|ONEWORLD|SKYTEAM|star_alliance|oneworld|skyteam)$"
            },
            "default": []
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Keep itineraries (and Explore destinations) up to this total price in the currency asked; applied on Google's full list at no extra call. 0 = no limit.",
            "default": 0
          },
          "maxDurationMinutes": {
            "title": "Max duration (minutes)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Keep itineraries up to this total duration; applied on Google's full list. 0 = no limit.",
            "default": 0
          },
          "departureTimeRange": {
            "title": "Departure time window",
            "pattern": "^(\\d{2}:\\d{2}-\\d{2}:\\d{2})?$",
            "type": "string",
            "description": "Keep itineraries departing inside this local-time window, `HH:MM-HH:MM` (`06:00-12:00`); applied on Google's full list.",
            "default": ""
          },
          "arrivalTimeRange": {
            "title": "Arrival time window",
            "pattern": "^(\\d{2}:\\d{2}-\\d{2}:\\d{2})?$",
            "type": "string",
            "description": "Keep itineraries arriving inside this local-time window, `HH:MM-HH:MM`; applied on Google's full list.",
            "default": ""
          },
          "sortBy": {
            "title": "Order of the rows",
            "enum": [
              "best",
              "price",
              "duration",
              "departure"
            ],
            "type": "string",
            "description": "`best` keeps Google's own order (the best group first, then the others as Google ranks them; `rank` says the position); the other orders are applied on the full list.",
            "default": "best"
          },
          "view": {
            "title": "How many itineraries per search",
            "enum": [
              "all",
              "top"
            ],
            "type": "string",
            "description": "`all` reads Google's full list (\"View more flights\": nonstop and connections, 146 for LAX → JFK in our test); `top` reads the first view Google opens with (32 there). Both are one call.",
            "default": "all"
          },
          "returnsFor": {
            "title": "Return flights / next legs for the first N itineraries",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Round trips: also read the return flights of the first N outbound itineraries (one call each; the rows carry `leg_index` 2 and the outbound in `selected_flights`, priced as the round trip). Multi-city: the next legs for the first N itineraries of the leg before. 0 = the first leg only.",
            "default": 0
          },
          "bookingOptionsFor": {
            "title": "Booking options for the first N itineraries",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Read Google's booking options (sellers, fares, bag fees, booking links) for the first N itineraries of each search — on round trips and multi-city trips for the rows of the last leg, so set `returnsFor` too. One call of about 6 seconds per itinerary; a separate event. 0 = none.",
            "default": 0
          },
          "calendarDays": {
            "title": "Price calendar: days from the departure date",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Also read Google's price calendar: one `calendar_day` row per priced day from the departure date, for this many days (one-way: about 90 days per call; a round trip: the trip's own length kept, 14 days per call, each row with its `return_date`). 0 = no calendar.",
            "default": 0
          },
          "cheapestDays": {
            "title": "Full list for the N cheapest calendar days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "With `calendarDays`: also run the full search for the N cheapest days of the calendar (one more search each). 0 = the calendar alone.",
            "default": 0
          },
          "market": {
            "title": "Market (country)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "The two-letter country Google serves the view for (`US`, `GB`, `DE`, …): the fares and the booking sellers of that market.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "pattern": "^[a-z]{2}(-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "The language of the texts (`en`, `de`, `fr`, `es`, `pt-BR`, …): airport names, legroom units (inches or centimetres).",
            "default": "en"
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "The currency of every price (`USD`, `EUR`, `GBP`, …). Each row carries the currency Google served (`currency_served`); a list served in another currency than the one asked is a free `failed` row, never a charged one.",
            "default": "USD"
          },
          "onlyChanges": {
            "title": "Only itineraries whose price moved",
            "type": "boolean",
            "description": "Remember every itinerary delivered (by its flights and departure) and, on the next run of the same searches, deliver only the ones that are new or whose price moved; unchanged ones are counted in the run summary and not charged. The memory is kept for you under `stateStoreName`. Give the trip's own dates (`YYYY-MM-DD`): a `+N` date moves with the day, so each day's list is new to the memory.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory name",
            "pattern": "^[A-Za-z0-9._-]{0,60}$",
            "type": "string",
            "description": "With `onlyChanges`: the name of the memory to keep between runs (letters, digits, `.`, `_`, `-`). Empty = a name derived from the searches, so a saved task finds its own memory.",
            "default": ""
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many charged rows (itineraries, calendar days and destinations; the free search rows do not count). 0 = no cap.",
            "default": 0
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}