{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Price Watch – Alerts, History & Deal Detection",
    "description": "Schedule it, get each route's best fare with history and Google's price verdict, plus alert rows when fares drop, hit a new low or fall below your target.",
    "version": "0.1",
    "x-build-id": "Znn1vwzVy10NyJh8c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/almoutasem_nabil~google-flights-price-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-almoutasem_nabil-google-flights-price-watch",
        "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/almoutasem_nabil~google-flights-price-watch/runs": {
      "post": {
        "operationId": "runs-sync-almoutasem_nabil-google-flights-price-watch",
        "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/almoutasem_nabil~google-flights-price-watch/run-sync": {
      "post": {
        "operationId": "run-sync-almoutasem_nabil-google-flights-price-watch",
        "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": {
          "from": {
            "title": "From",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Departure airport as a 3-letter IATA code, e.g. AMM, DXB, JFK."
          },
          "to": {
            "title": "To",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Arrival airport as a 3-letter IATA code, e.g. LHR, CAI, LAX."
          },
          "departDate": {
            "title": "Departure date",
            "pattern": "^(\\+\\d{1,3}[dD]|\\d{4}-\\d{2}-\\d{2})$",
            "type": "string",
            "description": "A fixed date (2026-12-15) or a rolling one: \"+30d\" means 30 days after the day the run starts (UTC). A rolling date keeps one price history even though the actual date moves each day."
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "Same formats as the departure date. Leave empty for one-way. Round-trip fares are the total for the whole trip."
          },
          "label": {
            "title": "Label",
            "type": "string",
            "description": "Your name for this route in the output, e.g. \"AMM→LHR Christmas\". Defaults to FROM→TO."
          },
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "Each entry: { from, to, departDate, returnDate?, label? } plus optional per-route overrides of the defaults below: cabin, adults, children, infantsInSeat, infantsOnLap, maxStops, targetPrice, dateFlex. At most 100 route-date checks run per run, counted after date flex."
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class to search.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult travellers. Fares are the total for all travellers together. Google searches at most 9 travellers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children (2-11).",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants on an adult's lap; at most one per adult.",
            "default": 0
          },
          "maxStops": {
            "title": "Max stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Limit the number of stops. \"Any\" leaves it to Google.",
            "default": "any"
          },
          "dateFlex": {
            "title": "Date flexibility (± days)",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Also check this many days before and after each departure date; the return date moves by the same amount. Each extra date is one more route check (and charge): 2 = 5 checks per route. Dates that would fall before today are skipped.",
            "default": 0
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "3-letter ISO code for fares, e.g. USD, EUR, GBP, SAR, AED, JOD, EGP.",
            "default": "USD"
          },
          "topN": {
            "title": "Itineraries per route",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many itineraries (cheapest first) to include in each route row.",
            "default": 10
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "watch",
              "snapshot"
            ],
            "type": "string",
            "description": "\"watch\" remembers every route's fares between runs and adds history, change since the last check and alert rows. \"snapshot\" returns today's fares only: no history, no alerts.",
            "default": "watch"
          },
          "trackingId": {
            "title": "Tracking ID",
            "type": "string",
            "description": "Name of this watch. History is stored under it in the 'google-flights-watch-state' key-value store; two schedules with different IDs never see each other's history.",
            "default": "default"
          },
          "dropThresholdPct": {
            "title": "Drop threshold %",
            "minimum": 1,
            "maximum": 90,
            "type": "number",
            "description": "Minimum fall versus the previous check that raises a price-drop alert (and a price-rise alert, when that is on). New lows and target crossings alert regardless.",
            "default": 10
          },
          "alertOnRise": {
            "title": "Alert on price rises",
            "type": "boolean",
            "description": "Also raise a price-rise alert when a fare rises by at least the threshold.",
            "default": false
          },
          "targetPrice": {
            "title": "Target price",
            "minimum": 1,
            "type": "number",
            "description": "Raise a below-target alert when a route's best fare crosses under this total (in the chosen currency, all travellers). A route's own targetPrice wins. It fires again only if the fare later falls a further threshold % while still below."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Routes checked in parallel. Keep it low: each worker already paces itself, and more parallel requests mostly means more blocked ones.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy for the requests to Google. Set the proxy country to your market to see local fares. When a datacenter request is blocked, it is retried once through residential proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}