{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Cheap Flights & Flight Price API",
    "description": "Google Flights API for cheap flights and flight prices on any route and dates: airlines, flight numbers, times, stops, layovers, aircraft, legroom, CO2 and Google's low/typical/high price verdict. One-way and round trips, every cabin, 60-day price history. No browser.",
    "version": "0.1",
    "x-build-id": "gLRNfjWyHcEVYr6HK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prestilink~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prestilink-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/prestilink~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-prestilink-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/prestilink~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-prestilink-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, origin-destination, with IATA airport codes (`JFK-LAX`, `CDG-RAK`) or city codes that cover every airport of a city (`NYC-LON`, `PAR-TYO`). Several airports: `JFK,EWR-LAX`.",
            "items": {
              "type": "string"
            }
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$|^(in )?\\+?\\d{1,3}( ?days?)?$",
            "type": "string",
            "description": "YYYY-MM-DD, or relative like `+30` (30 days from today). Leave empty for 14 days from today."
          },
          "returnDate": {
            "title": "Return date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$|^(in )?\\+?\\d{1,3}( ?days?)?$",
            "type": "string",
            "description": "Set it for a round trip (YYYY-MM-DD or `+37`). Leave empty for one-way."
          },
          "tripLengthDays": {
            "title": "Trip length (days)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Round trip of this many days, used when Return date is empty. 0 or empty means one-way."
          },
          "datesToSearch": {
            "title": "Number of departure dates",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Search this many consecutive departure dates, starting at the departure date, to find the cheapest day. Round trips keep the same trip length. Each date is one search.",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Travellers aged 12 and over.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Under 2, with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Under 2, on an adult's lap. One per adult.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to price.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Only these airlines, by 2-character IATA code (`AA`, `BA`, `AF`, `EK`), or alliances: `ONEWORLD`, `SKYTEAM`, `STAR_ALLIANCE`. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "excludeAirlines": {
            "title": "Exclude airlines",
            "type": "array",
            "description": "Never these airlines or alliances, same codes as above.",
            "items": {
              "type": "string"
            }
          },
          "returnFlightsFor": {
            "title": "Return flights for the top N outbound flights",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Round trips only. Google prices round trips on the outbound flight; set this to also get the return flights for the N best outbound flights, each with the exact round-trip price. Each one is an extra search.",
            "default": 0
          },
          "maxResultsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Keep at most this many flights from each search (Google usually lists 10 to 150).",
            "default": 100
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Drop flights above this total price, in the selected currency."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure"
            ],
            "type": "string",
            "description": "Order of flights within each search.",
            "default": "best"
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Also save Google's price history for each search: the lowest price on each of the last 60 days, the price level and the typical price range. One extra item per search, free. Google only has it for searches with one adult.",
            "default": false
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "NZD",
              "CHF",
              "JPY",
              "CNY",
              "HKD",
              "SGD",
              "KRW",
              "INR",
              "IDR",
              "MYR",
              "THB",
              "PHP",
              "VND",
              "AED",
              "SAR",
              "QAR",
              "ILS",
              "TRY",
              "EGP",
              "MAD",
              "ZAR",
              "MXN",
              "BRL",
              "ARS",
              "CLP",
              "COP",
              "PEN",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON"
            ],
            "type": "string",
            "description": "Currency for all prices.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr",
              "de",
              "es",
              "it",
              "pt",
              "nl",
              "pl",
              "tr",
              "ru",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW",
              "ar",
              "hi",
              "id",
              "th",
              "vi",
              "sv"
            ],
            "type": "string",
            "description": "Language of airline, airport and aircraft names.",
            "default": "en"
          },
          "countryCode": {
            "title": "Searcher country",
            "type": "string",
            "description": "Two-letter country code of the traveller, for example `us`, `gb`, `fr`. Prices can depend on it.",
            "default": "us"
          },
          "startUrls": {
            "title": "Google Flights URLs",
            "type": "array",
            "description": "Optional. Paste Google Flights search URLs (google.com/travel/flights/search?tfs=...) to reuse every filter you set on Google.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}