{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper - Flight Prices & Price Calendar",
    "description": "Google Flights API alternative: every flight for your route and dates with price, airlines, flight numbers, times, stops, layovers and CO2, one-way or round trip, any cabin. Cheapest fare per date (price calendar), many routes per run, and price-drop monitoring.",
    "version": "0.1",
    "x-build-id": "boVkcS2LJ03d3Vrg6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alom~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alom-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/alom~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alom-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/alom~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alom-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": "What to scrape",
            "enum": [
              "flights",
              "calendar"
            ],
            "type": "string",
            "description": "<b>Flights</b>: every itinerary Google Flights lists for the route and date (price, airlines, flight numbers, times, stops, layovers, CO2). <b>Price calendar</b>: the cheapest fare for each departure date from the departure date on, for <code>calendarDays</code> days (Google's date grid / price graph), one row per date.",
            "default": "flights"
          },
          "origin": {
            "title": "From",
            "type": "string",
            "description": "Airport code (<code>JFK</code>), several airports (<code>JFK,EWR,LGA</code>) or a city / country name as you would type it on Google Flights (<code>New York</code>, <code>Paris</code>, <code>Japan</code>). Metro codes like <code>NYC</code> or <code>LON</code> become the city."
          },
          "destination": {
            "title": "To",
            "type": "string",
            "description": "Same formats as <b>From</b>."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "<code>2026-11-20</code>, or relative: <code>+30</code> = 30 days from today, <code>tomorrow</code>. Relative dates keep scheduled runs valid. Default <code>+30</code>. In <b>price calendar</b> mode this is the first date of the range."
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "type": "string",
            "description": "Leave empty for a one-way trip. Same formats as the departure date (<code>+37</code>). Round-trip prices are the total for the whole trip. In <b>price calendar</b> mode the trip length (return minus departure) is kept for every date."
          },
          "routes": {
            "title": "More routes in the same run",
            "type": "array",
            "description": "Optional list of extra routes, each an object: <code>{\"origin\": \"LHR\", \"destination\": \"JFK\", \"departureDate\": \"+45\", \"returnDate\": \"+52\"}</code>. Dates an entry leaves out come from the fields above (an entry with its own departure date and no return date is one-way). Every other setting (passengers, cabin, filters) applies to all routes. Up to 100 routes; the same flight is never delivered twice. <code>searches</code> is accepted as another name for this field."
          },
          "calendarDays": {
            "title": "Price calendar: number of days",
            "minimum": 1,
            "maximum": 330,
            "type": "integer",
            "description": "Price calendar mode only: how many departure dates, starting at the departure date. Google sells about 11 months ahead, so later dates are cut off.",
            "default": 60
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Prices are the total for all passengers, as on Google Flights.",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in own 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 on an adult's lap (at most one per adult). Google allows 9 passengers in total.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Seat class.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Google's stops filter, for every leg of the trip.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Only these airlines: 2-letter codes (<code>DL</code>, <code>BA</code>, <code>LH</code>) or alliances (<code>ONEWORLD</code>, <code>SKYTEAM</code>, <code>STAR_ALLIANCE</code>). Empty = all airlines.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure",
              "arrival",
              "emissions"
            ],
            "type": "string",
            "description": "Order of the flight rows of each route. Every row also says whether Google marked it as a top (best) flight and whether it is the cheapest.",
            "default": "best"
          },
          "maxResults": {
            "title": "Max flights per route",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Flights mode: stop after this many itineraries per route (after sorting). Google's complete list ends at 300.",
            "default": 100
          },
          "includeReturnFlights": {
            "title": "Round trip: add the return flight",
            "type": "boolean",
            "description": "For round trips Google first lists outbound flights with the cheapest round-trip price. Turn this on to also get, for every outbound row, the return flight that makes up that price (flight numbers, times, stops). One extra request per row, so runs take longer; the row price stays the same.",
            "default": false
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter code: USD, EUR, GBP, JPY, INR, AUD...",
            "default": "USD"
          },
          "country": {
            "title": "Country (gl)",
            "type": "string",
            "description": "Google's country setting, e.g. <code>US</code>, <code>GB</code>, <code>DE</code>. In our tests fares did not change with the country - the currency is what matters.",
            "default": "US"
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Language of airport, city and airline names, e.g. <code>en</code>, <code>de</code>, <code>es</code>.",
            "default": "en"
          },
          "onlyNewSinceLastRun": {
            "title": "Only new or changed prices since my last run (monitoring)",
            "type": "boolean",
            "description": "For scheduled runs: deliver only flights / dates that are new or whose price changed since the previous run with the same monitor name, with <code>previousPrice</code> and <code>priceChange</code>. Unchanged prices are skipped and not charged.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memory per monitor, e.g. <code>nyc-lon-weekly</code>. Default: <code>default</code>."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Routes processed in parallel.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave the default (Apify datacenter proxies). Explicit settings here are used as given.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}