{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Prices API",
    "description": "Google Flights prices API & scraper: get live fares, schedules, stops, layovers, airlines, CO2 and booking options for one-way, round-trip and multi-city routes. Export flight price data to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "sdp2CTbUNg0NCnJPf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~google-flights-prices-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-google-flights-prices-api",
        "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/insights_data~google-flights-prices-api/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-google-flights-prices-api",
        "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/insights_data~google-flights-prices-api/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-google-flights-prices-api",
        "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": {
          "urls": {
            "title": "🔗 Google Flights URLs",
            "type": "array",
            "description": "**One or many** Google Flights search links (bulk supported). Open [Google Flights](https://www.google.com/travel/flights), run your search, copy the address bar and paste it here.\n\nSupported: links with `?tfs=…`, `?q=Flights from LAX to JFK on 2026-11-04`, or `#flt=LAX.JFK.2026-11-04`. Route, dates, trip type, cabin and passengers are read from each link. Don't have a link? Leave this empty and use the route fields below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searches": {
            "title": "🔎 Bulk routes",
            "type": "array",
            "description": "Add several routes in one run. Each item is one search with its own route and dates (airport codes like `LAX`, comma-separated codes like `LAX,BUR`, or a city id like `/m/030qb3t`). Leave `return_date` empty for a one-way trip. All other settings below apply to every route.",
            "items": {
              "type": "object",
              "properties": {
                "departure_id": {
                  "title": "From",
                  "type": "string",
                  "description": "Departure airport code(s), e.g. LAX",
                  "editor": "textfield"
                },
                "arrival_id": {
                  "title": "To",
                  "type": "string",
                  "description": "Arrival airport code(s), e.g. JFK",
                  "editor": "textfield"
                },
                "outbound_date": {
                  "title": "Outbound date",
                  "type": "string",
                  "description": "YYYY-MM-DD",
                  "editor": "textfield"
                },
                "return_date": {
                  "title": "Return date",
                  "type": "string",
                  "description": "YYYY-MM-DD (optional, makes it a round trip)",
                  "editor": "textfield"
                }
              },
              "required": [
                "departure_id",
                "arrival_id",
                "outbound_date"
              ]
            }
          },
          "departure_id": {
            "title": "🛫 Departure airport",
            "type": "string",
            "description": "IATA airport code(s) like `LAX`, several separated by commas (`LAX,BUR`), or a city id like `/m/030qb3t`. Used when you don't paste links."
          },
          "arrival_id": {
            "title": "🛬 Arrival airport",
            "type": "string",
            "description": "IATA airport code(s) like `JFK`, several separated by commas, or a city id."
          },
          "outbound_date": {
            "title": "📅 Outbound date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Departure date in `YYYY-MM-DD` format. Must be today or later."
          },
          "return_date": {
            "title": "📅 Return date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Return date in `YYYY-MM-DD`. Leave empty for a one-way trip."
          },
          "trip_type": {
            "title": "🔧 Trip type",
            "enum": [
              "auto",
              "round_trip",
              "one_way",
              "multi_city"
            ],
            "type": "string",
            "description": "`Auto` = round trip when a return date is given, otherwise one-way. Multi-city needs the legs below.",
            "default": "auto"
          },
          "multi_city_json": {
            "title": "🔧 Multi-city legs (JSON)",
            "type": "string",
            "description": "Optional. A JSON list of legs in travel order, e.g. `[{\"departure_id\":\"LAX\",\"arrival_id\":\"JFK\",\"date\":\"2027-05-10\"},{\"departure_id\":\"JFK\",\"arrival_id\":\"LHR\",\"date\":\"2027-05-14\"}]`. When set, the search becomes multi-city."
          },
          "travel_class": {
            "title": "💺 Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to price.",
            "default": "economy"
          },
          "adults": {
            "title": "🧑 Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adults (at least 1).",
            "default": 1
          },
          "children": {
            "title": "🧒 Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of children (2–11 years).",
            "default": 0
          },
          "infants": {
            "title": "👶 Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants traveling on an adult's lap (cannot exceed the number of adults).",
            "default": 0
          },
          "max_stops": {
            "title": "🎯 Maximum stops",
            "enum": [
              "any",
              "nonstop",
              "1_stop",
              "2_stops"
            ],
            "type": "string",
            "description": "Only return flights with up to this many stops.",
            "default": "any"
          },
          "max_price": {
            "title": "💰 Maximum price",
            "minimum": 1,
            "type": "integer",
            "description": "Only flights up to this price, in the currency selected below. Leave empty for no cap."
          },
          "airlines": {
            "title": "🎯 Airlines or alliances",
            "type": "string",
            "description": "Comma-separated airline codes (`DL,B6`) or alliances (`STAR_ALLIANCE`, `SKYTEAM`, `ONEWORLD`). Leave empty for all airlines."
          },
          "exclude_basic": {
            "title": "✅ Exclude Basic Economy",
            "type": "boolean",
            "description": "Drop Basic Economy fares. Applies to the economy cabin only.",
            "default": false
          },
          "currency": {
            "title": "💱 Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter currency code for prices, e.g. `USD`, `EUR`, `GBP`.",
            "default": "USD"
          },
          "gl": {
            "title": "📍 Country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code of the market to search from, e.g. `us`, `de`, `gb`.",
            "default": "us"
          },
          "hl": {
            "title": "🌐 Language",
            "type": "string",
            "description": "Language code for names and labels, e.g. `en`, `de`, `fr`.",
            "default": "en"
          },
          "maxResults": {
            "title": "🔢 Maximum flights per search",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each search after this many flights. Free plan: up to 10 flights per run in total; paid plans have no limit.",
            "default": 100
          },
          "max_pages": {
            "title": "🔢 Result pages",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "`1` = top results, `2` = also the longer \"more flights\" list.",
            "default": 2
          },
          "fetch_booking_options": {
            "title": "🎫 Fetch booking options",
            "type": "boolean",
            "description": "Also collect where each flight can be booked (airlines and travel sites with prices). Adds extra requests and run time.",
            "default": false
          },
          "max_booking_lookups": {
            "title": "🔢 Maximum booking lookups",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many flights per search to resolve booking options for. Only used when booking options are on.",
            "default": 10
          },
          "departure_token": {
            "title": "🔑 Departure token",
            "type": "string",
            "description": "Advanced. The `departure_token` of a flight from an earlier run, to get the next leg's flights (e.g. return flights). Works for a single search."
          },
          "booking_token": {
            "title": "🔑 Booking token",
            "type": "string",
            "description": "Advanced. The `booking_token` of a flight from an earlier run, to fetch only its booking options. Works for a single search."
          },
          "maxConcurrency": {
            "title": "⚡ Parallel searches",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 2
          },
          "maxRetries": {
            "title": "🔁 Maximum retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for a blocked or failed request once the strongest proxy level is reached.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "By default no proxy is used. If Google Flights blocks a request, the Actor switches to a datacenter proxy and then to a residential proxy, and stays on residential for the rest of the run. Pick Apify Proxy groups or your own proxies to start there instead.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}