{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper | Fares, Price Calendar & Alerts",
    "description": "Scrape Google Flights fares and flights: one-way, round trip, multi-city legs, flexible-date price calendar, Google's low/typical/high verdict and 60-day price history. Monitor mode returns only price drops, with webhook alerts. Plain HTTP.",
    "version": "0.1",
    "x-build-id": "MNgpiNfMi1oT48yIz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-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/alexmorain~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-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/alexmorain~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-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",
            "type": "string",
            "description": "IATA airport or city code. Several codes separated by commas search them together, e.g. <code>JFK,EWR</code>. City codes such as <code>NYC</code>, <code>PAR</code> or <code>LON</code> cover every airport of the city. Use it for a single trip, or use <b>Searches</b> for one or many."
          },
          "destination": {
            "title": "To",
            "type": "string",
            "description": "IATA airport or city code, same format as From."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Google Flights prices dates from today up to 330 days ahead. Leave empty and use <b>Depart in N days</b> for a rolling date in scheduled runs."
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "YYYY-MM-DD. Set it for a round trip, leave it empty for one way. Round-trip prices are totals for both directions."
          },
          "departureInDays": {
            "title": "Depart in N days",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Used for every search without a departure date: the departure is today plus N days. Handy for a daily schedule that always looks N days ahead; monitor mode then compares \"30 days ahead\" from one run to the next."
          },
          "tripLengthDays": {
            "title": "Trip length (days)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Used when no return date is set: makes the search a round trip that comes back N days after departure."
          },
          "flexibleDays": {
            "title": "Flexible dates (price calendar)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "Also search the next N departure dates (0 = only the date given). Each date gives one fare row with its cheapest price and Google's verdict, so 30 builds a month-long price calendar. Round trips keep the same trip length. Dates already in the past are skipped, so a scheduled calendar keeps working until its last date.",
            "default": 0
          },
          "searches": {
            "title": "Searches",
            "type": "array",
            "description": "Trips to search, one line per trip: <code>ORIGIN DESTINATION [DEPARTURE] [RETURN]</code>, e.g. <code>CDG JFK 2026-12-03 2026-12-10</code>. A line without dates uses <b>Depart in N days</b> and <b>Trip length</b>. Through the API each item can also be an object with <code>origin</code>, <code>destination</code>, <code>departureDate</code>, <code>returnDate</code>, <code>departureInDays</code>, <code>tripLengthDays</code>, <code>label</code> and <code>targetPrice</code>.",
            "items": {
              "type": "string"
            }
          },
          "multiCityLegs": {
            "title": "Multi-city legs",
            "type": "array",
            "description": "2 to 6 legs, each an object with <code>origin</code>, <code>destination</code> and <code>date</code>. Google Flights only serves multi-city fares inside its own app, so each leg is priced as a separate one-way ticket and an extra free row adds up the cheapest fare of each leg (not returned in monitor mode)."
          },
          "adults": {
            "title": "Adults",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Prices are totals for all travellers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Ages 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Under 2, with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Under 2, on an adult's lap. One per adult.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin for every flight of the trip.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Maximum stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Applied by Google.",
            "default": "any"
          },
          "airlines": {
            "title": "Only these airlines",
            "type": "array",
            "description": "2-letter IATA codes, e.g. <code>DL</code>, <code>AF</code>. Google also keeps codeshare flights sold by these airlines.",
            "items": {
              "type": "string"
            }
          },
          "alliances": {
            "title": "Only these alliances",
            "type": "array",
            "description": "Applied by Google, codeshares included.",
            "items": {
              "type": "string",
              "enum": [
                "STAR_ALLIANCE",
                "ONEWORLD",
                "SKYTEAM"
              ],
              "enumTitles": [
                "Star Alliance",
                "Oneworld",
                "SkyTeam"
              ]
            }
          },
          "excludeAirlines": {
            "title": "Exclude airlines",
            "type": "array",
            "description": "2-letter IATA codes. Google ignores this filter on its side, so the Actor drops every flight with a leg on these airlines.",
            "items": {
              "type": "string"
            }
          },
          "connectingAirports": {
            "title": "Connect only via",
            "type": "array",
            "description": "IATA codes of the only airports allowed for layovers. Nonstop flights stay in.",
            "items": {
              "type": "string"
            }
          },
          "minLayoverMinutes": {
            "title": "Minimum layover (minutes)",
            "minimum": 0,
            "maximum": 2880,
            "type": "integer",
            "description": "Shortest connection allowed, applied by Google."
          },
          "maxLayoverMinutes": {
            "title": "Maximum layover (minutes)",
            "minimum": 0,
            "maximum": 2880,
            "type": "integer",
            "description": "Longest connection allowed, applied by Google."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the chosen currency, for all travellers."
          },
          "maxDurationHours": {
            "title": "Maximum trip duration (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Total travel time of one direction, layovers included."
          },
          "departureTimeFrom": {
            "title": "Departure from (hour)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Local hour, 0 to 23. Applies to the outbound flight."
          },
          "departureTimeTo": {
            "title": "Departure until (hour)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Local hour, 0 to 23."
          },
          "arrivalTimeFrom": {
            "title": "Arrival from (hour)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Local hour, 0 to 23. Applies to the outbound flight."
          },
          "arrivalTimeTo": {
            "title": "Arrival until (hour)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Local hour, 0 to 23."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO code, e.g. <code>USD</code>, <code>EUR</code>, <code>GBP</code>.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of airport and airline names, e.g. <code>en</code>, <code>fr</code>, <code>de</code>.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter country code of the market Google prices for, e.g. <code>US</code>, <code>GB</code>, <code>FR</code>.",
            "default": "US"
          },
          "includeFlights": {
            "title": "Include flight details",
            "type": "boolean",
            "description": "On: one row per flight (airlines, times, legs, layovers, aircraft, CO2, booking link) next to each fare row. Off: fare rows only (cheapest price, Google's verdict, price history), the cheap setting for calendars and price monitoring.",
            "default": true
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 = every flight Google lists on its results page (usually 10 to 35).",
            "default": 0
          },
          "returnFlightsForTop": {
            "title": "Return flights for the top N outbound flights",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Round trips only. Google prices a round trip on the outbound flight; set N to also fetch the matching return flights of the first N outbound flights. Each outbound costs one extra page and gives one row per outbound and return pair.",
            "default": 0
          },
          "moreResults": {
            "title": "More results (per-airline searches)",
            "type": "boolean",
            "description": "Google's results page lists a selection of flights, not every one (JFK to LAX: 29 nonstop flights shown, while 14 airlines fly the route). On: the Actor also searches each airline of the route and merges the flights, about +40% flights for up to 15 extra pages per search. Ignored when airlines or alliances are set.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode",
            "enum": [
              "off",
              "all",
              "changes",
              "drops"
            ],
            "type": "string",
            "description": "For scheduled runs. The Actor remembers the cheapest price of each search between runs.<br>• <b>off</b>: no memory.<br>• <b>all</b>: every fare row, with the previous price and the change.<br>• <b>changes</b>: only fares whose price moved since the last run.<br>• <b>drops</b>: only price drops (and fares under the target price). Unchanged searches are neither returned nor charged.",
            "default": "off"
          },
          "dropThresholdPercent": {
            "title": "Minimum drop (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drops mode: ignore drops smaller than this percentage. 0 = any drop.",
            "default": 0
          },
          "targetPrice": {
            "title": "Target price",
            "minimum": 0,
            "type": "integer",
            "description": "Drops mode: also alert when the cheapest fare reaches this price or less, once per crossing."
          },
          "monitorKey": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Optional. Runs with the same searches share a memory on their own; set a name to share it between tasks with different inputs, or to start a fresh one."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. At the end of a run that returned something, the Actor POSTs a JSON summary with the alerts. It carries <code>text</code> and <code>content</code> fields, so a Slack or Discord incoming webhook URL works as is."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter) is enough: Google refuses some searches per IP and the Actor retries them on a fresh IP. If a page is refused 5 times in a row, or the datacenter pool is mostly refused, the Actor retries through residential proxies at no extra charge to you.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}