{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper - Fares, Routes & Price Monitoring",
    "description": "Scrape live Google Flights fares without a browser. Compare one-way and round-trip quotes across multi-route and flexible-date matrices with segments, aircraft, emissions, stable IDs, and price-change monitoring.",
    "version": "1.0",
    "x-build-id": "m7I1SmvwgmKZZ5Wzw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thirdwatch~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thirdwatch-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/thirdwatch~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-thirdwatch-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/thirdwatch~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-thirdwatch-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": "Origin airport",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter IATA airport code, for example JFK, LHR, or DEL. Ignored when Routes are provided.",
            "default": "JFK"
          },
          "destination": {
            "title": "Destination airport",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter IATA airport code, for example LAX, CDG, or DXB.",
            "default": "LAX"
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Outbound date in YYYY-MM-DD. Leave empty to search 30 days from the run date."
          },
          "departureInDays": {
            "title": "Relative departure (days from run)",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Used when Departure date is empty. Makes saved Tasks reusable; the default searches 30 days from each run date.",
            "default": 30
          },
          "returnDate": {
            "title": "Return date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Optional return date in YYYY-MM-DD. Omit for a one-way search."
          },
          "tripLengthDays": {
            "title": "Relative trip length",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Optional nights/days between outbound and return when Return date is empty. Useful in reusable saved Tasks."
          },
          "routes": {
            "title": "Routes to compare",
            "type": "array",
            "description": "Optional route list such as JFK-LAX and BOS-SFO. Every route is searched across every selected date.",
            "items": {
              "type": "string",
              "pattern": "^\\s*[A-Za-z]{3}\\s*[-:>]\\s*[A-Za-z]{3}\\s*$"
            },
            "default": []
          },
          "dateRangeStart": {
            "title": "Flexible-date start",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Optional first outbound date in a fare calendar. Use together with Flexible-date end."
          },
          "dateRangeEnd": {
            "title": "Flexible-date end",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Optional last outbound date in a fare calendar. The Actor searches every selected step in the range."
          },
          "dateRangeDays": {
            "title": "Relative flexible-date window",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Optional number of outbound dates starting at Departure date or Relative departure. Use instead of explicit range dates for reusable Tasks."
          },
          "dateStepDays": {
            "title": "Date step",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Days between flexible-date searches. Use 1 for a daily fare calendar or 7 for weekly sampling.",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers. Total passengers cannot exceed nine.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of child passengers.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of infants travelling in their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of lap infants. Cannot exceed the adult count.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin used for all legs.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Maximum stops",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Optional stop filter applied to every leg: 0 for nonstop, 1 for up to one stop, or 2 for up to two stops."
          },
          "airlines": {
            "title": "Airlines to include",
            "type": "array",
            "description": "Optional airline IATA codes such as DL, AA, BA, or EK.",
            "items": {
              "type": "string",
              "pattern": "^\\s*[A-Za-z0-9]{2,3}\\s*$"
            },
            "default": []
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "ISO 4217 currency code used by Google Flights, for example USD, EUR, GBP, or INR.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "pattern": "^$|^[A-Za-z]{2,3}(-[A-Za-z]{2})?$",
            "type": "string",
            "description": "Google Flights language code, for example en, de, fr, es, or hi.",
            "default": "en"
          },
          "market": {
            "title": "Market country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code used for regional availability, for example US, GB, DE, or IN.",
            "default": "US"
          },
          "maxResultsPerSearch": {
            "title": "Max itineraries per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Per-route/date output cap after Google returns its itinerary list.",
            "default": 100
          },
          "maxResults": {
            "title": "Max total itineraries",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap across every route and date in this run.",
            "default": 10
          },
          "monitorMode": {
            "title": "Fare monitoring",
            "enum": [
              "off",
              "new",
              "price-changes"
            ],
            "type": "string",
            "description": "Off returns every itinerary. New returns newly seen itineraries. Price changes returns new itineraries plus changed prices and previous_price.",
            "default": "off"
          },
          "monitorStoreName": {
            "title": "Monitoring store name",
            "type": "string",
            "description": "Optional stable key-value store name. Use the same name for every scheduled run of one fare watch."
          },
          "proxyMode": {
            "title": "Network mode",
            "enum": [
              "auto",
              "direct",
              "residential"
            ],
            "type": "string",
            "description": "Automatic tries the fastest connection first and switches to a more resilient one only if needed. Direct is cheapest. The resilient option is the most reliable under heavy use.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional custom proxy settings, used for the fallback or resilient connection modes."
          },
          "maxConcurrency": {
            "title": "Search concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel route/date searches. Keep this low for reliable direct HTTP access.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max attempts per search",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Total request/parser attempts per route and date, including direct attempts and any residential fallback.",
            "default": 5
          },
          "directRetries": {
            "title": "Direct attempts before proxy fallback",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "In Auto mode, exhaust this many low-cost direct HTTP attempts before using residential bandwidth.",
            "default": 3
          },
          "failOnPartialError": {
            "title": "Fail on any search error",
            "type": "boolean",
            "description": "Off by default: if some searches in a multi-route or multi-date run cannot be completed, the run still succeeds and saves every itinerary that was found, and the log lists the searches that were skipped. Turn on to mark such runs as failed (the itineraries found are still saved).",
            "default": false
          },
          "allowEmptyResults": {
            "title": "Allow a successful empty run",
            "type": "boolean",
            "description": "Kept for compatibility with older saved inputs. A run where Google Flights answers but has no matching itineraries now always finishes successfully with an empty dataset and a status message.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}