{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights API: Flight Prices, Cheapest Dates & Itineraries",
    "description": "Flight prices from Google Flights for any route and dates: one way or round trip, cabin, stops, airlines, every leg with flight numbers, times, layovers, aircraft and CO2. Plus a cheapest-dates price calendar. $1 per 1,000 flights.",
    "version": "0.1",
    "x-build-id": "lbpYdQww5ZvspobqB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sauliusautomatesit~google-flights-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sauliusautomatesit-google-flights-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/sauliusautomatesit~google-flights-api/runs": {
      "post": {
        "operationId": "runs-sync-sauliusautomatesit-google-flights-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/sauliusautomatesit~google-flights-api/run-sync": {
      "post": {
        "operationId": "run-sync-sauliusautomatesit-google-flights-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",
        "required": [
          "routes"
        ],
        "properties": {
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line, origin then destination: airport codes (`LHR-JFK`), metro codes for every airport in a city (`LON-NYC`, `PAR-TYO`), city names (`London-New York`) or several airports on one side (`SFO,OAK-LAX`).",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "flights",
              "cheapest-dates"
            ],
            "type": "string",
            "description": "`flights`: every flight Google lists for the date, with price and full itinerary. `cheapest-dates`: the lowest price for each departure date over a range (Google's date grid), to find the cheapest day to fly.",
            "default": "flights"
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty for 30 days from today. In cheapest-dates mode this is the first date of the range."
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "Optional, YYYY-MM-DD. Makes it a round trip: prices are the round-trip total and each row shows the outbound itinerary. In cheapest-dates mode it sets the trip length kept for every date."
          },
          "tripLengthDays": {
            "title": "Trip length in days (round trip without a fixed return date)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Instead of a return date: return this many days after each departure. Useful with `Departure dates to cover` and in cheapest-dates mode. Ignored when a return date is set."
          },
          "departureDays": {
            "title": "Departure dates to cover",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Flights mode: repeat every route for this many consecutive departure dates, starting at the departure date (a round trip keeps its length). Each date is its own search.",
            "default": 1
          },
          "calendarDays": {
            "title": "Days in the price calendar",
            "minimum": 1,
            "maximum": 330,
            "type": "integer",
            "description": "Cheapest-dates mode: how many departure dates to price, starting at the departure date.",
            "default": 60
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Prices are for all passengers together.",
            "default": 1
          },
          "children": {
            "title": "Children (2 to 11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 on an adult's lap (one per adult).",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Economy, premium economy, business or first.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "one-stop",
              "two-stops"
            ],
            "type": "string",
            "description": "Most stops allowed on each way.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Optional. Only these airlines: two-character codes (`BA`, `UA`, `LH`) or an alliance (`ONEWORLD`, `SKYTEAM`, `STAR_ALLIANCE`). Google also keeps flights sold by their partners.",
            "items": {
              "type": "string"
            }
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Skip flights above this total price, in the chosen currency."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "top",
              "price",
              "departure-time",
              "arrival-time",
              "duration"
            ],
            "type": "string",
            "description": "Order of flights in each search. `top` is Google's own best-flights order.",
            "default": "top"
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Stop after this many flights for each route and date. Google usually lists 10 to 60.",
            "default": 30
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three-letter code: `USD`, `EUR`, `GBP`, `INR`, `JPY`...",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google interface language for airport and airline names, for example `en`, `de`, `fr`.",
            "default": "en"
          },
          "country": {
            "title": "Country of the searcher",
            "type": "string",
            "description": "Two-letter country code Google uses for the searcher, for example `us`, `gb`, `de`.",
            "default": "us"
          },
          "concurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default. You do not need to change this.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}