{
  "openapi": "3.0.1",
  "info": {
    "title": "Kayak Flights Scraper",
    "description": "Scrape KAYAK flight prices for many routes and dates in one run: every airline's and travel site's price per itinerary, fares, bags, flight numbers, times, stops, layovers and booking links. 27 KAYAK country sites, all cabins.",
    "version": "0.1",
    "x-build-id": "FzePksM9JskJkfE0r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~kayak-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-kayak-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/automation-lab~kayak-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-kayak-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/automation-lab~kayak-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-kayak-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",
        "properties": {
          "origin": {
            "title": "From (airport or city code)",
            "type": "string",
            "description": "3-letter IATA airport code (JFK, LHR) or KAYAK city code that covers all airports of a city (NYC, LON). Use with To and Departure date for one search. Leave empty when you use Routes or KAYAK search links."
          },
          "destination": {
            "title": "To (airport or city code)",
            "type": "string",
            "description": "3-letter IATA airport or city code of the arrival, e.g. LAX or PAR."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "Outbound date, YYYY-MM-DD. Must be today or later."
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "type": "string",
            "description": "Leave empty for a one-way search. When set, KAYAK prices the round trip and each row has the outbound and return flights; the price covers both directions."
          },
          "routes": {
            "title": "Routes (batch)",
            "type": "array",
            "description": "Many searches in one run. Each item is one search: {\"origin\": \"LHR\", \"destination\": \"JFK\", \"departureDate\": \"2027-02-10\", \"returnDate\": \"2027-02-17\"} (returnDate optional). To track several dates on one route, add one item per date. Cabin, passengers, site, sort and filters below apply to every route. Runs together with the single route above. At most 200 searches per run."
          },
          "searchUrls": {
            "title": "KAYAK search links",
            "type": "array",
            "description": "Paste results links from KAYAK, e.g. https://www.kayak.co.uk/flights/LON-NYC/2027-01-10/2027-01-17/business/2adults?sort=price_a. The link sets its own site, route, dates, cabin, adults, children and sort; other fields here only fill what the link does not say. KAYAK on-page filters in the fs= parameter are not applied; use Max stops and Airlines below.",
            "items": {
              "type": "string"
            }
          },
          "kayakSite": {
            "title": "KAYAK country site",
            "enum": [
              "kayak.com",
              "kayak.co.uk",
              "kayak.de",
              "kayak.fr",
              "kayak.es",
              "kayak.it",
              "kayak.nl",
              "kayak.ch",
              "kayak.se",
              "kayak.dk",
              "kayak.no",
              "kayak.ie",
              "kayak.pl",
              "kayak.pt",
              "ca.kayak.com",
              "kayak.com.au",
              "nz.kayak.com",
              "kayak.co.in",
              "kayak.com.br",
              "kayak.com.mx",
              "kayak.co.jp",
              "kayak.co.kr",
              "kayak.sg",
              "kayak.com.hk",
              "kayak.ae",
              "kayak.com.tr",
              "za.kayak.com"
            ],
            "type": "string",
            "description": "Which KAYAK country site to search. It sets the price currency and the mix of booking sites (local agencies differ by country). Not used for KAYAK search links, which carry their own site.",
            "default": "kayak.com"
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to search.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult travellers (1-9).",
            "default": 1
          },
          "children": {
            "title": "Children (age 2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Child travellers, searched as age 11. Adults plus children may not exceed 9. price is per person as KAYAK shows it; totalPrice covers all travellers.",
            "default": 0
          },
          "sortBy": {
            "title": "KAYAK sort order",
            "enum": [
              "best",
              "price",
              "duration"
            ],
            "type": "string",
            "description": "Order in which KAYAK ranks itineraries. With a limit below the total, it decides which itineraries you get.",
            "default": "best"
          },
          "maxItinerariesPerSearch": {
            "title": "Max itineraries per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit per search (per route and date), in itineraries that pass Max stops and Airlines. KAYAK serves 50 itineraries per page: without filters 50 reads one page and 200 reads four; with filters the Actor reads up to 10 pages to fill the limit. A search stops early when KAYAK has no more. With one row per booking provider on, each itinerary gives several rows.",
            "default": 50
          },
          "rowPerProvider": {
            "title": "One row per booking provider",
            "type": "boolean",
            "description": "Off (default): one row per itinerary, priced at its cheapest booking option, with every option (airline direct, Expedia, Trip.com, ...) listed in bookingOptions with its own price, fare name and link. On: a separate row for each booking option instead, for spreadsheets; an itinerary then gives about 5-30 rows, and each row is charged.",
            "default": false
          },
          "maxStops": {
            "title": "Max stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Keeps only itineraries where no direction has more stops than this. Filtering happens on KAYAK results as they are read (up to 10 pages of 50 per search), so a rare match can return fewer rows than the limit.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Keeps only itineraries flown at least partly by one of these 2-letter airline codes (e.g. BA, AA, LH). Case-insensitive; a match on any flight segment counts. Applies to every search in the run. Filtering happens on KAYAK results as they are read (up to 10 pages of 50 per search).",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}