{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Cheapest Date Finder",
    "description": "Find the cheapest days to fly on Google Flights. Price every date in your travel window, or a whole departure-by-return grid for round trips, with exact fares, the currency travellers really see, and the cheapest dates flagged and ranked. Up to 20 routes in one run.",
    "version": "0.0",
    "x-build-id": "WbXfjW7eBAI1VXWoZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~google-flights-cheapest-date-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-google-flights-cheapest-date-finder",
        "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/apt_marble~google-flights-cheapest-date-finder/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-google-flights-cheapest-date-finder",
        "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/apt_marble~google-flights-cheapest-date-finder/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-google-flights-cheapest-date-finder",
        "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": [
          "origin",
          "destination",
          "dateRangeStart",
          "dateRangeEnd"
        ],
        "properties": {
          "origin": {
            "title": "From (airport code)",
            "type": "string",
            "description": "The airport you are flying from, as a three-letter code such as JFK, LHR or CMN. City-wide codes such as NYC or LON are not priced by day — pick one airport."
          },
          "destination": {
            "title": "To (airport code)",
            "type": "string",
            "description": "The airport you are flying to, as a three-letter code such as LAX, DXB or CDG."
          },
          "extraRoutes": {
            "title": "More routes (optional)",
            "maxItems": 20,
            "type": "array",
            "description": "Extra routes to price in the same run, one per line, written as FROM-TO — for example LHR-DXB. Every route uses the same dates, cabin and passengers as above.",
            "items": {
              "type": "string"
            }
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "oneWay",
              "roundTrip"
            ],
            "type": "string",
            "description": "One-way gives you a price for every departure date. Round trip gives you a price grid: every departure date crossed with every return date, so you can see which combination is cheapest.",
            "default": "oneWay"
          },
          "dateRangeStart": {
            "title": "Earliest departure date",
            "type": "string",
            "description": "First departure date to price, as YYYY-MM-DD."
          },
          "dateRangeEnd": {
            "title": "Latest departure date",
            "type": "string",
            "description": "Last departure date to price, as YYYY-MM-DD. A window of up to 200 days is priced in one go; longer windows are split automatically."
          },
          "returnRangeStart": {
            "title": "Earliest return date",
            "type": "string",
            "description": "Round trips only: the first return date to price. Leave empty for a one-way calendar."
          },
          "returnRangeEnd": {
            "title": "Latest return date",
            "type": "string",
            "description": "Round trips only: the last return date to price. Every departure date in your window is crossed with every return date in this one. Up to 200 combinations are priced in one go, and a bigger grid is covered in several parts automatically."
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "INR",
              "AED",
              "SGD",
              "JPY",
              "BRL",
              "MXN",
              "PLN",
              "SEK",
              "NOK",
              "DKK",
              "CHF",
              "ZAR",
              "TRY",
              "KRW",
              "MAD"
            ],
            "type": "string",
            "description": "The currency to ask for. Fares are always stamped with the currency that actually came back, so you can see when it differs from the one you asked for.",
            "default": "USD"
          },
          "market": {
            "title": "Market",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "CA",
              "AU",
              "IN",
              "AE",
              "SG",
              "JP",
              "BR",
              "MX",
              "PL",
              "SE",
              "CH",
              "IE",
              "ZA"
            ],
            "type": "string",
            "description": "The country you are selling into. Fares and availability differ by market, so pick the one your travellers book from.",
            "default": "US"
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Which cabin to price.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult travellers. The fare returned covers the whole party, so two adults roughly doubles it.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2-11 travelling with you.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in their own seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 travelling in their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on a lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 travelling on an adult's lap.",
            "default": 0
          },
          "cheapestDatesOnly": {
            "title": "Cheapest dates only",
            "type": "boolean",
            "description": "Return only the cheapest date (or dates, when several tie) for each route instead of the whole calendar.",
            "default": false
          },
          "includeDatesWithoutFares": {
            "title": "Include dates with no fare",
            "type": "boolean",
            "description": "Also return the dates where nothing is published, with an empty price, so gaps in the calendar are visible rather than silently missing. These count as results and are charged like any other row, so switching this on can add to the bill.",
            "default": false
          },
          "maxPrice": {
            "title": "Only dates at or below this fare",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop any date priced above this amount. The comparison uses the currency the fares actually came back in, which is shown on every row. Leave empty to keep every date."
          },
          "minTripLengthNights": {
            "title": "Shortest trip (nights)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Round trip grids only: ignore combinations shorter than this many nights."
          },
          "maxTripLengthNights": {
            "title": "Longest trip (nights)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Round trip grids only: ignore combinations longer than this many nights."
          },
          "sortResultsBy": {
            "title": "Sort results by",
            "enum": [
              "date",
              "price"
            ],
            "type": "string",
            "description": "Order the rows for each route by date, or cheapest fare first.",
            "default": "date"
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many dated fares in total.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}