{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper: Prices, Itineraries & Cheapest Dates",
    "description": "Flight prices from Google Flights for any route, dates, passengers, cabin and currency: every itinerary with airlines, flight numbers, legs, layovers, duration, CO2 and price insight. Round trips with return flights, and a cheapest-dates calendar. $0.15 per 1,000 flights.",
    "version": "1.0",
    "x-build-id": "LKQbYyaJhfys62ZlC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fairfetch~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fairfetch-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/fairfetch~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fairfetch-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/fairfetch~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fairfetch-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",
            "type": "string",
            "description": "Where the trip starts: an airport code in capitals (JFK), several airport codes separated by commas (JFK,EWR,LGA), a city code (NYC, LON, PAR), or a city or region name as Google Flights knows it (New York, Bali, Italy, Goa). A three-letter word not in capitals (\"Goa\", \"Kos\") is looked up as a place first and used as an airport code only when no place has exactly that name; type the code in capitals (GOA) to force the airport. A name that matches several places (Springfield) gives a free error row listing them."
          },
          "destination": {
            "title": "To",
            "type": "string",
            "description": "Where the trip goes, in the same forms as \"From\"."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "A date (YYYY-MM-DD) or a date relative to today (UTC), e.g. \"30 days\" or \"2 weeks\": relative dates keep scheduled runs looking the same distance ahead. Empty = 30 days from today. Google Flights sells flights up to 330 days ahead."
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "type": "string",
            "description": "Optional. Empty = one way (unless \"Trip length\" is set). A date (YYYY-MM-DD) or a date relative to today (UTC). Round-trip rows list the outbound flights, each with the cheapest round-trip total Google shows for it; turn on \"Add return flights\" to get the return options too."
          },
          "tripLengthDays": {
            "title": "Trip length in days (round trip)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Optional instead of a return date: the return is this many days after the departure (handy with relative departure dates and with \"Cheapest dates\"). 0 or empty = use the return date, or one way."
          },
          "routes": {
            "title": "More routes (same dates and passengers)",
            "type": "array",
            "description": "Optional. One route per line, each searched with the dates, passengers and cabin above: ORIGIN-DESTINATION with codes (JFK-LHR, JFK,EWR-LHR, NYC-PAR) or names with \" to \" (New York to London). These run in addition to From/To: clear From and To to search only these routes. A route that can't be read gives a free error row; the others still run.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "flights",
              "cheapest_dates"
            ],
            "type": "string",
            "description": "\"Flights\": one row per itinerary of each search (sorted as you choose). \"Cheapest dates\": one row per departure date with that day's cheapest itinerary (a price calendar with full flight details), for \"Number of dates\" days from the departure date; round trips keep the same trip length.",
            "default": "flights"
          },
          "maxResultsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Flights mode: at most this many itineraries per search (Google Flights lists about 20-300 for a route and date; the top flights come first with \"Best\").",
            "default": 100
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure_time"
            ],
            "type": "string",
            "description": "Order of the itineraries (and which ones are kept when \"Max flights per search\" is smaller than the list).",
            "default": "best"
          },
          "includeReturnFlights": {
            "title": "Add return flights (round trips)",
            "type": "boolean",
            "description": "Round trips in Flights mode: every outbound row also lists its return flights (cheapest first, each with the exact round-trip total). One extra request per outbound flight; such rows are charged as \"Flight with return flights\" instead of \"Flight\".",
            "default": false
          },
          "maxReturnFlights": {
            "title": "Return flights per outbound flight",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "With \"Add return flights\": how many return options to keep for each outbound flight, cheapest first.",
            "default": 5
          },
          "calendarDays": {
            "title": "Number of dates (Cheapest dates)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Cheapest dates mode: how many departure dates to price, starting at the departure date (one request and one row per date).",
            "default": 14
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Passengers aged 12 and over. Prices are the total for all passengers.",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Passengers aged 2 to 11.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Under 2, on an adult's lap (at most one per adult).",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Under 2, with their own seat. At most 9 passengers in total, and at most 2 infants (on lap and in seat together) per adult.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "The cabin Google Flights prices.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Google Flights' stops filter.",
            "default": "any"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "INR",
              "AUD",
              "CAD",
              "JPY",
              "CHF",
              "CNY",
              "HKD",
              "SGD",
              "AED",
              "SAR",
              "NZD",
              "MXN",
              "BRL",
              "KRW",
              "THB",
              "MYR",
              "IDR",
              "PHP",
              "VND",
              "ZAR",
              "TRY",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "ILS",
              "EGP",
              "NGN",
              "ALL",
              "AMD",
              "ARS",
              "AWG",
              "AZN",
              "BAM",
              "BHD",
              "BMD",
              "BSD",
              "BYN",
              "CLP",
              "COP",
              "CRC",
              "CUP",
              "DOP",
              "DZD",
              "GEL",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "KWD",
              "KZT",
              "LBP",
              "MAD",
              "MDL",
              "MKD",
              "OMR",
              "PAB",
              "PEN",
              "PKR",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "TWD",
              "UAH",
              "XPF"
            ],
            "type": "string",
            "description": "Currency of all prices (Google Flights converts; the requested currency is honoured from any IP).",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "pattern": "^[a-z]{2,3}(-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "Google language code for airport, city and airline names, e.g. en, de, fr, es, ja, pt-BR.",
            "default": "en"
          },
          "country": {
            "title": "Google region (gl)",
            "pattern": "^[a-zA-Z]{2}$",
            "type": "string",
            "description": "Two-letter region code sent to Google as \"gl\", e.g. us, gb, de, in. In our tests (22 Oct 2026: 6 routes on 4 continents, 7 regions each) it changed no fare and no itinerary, so you can leave it at \"us\"; prices are always in the currency you choose.",
            "default": "us"
          },
          "searches": {
            "title": "Searches with their own settings (advanced)",
            "type": "array",
            "description": "Optional. A list of objects, each one search: {\"origin\": \"SFO\", \"destination\": \"NRT\", \"departureDate\": \"2026-12-10\", \"returnDate\": \"2026-12-20\", \"adults\": 2, \"cabinClass\": \"business\", \"currency\": \"JPY\"}. Fields an entry leaves out come from the main form; allowed fields: origin, destination, departureDate, returnDate, tripLengthDays, adults, children, infantsOnLap, infantsInSeat, cabinClass, maxStops, currency."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The default Apify Proxy (data center) works and costs nothing extra. Residential and Google SERP proxies are refused (they would cost more than the results).",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Searches in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 4
          },
          "maxAttempts": {
            "title": "Attempts per request",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a request is tried in total (each retry from another IP) before the search is reported as failed.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}