{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & API — Airfare & Price Calendar",
    "description": "Google Flights scraper and API: airfare, airlines, times, stops, layovers, CO2 and price insights for one-way, round-trip and multi-city trips, date ranges, every seller's fare with booking links, and cheapest-date calendars. Pay per result plus a small start fee, no platform fees.",
    "version": "1.0",
    "x-build-id": "qTTX2Xdhm0fyrsbRU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aaronoptimus~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aaronoptimus-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/aaronoptimus~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-aaronoptimus-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/aaronoptimus~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-aaronoptimus-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": {
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line, as airport codes: \"JFK-LAX\", \"JFK, EWR - LHR\" (several airports on one side), or city codes like NYC, LON, PAR, TYO (all of the city's airports). Each route is searched on every departure date below.",
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Departure dates",
            "type": "array",
            "description": "One or more dates like 2026-11-20, or dates relative to the run like \"30 days\" or \"2 weeks\". Each date is a separate search for every route.",
            "items": {
              "type": "string"
            }
          },
          "departureDateFrom": {
            "title": "Departure dates from",
            "type": "string",
            "description": "Search every departure date from this date to \"Departure dates to\" (added to the dates above). YYYY-MM-DD or relative, like \"14 days\". Each date is one search per route, capped by \"Maximum searches\"."
          },
          "departureDateTo": {
            "title": "Departure dates to",
            "type": "string",
            "description": "Last departure date of the range, e.g. 2026-12-20 or \"60 days\"."
          },
          "weekendsOnly": {
            "title": "Weekends only",
            "type": "boolean",
            "description": "Only search Fridays and Saturdays in the date range. Combine with \"Trip length (days)\" for weekend round trips (e.g. 2 days).",
            "default": false
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one-way",
              "round-trip"
            ],
            "type": "string",
            "description": "One-way, or round trip (prices are then the round-trip total). For multi-city trips use \"Multi-city trips\" below.",
            "default": "one-way"
          },
          "tripLengthDays": {
            "title": "Round trip: days until the return flight",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "For round trips: the return flight is this many days after each departure date. Ignored when a return date is set.",
            "default": 7
          },
          "returnDate": {
            "title": "Round trip: return date",
            "type": "string",
            "description": "Optional. One return date for every departure date (departure dates after it are skipped). Leave empty to use the number of days above."
          },
          "searchUrls": {
            "title": "Google Flights links",
            "type": "array",
            "description": "Optional. Paste Google Flights search links (open a search on google.com/travel/flights, then copy the address). Their airports, dates, passengers and cabin are used; the filters below still apply.",
            "items": {
              "type": "string"
            }
          },
          "multiCityTrips": {
            "title": "Multi-city trips",
            "type": "array",
            "description": "Optional. One trip per line, its flights separated by \";\": \"JFK-LHR 2026-11-20; LHR-CDG 2026-11-25; CDG-JFK 2026-12-02\" (2 to 5 flights, dates as above). Each trip lists its first flights with the price of the whole trip; set \"Next flights for the top N first flights\" for complete itineraries.",
            "items": {
              "type": "string"
            }
          },
          "adults": {
            "title": "Adults",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Passengers aged 12 and over.",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Passengers aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Under 2, with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "At most one per adult.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin for every flight of the trip.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "one-stop-or-fewer",
              "two-stops-or-fewer"
            ],
            "type": "string",
            "description": "Maximum number of stops per direction.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Only these airlines: 2-letter codes (AA, BA, LH, DL...) or alliances (Oneworld, SkyTeam, Star Alliance).",
            "items": {
              "type": "string"
            }
          },
          "excludeAirlines": {
            "title": "Exclude airlines",
            "type": "array",
            "description": "Leave out these airlines (2-letter codes or alliances).",
            "items": {
              "type": "string"
            }
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 1,
            "type": "integer",
            "description": "Only flights up to this price (in the currency below; for round trips, the round-trip total)."
          },
          "maxDurationHours": {
            "title": "Maximum flight duration",
            "minimum": 1,
            "maximum": 99,
            "type": "integer",
            "description": "Only itineraries up to this many hours, connections included."
          },
          "minLayoverHours": {
            "title": "Minimum layover (hours)",
            "minimum": 0,
            "maximum": 48,
            "type": "number",
            "description": "Optional. Only flights whose connections are at least this long, e.g. 1.5. 0 = no minimum."
          },
          "maxLayoverHours": {
            "title": "Maximum layover (hours)",
            "minimum": 0,
            "maximum": 48,
            "type": "number",
            "description": "Optional. Only flights whose connections are at most this long, e.g. 4. 0 = no maximum."
          },
          "connectingAirports": {
            "title": "Connect only via",
            "type": "array",
            "description": "Optional. Only flights that connect at these airports, e.g. ORD, FRA.",
            "items": {
              "type": "string"
            }
          },
          "departureTimeFrom": {
            "title": "Departure time from (hour)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Only flights leaving at or after this hour (0-23, local time)."
          },
          "departureTimeTo": {
            "title": "Departure time to (hour)",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Only flights leaving before this hour (1-24, local time)."
          },
          "arrivalTimeFrom": {
            "title": "Arrival time from (hour)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Only flights arriving at or after this hour (0-23, local time)."
          },
          "arrivalTimeTo": {
            "title": "Arrival time to (hour)",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Only flights arriving before this hour (1-24, local time)."
          },
          "checkedBags": {
            "title": "Checked bags in the price",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Add the airline's fees for this many checked bags to the prices, as Google's Bags filter does.",
            "default": 0
          },
          "carryOnBag": {
            "title": "Carry-on bag in the price",
            "type": "boolean",
            "description": "Add carry-on bag fees to the prices.",
            "default": false
          },
          "excludeBasicEconomy": {
            "title": "Exclude basic economy",
            "type": "boolean",
            "description": "Leave out basic economy fares (no seat choice or carry-on).",
            "default": false
          },
          "lessEmissionsOnly": {
            "title": "Less emissions only",
            "type": "boolean",
            "description": "Only flights with lower than typical CO2 emissions.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "cheapest",
              "departure-time",
              "arrival-time",
              "duration",
              "emissions"
            ],
            "type": "string",
            "description": "Order of the flights, as on Google Flights.",
            "default": "best"
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How many flights to return per route and date, in Google's order. Each flight is one result.",
            "default": 30
          },
          "returnFlightsForTopOutbound": {
            "title": "Next flights for the top N first flights",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "For round trips and multi-city trips, also choose each of the top N first flights and list the flights that can follow it, with the exact price of the whole trip (as Google shows after you pick a flight). Round trips list return flights; multi-city trips take Google's top choice for the middle flights and list options for the last one. Each complete trip is one result. 0 = first flights only.",
            "default": 0
          },
          "maxReturnFlightsPerOutbound": {
            "title": "Complete trips per first flight",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many return flights (or last-flight options for multi-city trips) to list for each chosen first flight.",
            "default": 10
          },
          "bookingOptionsForTop": {
            "title": "Booking options for the top N flights",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Get every seller (airline or travel agency), fare name and price for the top N flights of each search, with a booking link. For round trips and multi-city trips this needs \"Next flights for the top N first flights\" and uses each first flight's best complete trip. Charged per flight that has booking options. 0 = off.",
            "default": 0
          },
          "priceCalendarDays": {
            "title": "Price calendar: number of departure dates",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Also get the cheapest fare for each of this many consecutive departure dates, starting at the first departure date of each route (round trips keep the same trip length; with a fixed return date, the trip length of the first departure date). Each date with a fare is one calendar result. 0 = off.",
            "default": 0
          },
          "includePriceHistory": {
            "title": "Price insights row with price history",
            "type": "boolean",
            "description": "Add one free row per search with Google's price insight: whether prices are low, typical or high, the typical range, and about 60 days of price history. Every flight already carries the price level and typical range.",
            "default": false
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "3-letter currency code for all prices, e.g. USD, EUR, GBP, CAD, AUD, INR.",
            "default": "USD"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter code of the country you search from, e.g. US, GB, DE. Fares can differ by market; Apify Proxy IPs are taken from this country.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of airport and airline names, e.g. en-US, en-GB, de, fr, es.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google throttles repeated requests. Apify Proxy is recommended; sessions and IPs rotate automatically. IPs come from the Country above unless you pick a proxy country here.",
            "default": {
              "useApifyProxy": true
            }
          },
          "useResidentialFallback": {
            "title": "Fall back to residential proxy when blocked",
            "type": "boolean",
            "description": "If Google keeps blocking the default proxy, switch to Apify residential proxy in the same country automatically. No extra cost to you.",
            "default": true
          },
          "maxSearches": {
            "title": "Maximum searches",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit on flight searches in one run (routes x departure dates, multi-city trips and links). Searches past the limit are skipped with a note. Your \"Maximum cost per run\" also stops the run when reached.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at the same time, each with its own session and IP. Higher is faster for big runs.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "How many times to retry with a fresh session and IP when Google throttles a request.",
            "default": 6
          },
          "maxSecondsPerSearch": {
            "title": "Time limit per request (seconds)",
            "minimum": 30,
            "maximum": 600,
            "type": "integer",
            "description": "Stop retrying a search, return-flight list, booking lookup or calendar range after this long, so one stubborn request can't stall the run. It is reported as failed and not charged.",
            "default": 120
          },
          "delayBetweenRequestsSecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between requests in each session to stay under Google's rate limits.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}