{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & Price Tracker",
    "description": "Google Flights for any route and dates: every itinerary incl. the ones Google hides, with price, airlines, flight numbers, stops, CO2, aircraft and codeshares; Google's price level and price history; what changed since your last run; the cheapest departure days.",
    "version": "0.1",
    "x-build-id": "121N195Kjr7fvo6fY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-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/foxlabs~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-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/foxlabs~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-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",
        "required": [
          "routes"
        ],
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "search",
              "monitor",
              "cheapest-days"
            ],
            "type": "string",
            "description": "Search: every flight Google Flights has for each route and dates, plus one summary row per search with Google's price level and price history. Monitor: only what changed since the previous run of the same search (new, cheaper, pricier and gone flights); schedule it daily. Cheapest days: the lowest fare for each departure day in a range.",
            "default": "search"
          },
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line, as two 3-letter airport codes: IST-LHR, JFK-LAX (use airport codes such as LHR, not city codes such as LON). A line can carry its own dates: \"JFK-LAX 2026-11-05\" (one-way) or \"JFK-LAX 2026-11-05 2026-11-12\" (round trip). Lines without dates use the dates below.",
            "items": {
              "type": "string"
            }
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD, or days from today such as +30 (counted in UTC, so a scheduled run always searches 30 days ahead). Monitor mode compares the same flights from run to run and needs a fixed date (YYYY-MM-DD). In cheapest-days mode this is the first day scanned.",
            "default": "+30"
          },
          "returnDate": {
            "title": "Return date (optional)",
            "type": "string",
            "description": "Leave empty for one-way. YYYY-MM-DD, or +N for N days after the departure (+7 = a week). Round-trip prices are the total for both directions. In cheapest-days mode use +N: every scanned day gets a return N days later."
          },
          "scanDays": {
            "title": "Days to scan (cheapest-days mode)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How many departure days, starting at the departure date, the cheapest-days mode searches. One search per day.",
            "default": 14
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class of every search.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers. Prices are for all of them together, as Google Flights shows them.",
            "default": 1
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Google's own stop filter.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines (optional)",
            "type": "array",
            "description": "Google's airline filter, as 2-character airline codes: TK, LH, BA. Google also returns codeshare flights sold under these codes but flown by partner airlines (a BA filter can return American Airlines AA 103, sold as BA 1516); in the output, airlines shows who flies the plane and codeshares lists the numbers it is sold under. Leave empty for every airline.",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "TRY",
              "JPY",
              "CAD",
              "AUD",
              "CHF",
              "INR",
              "AED",
              "SAR",
              "BRL",
              "MXN",
              "CNY",
              "HKD",
              "SGD",
              "KRW",
              "THB",
              "IDR",
              "PLN",
              "SEK",
              "NOK",
              "DKK",
              "CZK",
              "HUF",
              "ZAR",
              "NZD",
              "ILS",
              "EGP",
              "MAD"
            ],
            "type": "string",
            "description": "Currency of every price.",
            "default": "USD"
          },
          "country": {
            "title": "Market (country)",
            "type": "string",
            "description": "Two-letter country of the searcher, such as us, gb, de, tr. Google Flights shows fares for this market.",
            "default": "us"
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Stop after this many flight rows for each route and dates (up to 300). In monitor mode it caps the change rows: the first run stores every flight as the baseline and delivers this many of them; in later runs, changes that do not fit come in the following runs, up to this many per run. The form starts at 20 for a quick first run; an API call without this field gets 200.",
            "default": 200
          },
          "includeHiddenFlights": {
            "title": "Include the flights Google hides",
            "type": "boolean",
            "description": "Google Flights shows a short list and hides the rest behind \"View more flights\" (dearer or slower options). On: the whole list, in the same single request. Off: the shown list only.",
            "default": true
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Monitor mode keeps the last result of each search in a key-value store of your Apify account called google-flights-monitor-<name>. Use a different name for each separate watch list. Letters, digits and hyphens.",
            "default": "default"
          },
          "minPriceChangePercent": {
            "title": "Minimum price change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "A flight counts as cheaper or pricier when its price moved at least this much since it was last reported. 0 reports every change. Smaller moves add up until they pass the threshold.",
            "default": 1
          },
          "includeUnchanged": {
            "title": "Also list unchanged flights",
            "type": "boolean",
            "description": "Off: monitor rows are only the changes. On: every flight is listed, unchanged ones marked UNCHANGED (each row is charged as a flight).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most runs. Leave off and the Actor switches to Apify residential proxy by itself if Google rate-limits it.",
            "default": {
              "useApifyProxy": false
            }
          },
          "autoProxyFallback": {
            "title": "Switch to residential proxy when Google limits requests",
            "type": "boolean",
            "description": "On by default.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}