{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights API",
    "description": "Scrape flight prices, airlines, durations, stops and times from Google Flights. Supports one-way, round-trip and multi-city searches. Outputs structured flight records and an Excel export.",
    "version": "1.1",
    "x-build-id": "0DVQfay3kBSMyU6FY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arceus15~google-flights-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arceus15-google-flights-api",
        "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/arceus15~google-flights-api/runs": {
      "post": {
        "operationId": "runs-sync-arceus15-google-flights-api",
        "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/arceus15~google-flights-api/run-sync": {
      "post": {
        "operationId": "run-sync-arceus15-google-flights-api",
        "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": {
          "departure": {
            "title": "Departure airport",
            "type": "string",
            "description": "Origin IATA code, e.g. BOM."
          },
          "destination": {
            "title": "Destination airport",
            "type": "string",
            "description": "Destination IATA code, e.g. DEL."
          },
          "outbound_date": {
            "title": "Outbound date",
            "type": "string",
            "description": "Departure date in YYYY-MM-DD format."
          },
          "return_date": {
            "title": "Return date",
            "type": "string",
            "description": "Return date (YYYY-MM-DD). Required only for round-trip searches."
          },
          "depart_days_ahead": {
            "title": "Depart in (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Depart this many days after the run starts instead of a fixed outbound date. Ideal for schedules: the search keeps moving forward. Ignored for multi-city."
          },
          "trip_length_days": {
            "title": "Trip length (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Return this many days after departure and switch to round-trip. Works with 'Depart in (days)' or a fixed outbound date. Ignored for multi-city."
          },
          "legs": {
            "title": "Multi-city legs",
            "type": "array",
            "description": "Optional. Use for multi-city trips instead of departure/destination/outbound_date. Requires trip_type='multi-city' and at least 2 legs.",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "type": "string",
                  "title": "Origin",
                  "description": "Origin IATA code for this leg, e.g. BOM."
                },
                "destination": {
                  "type": "string",
                  "title": "Destination",
                  "description": "Destination IATA code for this leg, e.g. DEL."
                },
                "date": {
                  "type": "string",
                  "title": "Date",
                  "description": "Leg date in YYYY-MM-DD format."
                }
              },
              "required": [
                "origin",
                "destination",
                "date"
              ]
            }
          },
          "trip_type": {
            "title": "Trip type",
            "enum": [
              "one-way",
              "round-trip",
              "multi-city"
            ],
            "type": "string",
            "description": "One-way, round-trip or multi-city.",
            "default": "one-way"
          },
          "cabin_class": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class to search in.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers (1-9).",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of child passengers (0-8).",
            "default": 0
          },
          "infants": {
            "title": "Infants",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Number of infant passengers (0-4).",
            "default": 0
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter currency code for prices, e.g. USD, INR, EUR.",
            "default": "USD"
          },
          "stops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "1-stop",
              "2-stops"
            ],
            "type": "string",
            "description": "Maximum number of stops to allow.",
            "default": "any"
          },
          "max_results": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of flights to return.",
            "default": 50
          },
          "force_fresh": {
            "title": "Force fresh scrape",
            "type": "boolean",
            "description": "Ignore the short-lived result cache and scrape live. Prices change every few minutes.",
            "default": false
          },
          "airlines": {
            "title": "Airlines filter",
            "type": "array",
            "description": "Optional. Keep only flights whose airline matches one of these names (case-insensitive substring, e.g. 'IndiGo', 'Air India').",
            "items": {
              "type": "string"
            }
          },
          "max_price": {
            "title": "Max price",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Keep only flights at or below this price (in the chosen currency). Google shows the total for all passengers, so set this generously or leave empty."
          },
          "max_price_per_person": {
            "title": "Max price per person",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Keep only flights whose price divided by the number of passengers is at or below this value. Use this when Google shows a total for all passengers."
          },
          "max_duration_minutes": {
            "title": "Max duration (minutes)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Keep only flights whose total duration is at or below this many minutes (e.g. 300 = 5 hours)."
          },
          "departure_time_from": {
            "title": "Departure after",
            "type": "string",
            "description": "Optional. Earliest departure time, e.g. '06:00' or '6:00 AM'."
          },
          "departure_time_to": {
            "title": "Departure before",
            "type": "string",
            "description": "Optional. Latest departure time, e.g. '22:00' or '10:00 PM'."
          },
          "sort_by": {
            "title": "Sort results by",
            "enum": [
              "google",
              "price",
              "duration",
              "departure",
              "arrival"
            ],
            "type": "string",
            "description": "Order of the returned flights. 'Google ranking' keeps Google's own order.",
            "default": "google"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for browser traffic. Apify Proxy is used by default. Disable it to run directly from the Actor's IP.",
            "default": {
              "useApifyProxy": true
            }
          },
          "usePlaywrightSource": {
            "title": "Use live Playwright scraping",
            "type": "boolean",
            "description": "When enabled (default), scrapes Google Flights live with a real browser. Disable to use the synthetic data source (useful for testing).",
            "default": true
          },
          "trackPriceHistory": {
            "title": "Track price history",
            "type": "boolean",
            "description": "Persist the minimum price per route across runs in the 'price-history' key-value store and compute price changes.",
            "default": true
          },
          "priceDropAlertPercent": {
            "title": "Price-drop alert threshold (%)",
            "minimum": 0,
            "type": "number",
            "description": "Send a webhook alert when the minimum price drops by at least this percentage versus the previous run.",
            "default": 10
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. HTTP endpoint (Slack, Discord, Make, n8n, etc.) that receives JSON on price drops and run failures."
          },
          "alertWebhookFormat": {
            "title": "Alert webhook format",
            "enum": [
              "json",
              "slack",
              "discord"
            ],
            "type": "string",
            "description": "Payload shape for the alert webhook. Generic JSON works with Make/n8n/Zapier; pick Slack or Discord for incoming-webhook compatibility.",
            "default": "json"
          },
          "alertOnFailure": {
            "title": "Alert on failure",
            "type": "boolean",
            "description": "Send a webhook notification when the run fails. Requires an alert webhook URL.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}