{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper - Prices, Emissions & Booking Options",
    "description": "Scrape Google Flights fares, airlines, times, stops, layovers, CO2 and price insights, plus per-seller booking options. Export to CSV, Excel, JSON or XML.",
    "version": "0.1",
    "x-build-id": "EjHwsqMcNGfpoVEC5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-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/parseforge~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-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/parseforge~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-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": {
          "origin": {
            "title": "From (origin)",
            "type": "string",
            "description": "IATA airport or city code the trip starts from, e.g. JFK, LHR or NYC (all New York airports). Several airports can be combined with commas: JFK,EWR,LGA."
          },
          "destination": {
            "title": "To (destination)",
            "type": "string",
            "description": "IATA airport or city code of the destination, e.g. LAX, CDG or LON (all London airports). Several airports can be combined with commas."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "Outbound date, YYYY-MM-DD. Must be today or later."
          },
          "returnDate": {
            "title": "Return date (optional)",
            "type": "string",
            "description": "Fill it for a round trip. Leave it empty for a one-way search. Round-trip prices are the total for both directions."
          },
          "startUrls": {
            "title": "Google Flights search URLs (optional)",
            "type": "array",
            "description": "Paste Google Flights search links (the ones with tfs= in the address). One-way and round-trip links are supported. Each link runs as its own search, next to the route above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "cabinClass": {
            "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": "Passengers aged 12 or older.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Passengers aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 travelling on an adult lap.",
            "default": 0
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Google Flights stops filter.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines or alliances",
            "type": "array",
            "description": "Only show flights from these carriers. Use 2-letter IATA airline codes (DL, BA, LH) or an alliance: ONEWORLD, SKYTEAM, STAR_ALLIANCE. Leave empty for all airlines.",
            "items": {
              "type": "string"
            }
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 1,
            "type": "integer",
            "description": "Drop options above this total price, in the selected currency."
          },
          "maxDurationMinutes": {
            "title": "Max travel time (minutes)",
            "minimum": 30,
            "type": "integer",
            "description": "Drop options whose total travel time, layovers included, is longer than this."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departureTime",
              "arrivalTime",
              "emissions"
            ],
            "type": "string",
            "description": "Order of the results. \"Best\" keeps the order Google Flights shows, with its top flights first.",
            "default": "best"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "ALL",
              "DZD",
              "ARS",
              "AMD",
              "AWG",
              "AUD",
              "AZN",
              "BSD",
              "BHD",
              "BYN",
              "BMD",
              "BAM",
              "BRL",
              "GBP",
              "CAD",
              "XPF",
              "CLP",
              "CNY",
              "COP",
              "CRC",
              "CUP",
              "CZK",
              "DKK",
              "DOP",
              "EGP",
              "EUR",
              "GEL",
              "HKD",
              "HUF",
              "ISK",
              "INR",
              "IDR",
              "IRR",
              "ILS",
              "JMD",
              "JPY",
              "JOD",
              "KZT",
              "KWD",
              "LBP",
              "MKD",
              "MYR",
              "MXN",
              "MDL",
              "MAD",
              "TWD",
              "NZD",
              "NGN",
              "NOK",
              "OMR",
              "PKR",
              "PAB",
              "PEN",
              "PHP",
              "PLN",
              "QAR",
              "RON",
              "RUB",
              "SAR",
              "RSD",
              "SGD",
              "ZAR",
              "KRW",
              "SEK",
              "CHF",
              "THB",
              "TRY",
              "UAH",
              "AED",
              "USD",
              "VND"
            ],
            "type": "string",
            "description": "Currency for every price.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "af",
              "bs",
              "ca",
              "cs",
              "da",
              "de",
              "et",
              "en-GB",
              "en-US",
              "es",
              "es-419",
              "eu",
              "fil",
              "fr",
              "gl",
              "hr",
              "id",
              "is",
              "it",
              "sw",
              "lv",
              "lt",
              "hu",
              "ms",
              "nl",
              "no",
              "pl",
              "pt-BR",
              "pt-PT",
              "ro",
              "sq",
              "sk",
              "sl",
              "sr-Latn",
              "fi",
              "sv",
              "vi",
              "tr",
              "el",
              "bg",
              "mk",
              "mn",
              "ru",
              "sr",
              "uk",
              "ka",
              "iw",
              "ur",
              "ar",
              "fa",
              "am",
              "ne",
              "mr",
              "hi",
              "as",
              "bn",
              "pa",
              "gu",
              "or",
              "ta",
              "te",
              "kn",
              "ml",
              "si",
              "th",
              "lo",
              "km",
              "ko",
              "zh-HK",
              "ja",
              "zh-CN",
              "zh-TW"
            ],
            "type": "string",
            "description": "Language for airport names and labels.",
            "default": "en-US"
          },
          "country": {
            "title": "Country (point of sale)",
            "enum": [
              "AF",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AG",
              "AR",
              "AM",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "CF",
              "TD",
              "CL",
              "CN",
              "CO",
              "CG",
              "CD",
              "CK",
              "CR",
              "CI",
              "HR",
              "CU",
              "CY",
              "CZ",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "EE",
              "ET",
              "FJ",
              "FI",
              "FR",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GT",
              "GG",
              "GY",
              "HT",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IM",
              "IL",
              "IT",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LY",
              "LI",
              "LT",
              "LU",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MU",
              "MX",
              "FM",
              "MD",
              "MN",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "MK",
              "NO",
              "OM",
              "PK",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PN",
              "PL",
              "PT",
              "PR",
              "QA",
              "RO",
              "RU",
              "RW",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "KR",
              "ES",
              "LK",
              "SH",
              "VC",
              "SR",
              "SE",
              "CH",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "UZ",
              "VU",
              "VE",
              "VN",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Market Google Flights prices the search for. Fares can differ between countries.",
            "default": "US"
          },
          "includeReturnFlights": {
            "title": "Include return flights (round trips)",
            "type": "boolean",
            "description": "For round trips, also collect the return options for the top outbound flights, each with the full round-trip price and a booking link for the pair. Each return option is a result.",
            "default": false
          },
          "returnFlightsForTopOutbound": {
            "title": "Return flights for how many outbound options",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of the top outbound flights get their return options collected.",
            "default": 1
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Add the 60-day price history Google Flights shows for this search to every row.",
            "default": false
          },
          "includeBookingOptions": {
            "title": "Include booking options (per seller)",
            "type": "boolean",
            "description": "For the top flights, open the Google Flights booking page and collect every seller (airline and travel agencies) with its price, fare name, bag fees and booking link. Billed per flight that returns booking options.",
            "default": false
          },
          "maxBookingOptionFlights": {
            "title": "Booking options for how many flights",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many flights get their booking options collected, starting from the top of your sort order.",
            "default": 5
          },
          "includePriceGraph": {
            "title": "Include price graph (cheapest dates)",
            "type": "boolean",
            "description": "Add one row per date with the cheapest fare Google Flights shows for about two months around your date. Billed per date row.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google Flights usually answers without a proxy. Switch on Apify Proxy for large volumes.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}