{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Fares, Itineraries & Cheapest Dates",
    "description": "Google Flights scraper for one-way, round-trip, and multi-city itineraries plus a cheapest-date calendar. Export prices, airlines, stops, times, aircraft, CO2, and booking options as JSON. Call from Python, Node.js, or MCP — a Google Flights API alternative.",
    "version": "0.1",
    "x-build-id": "WVp9jjG9xy6YF9qR1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-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/crawloop~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-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/crawloop~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-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",
              "both"
            ],
            "type": "string",
            "description": "search = itineraries for specific dates; calendar = cheapest price per departure date; both = itineraries plus the date grid.",
            "default": "search"
          },
          "origin": {
            "title": "Origin",
            "type": "string",
            "description": "Origin IATA airport or metro codes. Comma-separate for multi-airport search, e.g. JFK,EWR."
          },
          "destination": {
            "title": "Destination",
            "type": "string",
            "description": "Destination IATA airport or metro codes. Comma-separate for multi-airport search, e.g. LAX,BUR."
          },
          "departDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to about 30 days from today if empty."
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty for one-way; set for round-trip (outbound rows carry round-trip prices)."
          },
          "multiCityLegs": {
            "title": "Multi-city legs",
            "type": "array",
            "description": "Overrides origin/destination when set. One ORIGIN-DEST-YYYY-MM-DD per line, e.g. JFK-LHR-2026-09-20.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Batch searches",
            "type": "array",
            "description": "Optional extra routes. Each object can set origin, destination, departDate, returnDate. Shared passenger/cabin/filter fields still apply."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2–11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants occupying a seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants on lap.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to price.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Max stops",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "0 = nonstop only, 1 = one stop or fewer, 2 = two stops or fewer. Empty = any."
          },
          "airlines": {
            "title": "Airlines include",
            "type": "array",
            "description": "Only these IATA airline codes, e.g. DL, AA. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "airlinesExclude": {
            "title": "Airlines exclude",
            "type": "array",
            "description": "Drop these IATA airline codes.",
            "items": {
              "type": "string"
            }
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 1,
            "type": "integer",
            "description": "Only itineraries at or below this price in the selected currency."
          },
          "maxDurationMinutes": {
            "title": "Max duration (minutes)",
            "minimum": 30,
            "type": "integer",
            "description": "Drop itineraries longer than this total duration."
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "best",
              "cheapest",
              "departure",
              "arrival",
              "duration"
            ],
            "type": "string",
            "description": "Google Flights sort mode for the shopping result set.",
            "default": "best"
          },
          "excludeBasicEconomy": {
            "title": "Exclude basic economy",
            "type": "boolean",
            "description": "Hide basic-economy fares when Google exposes the filter.",
            "default": false
          },
          "checkedBags": {
            "title": "Checked bags",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Include this many checked bags in the displayed price when Google supports bag-adjusted fares."
          },
          "carryOn": {
            "title": "Include carry-on",
            "type": "boolean",
            "description": "Ask Google to include carry-on in the displayed price.",
            "default": false
          },
          "calendarFrom": {
            "title": "Calendar from",
            "type": "string",
            "description": "Start of the cheapest-date window (YYYY-MM-DD). Defaults to departure date."
          },
          "calendarTo": {
            "title": "Calendar to",
            "type": "string",
            "description": "End of the cheapest-date window (YYYY-MM-DD). Defaults to calendarFrom + calendarDays."
          },
          "calendarDays": {
            "title": "Calendar days",
            "minimum": 1,
            "maximum": 305,
            "type": "integer",
            "description": "Length of the cheapest-date window when calendarTo is empty (1–305). Google serves ~61 days per request.",
            "default": 30
          },
          "calendarTripDays": {
            "title": "Round-trip length (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Stay length used for a round-trip calendar when returnDate is empty. Ignored when returnDate is set.",
            "default": 7
          },
          "resolveBookingOptions": {
            "title": "Resolve booking options",
            "type": "boolean",
            "description": "For the top itineraries, fetch who sells the fare (airline/OTA) with price, fare name, and booking URL. Extra HTTP per itinerary.",
            "default": false
          },
          "maxBookingItineraries": {
            "title": "Max booking itineraries",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many top itineraries to resolve when booking options are on.",
            "default": 10
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on itinerary rows. Calendar dates follow the date window (not this cap) when mode is calendar or both.",
            "default": 100
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO 4217 code requested from Google Flights (USD, EUR, GBP, …).",
            "default": "USD"
          },
          "market": {
            "title": "Market (gl)",
            "type": "string",
            "description": "Google country code, e.g. US, GB, DE.",
            "default": "US"
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Google language code, e.g. en, de, es.",
            "default": "en"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is recommended. Google often returns empty itineraries to datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}