{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper - All Fares, Price History, Calendar",
    "description": "Returns the flights Google Flights lists for a route and date: price, airlines, flight numbers, times, stops, layovers, aircraft, legroom and CO2, with Google's price insights (usual price, typical range, 60 days of history). Whole lists, fare calendars, round trips. No browser, no login.",
    "version": "1.0",
    "x-build-id": "KzgbFbC9gKmFl79An"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benthepythondev~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benthepythondev-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/benthepythondev~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-benthepythondev-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/benthepythondev~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-benthepythondev-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": {
          "origins": {
            "title": "From",
            "type": "array",
            "description": "Three-letter airport or city codes, for example JFK, LHR or NYC for all New York airports. Every origin is searched with every destination.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "To",
            "type": "array",
            "description": "Three-letter airport or city codes.",
            "items": {
              "type": "string"
            }
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "The first departure day (YYYY-MM-DD). Without a date the search starts the number of days ahead that is set below."
          },
          "departureInDays": {
            "title": "Departure in … days",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Used when no departure date is given: the search starts this many days from today. Useful for schedules, where a fixed date would grow old.",
            "default": 30
          },
          "days": {
            "title": "Number of departure days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Searches this many days in a row, starting at the departure date: one search per route and day. With one result per search and the order \"price\" this gives a fare calendar.",
            "default": 1
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "Makes the search a round trip (YYYY-MM-DD). Rows are the outbound flights with Google's price for the whole trip. Over several departure days the stay keeps its length."
          },
          "stayDays": {
            "title": "Or: length of stay in days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Makes the search a round trip that returns this many days after each departure."
          },
          "maxResults": {
            "title": "Maximum flights per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Rows to save for each route and day, taken from the top of the chosen order. A busy route has about 120 itineraries.",
            "default": 20
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "best",
              "top",
              "price",
              "duration",
              "departure",
              "arrival",
              "emissions"
            ],
            "type": "string",
            "description": "Google's own order puts its best flights first and the others after them. The other orders sort the whole list before the limit is applied.",
            "default": "best"
          },
          "stops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Google's stops filter.",
            "default": "any"
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "The cabin the prices are for.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Passengers aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in a seat",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Passengers under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Passengers under 2 without a seat.",
            "default": 0
          },
          "onlyAirlines": {
            "title": "Only these airlines",
            "type": "array",
            "description": "Two-character airline codes such as DL, BA or LH. Google keeps flights of these airlines and their code-share partners.",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three-letter currency code for the prices, for example USD, EUR or GBP.",
            "default": "USD"
          },
          "includePriceHistory": {
            "title": "Add the price history",
            "type": "boolean",
            "description": "Adds Google's history of the lowest price for the search, about 60 daily values, to each row. It makes rows larger; with one result per search it is one history per route and day.",
            "default": false
          },
          "links": {
            "title": "Google Flights links",
            "type": "array",
            "description": "Search links copied from Google Flights (they contain tfs=). The search is run as the link defines it.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}