{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flightpowers-com/json-schema/flightpowers-com-oneway-request-schema.json",
  "title": "OnewayRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flightpowers-com-openapi.json#/components/schemas/OnewayRequest",
  "type": "object",
  "required": [
    "from_airport",
    "to_airport",
    "departure_date"
  ],
  "properties": {
    "from_airport": {
      "type": "string",
      "description": "Origin IATA code, e.g. `JFK`."
    },
    "to_airport": {
      "type": "string",
      "description": "Destination IATA code, e.g. `LHR`."
    },
    "departure_date": {
      "type": "string",
      "format": "date",
      "description": "YYYY-MM-DD."
    },
    "max_stops": {
      "type": "integer",
      "description": "Maximum stops, e.g. 0 for non-stop only."
    },
    "airline_codes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Only include these airlines (IATA codes)."
    },
    "exclude_airline_codes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Exclude these airlines (IATA codes)."
    },
    "departure_time_min": {
      "type": "integer",
      "minimum": 0,
      "maximum": 23,
      "description": "Earliest departure hour (0-23)."
    },
    "departure_time_max": {
      "type": "integer",
      "minimum": 0,
      "maximum": 23,
      "description": "Latest departure hour (0-23)."
    },
    "departure_arrival_time_min": {
      "type": "integer",
      "minimum": 0,
      "maximum": 23,
      "description": "Earliest arrival hour (0-23)."
    },
    "departure_arrival_time_max": {
      "type": "integer",
      "minimum": 0,
      "maximum": 23,
      "description": "Latest arrival hour (0-23)."
    },
    "sort_type": {
      "type": "string",
      "enum": [
        "Overall",
        "Price",
        "Duration"
      ],
      "default": "Overall",
      "description": "Result ordering."
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "description": "ISO currency code for prices, e.g. `USD`, `EUR`."
    },
    "max_price": {
      "type": "integer",
      "description": "Only return itineraries at or below this price."
    },
    "seat_type": {
      "type": "integer",
      "enum": [
        1,
        2,
        3,
        4
      ],
      "description": "Cabin: 1 = Economy, 2 = Premium economy, 3 = Business, 4 = First."
    },
    "passengers": {
      "type": "array",
      "items": {
        "type": "integer",
        "enum": [
          1,
          2,
          3,
          4
        ]
      },
      "description": "One integer per passenger: 1 = adult, 2 = child, 3 = infant on lap, 4 = infant in seat. Default: one adult."
    },
    "limit": {
      "type": "integer",
      "default": 10,
      "description": "Maximum number of results to return."
    },
    "use_fallback": {
      "type": "boolean",
      "description": "A secondary flight-data source the API can escalate to when the live Google Flights search does not come back with results. Last resort, not part of the normal path: a search that succeeds never touches it. Send `false` to switch the escalation off for a request. Responses that do use it can take longer."
    },
    "strict": {
      "type": "boolean",
      "default": false,
      "description": "Opt-in. Return HTTP 503 with a `search_incomplete` error body instead of an empty array when the search did not complete (X-Search-Status `degraded`)."
    },
    "use_ext_proxy": {
      "type": "boolean",
      "default": true,
      "description": "When true, requests may be routed through an external residential proxy to reduce blocks from Google. Set false to force a direct request (lower latency, more block risk)."
    }
  }
}