{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & MCP [💰$1.50/1K] | Fares | Alerts",
    "description": "Scrape live Google Flights fares by route and date as clean JSON — airline, price, stops, duration, layovers and CO₂. Batch routes, filter by cabin and stops, monitor fares for price drops with webhooks, or call it from AI agents as a built-in MCP server.",
    "version": "1.1",
    "x-build-id": "zGsrftQ7fqDj81hEj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-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/ahmed_jasarevic~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-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/ahmed_jasarevic~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-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",
              "monitor"
            ],
            "type": "string",
            "description": "search = one-off fare search for the configured routes. monitor = re-check the same routes, diff the cheapest fare against the previous run and emit only changes (plus an optional webhook). In monitor mode with no routes set, the watchlist registered through the MCP watch_route tool is used.",
            "default": "search"
          },
          "routes": {
            "title": "Routes (batch)",
            "type": "array",
            "description": "One or more flight searches. Leave empty to use the single origin/destination pair below, or (search mode only) a demo ZAG → LHR search so a first run always returns data.",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "title": "Origin (IATA)",
                  "type": "string",
                  "editor": "textfield",
                  "description": "3-letter IATA code, e.g. ZAG."
                },
                "destination": {
                  "title": "Destination (IATA)",
                  "type": "string",
                  "editor": "textfield",
                  "description": "3-letter IATA code, e.g. LHR."
                },
                "departureDate": {
                  "title": "Departure date",
                  "type": "string",
                  "editor": "textfield",
                  "description": "YYYY-MM-DD."
                },
                "returnDate": {
                  "title": "Return date (optional)",
                  "type": "string",
                  "editor": "textfield",
                  "description": "YYYY-MM-DD. Set to search round-trip fares."
                }
              },
              "required": [
                "origin",
                "destination",
                "departureDate"
              ]
            }
          },
          "origin": {
            "title": "Origin airport",
            "type": "string",
            "description": "3-letter IATA code. Used when routes is empty."
          },
          "destination": {
            "title": "Destination airport",
            "type": "string",
            "description": "3-letter IATA code. Used when routes is empty."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Used when routes is empty."
          },
          "returnDate": {
            "title": "Return date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Set for round-trip fares."
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class for all searches in this run.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers (1-9 in total with children and infants).",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of children aged 2-11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of infants under 2 occupying their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of infants under 2 travelling on a lap (needs one adult each).",
            "default": 0
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO 4217 code — Google converts fares into this currency (USD, EUR, GBP, BAM, ...).",
            "default": "USD"
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Google UI language, e.g. en, de, hr.",
            "default": "en"
          },
          "maxStops": {
            "title": "Max stops",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum stops per itinerary (0 = non-stop only). Leave empty for any number of stops."
          },
          "maxPrice": {
            "title": "Max price",
            "type": "integer",
            "description": "Only return itineraries up to this price in the selected currency. Leave empty for no limit."
          },
          "carryOnBags": {
            "title": "Carry-on bags",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Include estimated bag fees for this many carry-on bags in the fare.",
            "default": 0
          },
          "checkedBags": {
            "title": "Checked bags",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Include estimated bag fees for this many checked bags in the fare.",
            "default": 0
          },
          "earliestDepartureHour": {
            "title": "Earliest departure hour",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Local airport time 0-23. Leave empty for no restriction."
          },
          "latestDepartureHour": {
            "title": "Latest departure hour",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Local airport time 0-23. Leave empty for no restriction."
          },
          "lessEmissionsOnly": {
            "title": "Less emissions only",
            "type": "boolean",
            "description": "Only itineraries with lower CO2 emissions than typical for the route.",
            "default": false
          },
          "hideSeparateAndSelfTransfer": {
            "title": "Hide separate & self-transfer tickets",
            "type": "boolean",
            "description": "Hide tickets split across airlines that require a self-transfer or separate bookings.",
            "default": false
          },
          "excludeBasicEconomy": {
            "title": "Exclude basic economy",
            "type": "boolean",
            "description": "Exclude basic economy fares (usually no checked bag and no seat selection).",
            "default": false
          },
          "maxResultsPerRoute": {
            "title": "Max results per route",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on dataset rows pushed per route. Google typically returns 50-150 itineraries per route.",
            "default": 50
          },
          "includeUnpriced": {
            "title": "Include itineraries without a price",
            "type": "boolean",
            "description": "Google sometimes lists itineraries with no bookable fare. Keep them (price: null) or drop them.",
            "default": true
          },
          "cacheTtlSeconds": {
            "title": "Cache TTL (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Reuse an identical search result from the last N seconds instead of hitting Google again. Makes repeated monitor runs cheap. 0 disables the cache.",
            "default": 900
          },
          "onlyChanges": {
            "title": "Monitor: only changes",
            "type": "boolean",
            "description": "monitor mode only — push a record only when the cheapest price changed (or on the first check). Disable to push a snapshot every run.",
            "default": true
          },
          "webhookUrl": {
            "title": "Monitor: webhook URL",
            "type": "string",
            "description": "monitor mode only — POST a small JSON payload (route, event, previous price, current price, delta) here on every price drop or rise."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. On the Apify platform a proxy is applied automatically when this is left empty — Google answers bare datacenter IPs with an error. Datacenter proxy is fine for light use; switch the group to RESIDENTIAL for heavy or scheduled monitoring."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}