{
  "openapi": "3.0.1",
  "info": {
    "title": "Flight Offers API: Amadeus Self-Service Alternative",
    "description": "Live flight prices with Amadeus Self-Service-style inputs and JSON: Flight Offers Search, Cheapest Date Search and Price Analysis, powered by Google Flights. For code that broke when Amadeus Self-Service shut down. Not affiliated with Amadeus.",
    "version": "1.0",
    "x-build-id": "RwzD4FZArya1hAsng"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kuezi~flight-offers-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kuezi-flight-offers-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/kuezi~flight-offers-api/runs": {
      "post": {
        "operationId": "runs-sync-kuezi-flight-offers-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/kuezi~flight-offers-api/run-sync": {
      "post": {
        "operationId": "run-sync-kuezi-flight-offers-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": {
          "endpoint": {
            "title": "Endpoint",
            "enum": [
              "flight-offers",
              "cheapest-date",
              "price-metrics"
            ],
            "type": "string",
            "description": "Which retired Amadeus Self-Service call to replace. flight-offers = Flight Offers Search (GET /v2/shopping/flight-offers). cheapest-date = Flight Cheapest Date Search (GET /v1/shopping/flight-dates). price-metrics = Flight Price Analysis (GET /v1/analytics/itinerary-price-metrics).",
            "default": "flight-offers"
          },
          "originLocationCode": {
            "title": "Origin (IATA)",
            "type": "string",
            "description": "3-letter IATA airport code, e.g. JFK. Aliases accepted: origin, originIataCode."
          },
          "destinationLocationCode": {
            "title": "Destination (IATA)",
            "type": "string",
            "description": "3-letter IATA airport code, e.g. LAX. Aliases accepted: destination, destinationIataCode."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty for 21 days from today. For cheapest-date, a range like 2026-11-01,2026-11-30 (max 90 days); a single date scans 30 days from it."
          },
          "returnDate": {
            "title": "Return date (flight-offers)",
            "type": "string",
            "description": "YYYY-MM-DD for a round trip. Leave empty for one-way. Round-trip prices are the total for the trip; the offer lists the outbound itinerary."
          },
          "duration": {
            "title": "Trip length in days (cheapest-date)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Round-trip length for cheapest-date, e.g. 7. Leave empty for one-way. One value only (Amadeus ranges like 1,15 are not supported)."
          },
          "oneWay": {
            "title": "One-way (cheapest-date)",
            "type": "boolean",
            "description": "Defaults to one-way unless you set a trip length."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Travelers aged 12+.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Aged 2-11.",
            "default": 0
          },
          "infants": {
            "title": "Infants (on lap)",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Under 2, on an adult's lap, as in Amadeus.",
            "default": 0
          },
          "travelClass": {
            "title": "Travel class",
            "enum": [
              "ECONOMY",
              "PREMIUM_ECONOMY",
              "BUSINESS",
              "FIRST"
            ],
            "type": "string",
            "description": "Cabin, using Amadeus values.",
            "default": "ECONOMY"
          },
          "nonStop": {
            "title": "Non-stop only",
            "type": "boolean",
            "description": "Only direct flights.",
            "default": false
          },
          "includedAirlineCodes": {
            "title": "Included airline codes",
            "type": "string",
            "description": "Comma-separated IATA codes, e.g. DL,UA. Keeps offers with at least one segment on these airlines."
          },
          "excludedAirlineCodes": {
            "title": "Excluded airline codes",
            "type": "string",
            "description": "Comma-separated IATA codes to drop."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Total for all travelers, in the chosen currency. 0 = no limit.",
            "default": 0
          },
          "max": {
            "title": "Max offers (flight-offers)",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "How many offers to return, best and cheapest first. Google usually has 30-100 per search.",
            "default": 50
          },
          "currencyCode": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter code, e.g. USD, EUR, GBP.",
            "default": "USD"
          },
          "country": {
            "title": "Point of sale (country)",
            "type": "string",
            "description": "Google country code (gl), e.g. us, gb, de. Prices can differ by country.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language (hl), e.g. en.",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "For cheapest-date scans. At 10, a 30-day scan finishes in about 20 seconds.",
            "default": 10
          },
          "maxRetries": {
            "title": "Retries per search",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Each retry uses a fresh IP.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential US proxies are the reliable default for Google.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}