{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "Scrape Google Flights: itineraries with price, airlines, legs, stops, duration and emissions for any route and dates; a cheapest-fare date grid; return-leg and booking options (which airline or OTA sells it, at what price); airport code lookup. No proxies needed.",
    "version": "0.0",
    "x-build-id": "WLGUtmPngPFF3FLbe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapercompany~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapercompany-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/scrapercompany~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapercompany-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/scrapercompany~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapercompany-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "calendar",
              "return",
              "booking",
              "locations"
            ],
            "type": "string",
            "description": "Start with <b>Flight search</b>. Its itineraries carry a <code>departure_token</code> (round trips: use it in <b>Return options</b>) or a <code>booking_token</code> (use it in <b>Booking options</b> to see where to buy).",
            "default": "search"
          },
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line as <code>DEPARTURE-ARRIVAL</code> IATA codes: airports (<code>JFK-LAX</code>), cities (<code>NYC-LON</code>) or several airports (<code>JFK,EWR-LAX</code>). Used by Flight search and Price calendar.",
            "default": [
              "JFK-LAX"
            ],
            "items": {
              "type": "string"
            }
          },
          "departure_date": {
            "title": "Departure date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Outbound date: exact (<code>2026-12-01</code>) or relative (<code>30 days</code> from today). For Price calendar it is the centre of the date grid.",
            "default": "30 days"
          },
          "return_date": {
            "title": "Return date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Leave empty for one-way. Exact or relative (<code>35 days</code> from today)."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers (12+), 1-9.",
            "default": 1
          },
          "cabin_class": {
            "title": "Cabin class",
            "enum": [
              "business",
              "economy",
              "first",
              "premium_economy"
            ],
            "type": "string",
            "description": "Cabin to search.",
            "default": "economy"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "AED",
              "ARS",
              "AUD",
              "BRL",
              "CAD",
              "CHF",
              "CLP",
              "CNY",
              "COP",
              "CZK",
              "DKK",
              "EGP",
              "EUR",
              "GBP",
              "HKD",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "JPY",
              "KRW",
              "MXN",
              "MYR",
              "NOK",
              "NZD",
              "PEN",
              "PHP",
              "PLN",
              "QAR",
              "RON",
              "SAR",
              "SEK",
              "SGD",
              "THB",
              "TRY",
              "TWD",
              "USD",
              "VND",
              "ZAR"
            ],
            "type": "string",
            "description": "Currency for prices.",
            "default": "USD"
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "arrival_time",
              "departure_time",
              "duration",
              "emissions",
              "price",
              "top_flights"
            ],
            "type": "string",
            "description": "Result order. Anything other than Top flights returns Google's full list.",
            "default": "top_flights"
          },
          "stops": {
            "title": "Maximum stops",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "0 = nonstop only, 1 = at most one stop, 2 = at most two. Leave empty for any."
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2-11.",
            "default": 0
          },
          "infants_in_seat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infants_on_lap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Lap infants under 2 (at most one per adult).",
            "default": 0
          },
          "carry_on_bags": {
            "title": "Carry-on bags",
            "minimum": 0,
            "maximum": 1,
            "type": "integer",
            "description": "Carry-on bags per passenger to include in the price (0-1).",
            "default": 0
          },
          "checked_bags": {
            "title": "Checked bags",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Checked bags per passenger to include in the price (0-2).",
            "default": 0
          },
          "include_airlines": {
            "title": "Only these airlines",
            "type": "string",
            "description": "Comma-separated IATA airline codes or alliances (<code>STAR_ALLIANCE</code>, <code>SKYTEAM</code>, <code>ONEWORLD</code>), e.g. <code>AC,UA</code>. Not with Exclude airlines."
          },
          "exclude_airlines": {
            "title": "Exclude airlines",
            "type": "string",
            "description": "Comma-separated airline codes to drop, e.g. <code>B6</code>."
          },
          "max_price": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only itineraries at or below this price, in the selected currency."
          },
          "max_duration": {
            "title": "Maximum duration (minutes)",
            "minimum": 0,
            "maximum": 5760,
            "type": "integer",
            "description": "Maximum door-to-door time per leg, in minutes."
          },
          "outbound_times": {
            "title": "Outbound time window",
            "type": "string",
            "description": "Departure hours <code>from,to</code> (0-23), optionally followed by arrival hours: <code>6,12</code> leaves 06:00-12:59."
          },
          "return_times": {
            "title": "Return time window",
            "type": "string",
            "description": "Same format as the outbound window, for the return leg."
          },
          "layover_duration": {
            "title": "Layover length (minutes)",
            "type": "string",
            "description": "<code>min,max</code> minutes, e.g. <code>60,240</code>."
          },
          "connecting_airports": {
            "title": "Only connect through",
            "type": "string",
            "description": "Comma-separated IATA codes, e.g. <code>ORD,DTW</code>."
          },
          "exclude_connecting_airports": {
            "title": "Never connect through",
            "type": "string",
            "description": "Comma-separated IATA codes."
          },
          "exclude_basic_economy": {
            "title": "Exclude basic economy",
            "type": "boolean",
            "description": "Hide basic-economy fares (US routes).",
            "default": false
          },
          "less_emissions": {
            "title": "Lower emissions only",
            "type": "boolean",
            "description": "Only flights with lower-than-typical emissions.",
            "default": false
          },
          "date_window_days": {
            "title": "Date window (Price calendar)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Days before and after the target dates to include in the grid (1-30).",
            "default": 7
          },
          "tokens": {
            "title": "Tokens (Return / Booking options)",
            "type": "array",
            "description": "A <code>departure_token</code> (Return options) or <code>booking_token</code> (Booking options) per line, copied from a Flight search result. Tokens start with <code>gf1.</code>.",
            "items": {
              "type": "string"
            }
          },
          "places": {
            "title": "Places (Airport/city lookup)",
            "type": "array",
            "description": "City, airport or region names to resolve to IATA codes, e.g. <code>paris</code>, <code>Heathrow</code>.",
            "default": [
              "paris"
            ],
            "items": {
              "type": "string"
            }
          },
          "gl": {
            "title": "Google country",
            "enum": [
              "ad",
              "ae",
              "af",
              "ag",
              "ai",
              "al",
              "am",
              "ao",
              "aq",
              "ar",
              "as",
              "at",
              "au",
              "aw",
              "ax",
              "az",
              "ba",
              "bb",
              "bd",
              "be",
              "bf",
              "bg",
              "bh",
              "bi",
              "bj",
              "bl",
              "bm",
              "bn",
              "bo",
              "bq",
              "br",
              "bs",
              "bt",
              "bv",
              "bw",
              "by",
              "bz",
              "ca",
              "cc",
              "cd",
              "cf",
              "cg",
              "ch",
              "ci",
              "ck",
              "cl",
              "cm",
              "cn",
              "co",
              "cr",
              "cu",
              "cv",
              "cw",
              "cx",
              "cy",
              "cz",
              "de",
              "dj",
              "dk",
              "dm",
              "do",
              "dz",
              "ec",
              "ee",
              "eg",
              "eh",
              "er",
              "es",
              "et",
              "fi",
              "fj",
              "fk",
              "fm",
              "fo",
              "fr",
              "ga",
              "gb",
              "gd",
              "ge",
              "gf",
              "gg",
              "gh",
              "gi",
              "gl",
              "gm",
              "gn",
              "gp",
              "gq",
              "gr",
              "gs",
              "gt",
              "gu",
              "gw",
              "gy",
              "hk",
              "hm",
              "hn",
              "hr",
              "ht",
              "hu",
              "id",
              "ie",
              "il",
              "im",
              "in",
              "io",
              "iq",
              "ir",
              "is",
              "it",
              "je",
              "jm",
              "jo",
              "jp",
              "ke",
              "kg",
              "kh",
              "ki",
              "km",
              "kn",
              "kp",
              "kr",
              "kw",
              "ky",
              "kz",
              "la",
              "lb",
              "lc",
              "li",
              "lk",
              "lr",
              "ls",
              "lt",
              "lu",
              "lv",
              "ly",
              "ma",
              "mc",
              "md",
              "me",
              "mf",
              "mg",
              "mh",
              "mk",
              "ml",
              "mm",
              "mn",
              "mo",
              "mp",
              "mq",
              "mr",
              "ms",
              "mt",
              "mu",
              "mv",
              "mw",
              "mx",
              "my",
              "mz",
              "na",
              "nc",
              "ne",
              "nf",
              "ng",
              "ni",
              "nl",
              "no",
              "np",
              "nr",
              "nu",
              "nz",
              "om",
              "pa",
              "pe",
              "pf",
              "pg",
              "ph",
              "pk",
              "pl",
              "pm",
              "pn",
              "pr",
              "ps",
              "pt",
              "pw",
              "py",
              "qa",
              "re",
              "ro",
              "rs",
              "ru",
              "rw",
              "sa",
              "sb",
              "sc",
              "sd",
              "se",
              "sg",
              "sh",
              "si",
              "sj",
              "sk",
              "sl",
              "sm",
              "sn",
              "so",
              "sr",
              "ss",
              "st",
              "sv",
              "sx",
              "sy",
              "sz",
              "tc",
              "td",
              "tf",
              "tg",
              "th",
              "tj",
              "tk",
              "tl",
              "tm",
              "tn",
              "to",
              "tr",
              "tt",
              "tv",
              "tw",
              "tz",
              "ua",
              "ug",
              "uk",
              "um",
              "us",
              "uy",
              "uz",
              "va",
              "vc",
              "ve",
              "vg",
              "vi",
              "vn",
              "vu",
              "wf",
              "ws",
              "xk",
              "ye",
              "yt",
              "za",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Two-letter market code.",
            "default": "us"
          },
          "hl": {
            "title": "Language",
            "type": "string",
            "description": "Language code for results, e.g. <code>en</code>.",
            "default": "en"
          },
          "customRequests": {
            "title": "Custom requests (advanced)",
            "type": "array",
            "description": "Optional list of JSON objects, one request each, using the API field names shown above. Each object is merged over the options above, so you only need to give what differs. Use this for multi-city trips (<code>multi_city</code>) or <code>departure_id</code>/<code>arrival_id</code> with Google city ids. Example: <code>{\"departure\":\"YUL\",\"arrival\":\"PAR\",\"departure_date\":\"2026-12-15\",\"multi_city\":[{\"departure\":\"CDG\",\"arrival\":\"FCO\",\"date\":\"2026-12-20\"},{\"departure\":\"FCO\",\"arrival\":\"YUL\",\"date\":\"2026-12-27\"}]}</code>"
          },
          "includeErrors": {
            "title": "Include failed requests in the dataset",
            "type": "boolean",
            "description": "When on, a request that fails (for example an unknown property id) is saved as a dataset item with an <code>error</code> message so you can see what went wrong. Failed requests are never charged.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many API requests run at the same time.",
            "default": 3
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for rate limits (HTTP 429), temporary server errors (5xx) and network errors, with exponential backoff. Validation errors are never retried.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}