{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "Scrape Google Flights search results with price, airline, departure/arrival times, duration, stops. One-way + round-trip + cabin class + airline filters: maxLayoverMinutes, directOnly, excludeBasicEconomy.",
    "version": "1.0",
    "x-build-id": "FRRCo0z0MCTRu1zvo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-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/crawlerbros~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-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/crawlerbros~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-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",
        "required": [
          "originAirport",
          "destinationAirport"
        ],
        "properties": {
          "originAirport": {
            "title": "Origin airport (IATA)",
            "type": "string",
            "description": "Three-letter IATA airport code, e.g. `JFK`, `LHR`, `SFO`.",
            "default": "JFK"
          },
          "destinationAirport": {
            "title": "Destination airport (IATA)",
            "type": "string",
            "description": "Three-letter IATA airport code.",
            "default": "LHR"
          },
          "outboundDate": {
            "title": "Outbound date (YYYY-MM-DD)",
            "type": "string",
            "description": "Outbound (departure) date. Defaults to 30 days from today when empty."
          },
          "returnDate": {
            "title": "Return date (YYYY-MM-DD, optional)",
            "type": "string",
            "description": "Set for round-trip search. Empty for one-way."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers (1-9).",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of child passengers (0-9).",
            "default": 0
          },
          "infants": {
            "title": "Infants",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of infant passengers (0-9).",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to search.",
            "default": "economy"
          },
          "currency": {
            "title": "Currency (display)",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "JPY",
              "INR",
              "BRL",
              "CNY",
              "CHF",
              "HKD",
              "MXN",
              "NOK",
              "NZD",
              "SEK",
              "SGD",
              "ZAR",
              "AED",
              "KRW"
            ],
            "type": "string",
            "description": "Currency code Google Flights should display (USD/EUR/GBP/...). The actor parses the displayed price using this currency.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW",
              "ar",
              "ru",
              "hi",
              "tr",
              "nl",
              "pl",
              "sv",
              "da",
              "fi",
              "no"
            ],
            "type": "string",
            "description": "Google Flights UI language.",
            "default": "en"
          },
          "country": {
            "title": "Country (gl param)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IE",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "JP",
              "KR",
              "SG",
              "IN",
              "BR",
              "MX"
            ],
            "type": "string",
            "description": "Country code passed to Google Flights for regional pricing/availability.",
            "default": "US"
          },
          "maxStops": {
            "title": "Max stops",
            "enum": [
              "any",
              "nonstop",
              "one_stop",
              "two_or_fewer"
            ],
            "type": "string",
            "description": "Maximum stops on a single leg.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines allowlist (IATA)",
            "type": "array",
            "description": "Two-letter IATA airline codes — e.g. `[\"UA\",\"DL\"]`. Empty = all airlines.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeAirlines": {
            "title": "Airlines blocklist (IATA)",
            "type": "array",
            "description": "Two-letter IATA airline codes to exclude.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on emitted flight options.",
            "default": 50
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Drop flights below this price (in the chosen `currency`)."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Drop flights above this price (in the chosen `currency`)."
          },
          "directOnly": {
            "title": "Direct flights only",
            "type": "boolean",
            "description": "Alias for `maxStops=nonstop`. When true, drops connecting flights.",
            "default": false
          },
          "maxLayoverMinutes": {
            "title": "Max layover minutes",
            "minimum": 0,
            "maximum": 2880,
            "type": "integer",
            "description": "Drop connecting flights with a layover longer than this. Ignored on nonstop searches."
          },
          "maxDurationMinutes": {
            "title": "Max total duration minutes",
            "minimum": 30,
            "maximum": 4320,
            "type": "integer",
            "description": "Drop flights whose total duration exceeds this many minutes."
          },
          "excludeBasicEconomy": {
            "title": "Exclude basic economy",
            "type": "boolean",
            "description": "Drop flights labelled `Basic Economy` / `Light` / `Saver`.",
            "default": false
          },
          "priceAlertThresholdUsd": {
            "title": "Price alert threshold USD",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "When set, flights at or below this price get an extra `priceBelowThreshold: true` field."
          },
          "useApifyProxy": {
            "title": "Use Apify residential proxy",
            "type": "boolean",
            "description": "Route through Apify's residential pool. Strongly recommended — Google Flights rate-limits cloud datacenter IPs aggressively.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}