{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "Every Google Flights fare for any route and date: price, airlines, flight numbers, times, stops, layovers, aircraft and CO2. Round trip or one way, any cabin and currency, many routes per run, +N dates for scheduled tracking. From $0.60 per 1,000 flights.",
    "version": "0.1",
    "x-build-id": "Nd0n9mfnUOrQYS7Zr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-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/tidyharvest~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-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/tidyharvest~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-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": [
          "origin",
          "destination",
          "departureDate"
        ],
        "properties": {
          "origin": {
            "title": "From (airport code)",
            "type": "string",
            "description": "Three-letter IATA code, e.g. SFO."
          },
          "destination": {
            "title": "To (airport code)",
            "type": "string",
            "description": "Three-letter IATA code, e.g. LAX."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD, or +N for N days from today (+30 = a month out; keeps scheduled runs current)."
          },
          "returnDate": {
            "title": "Return date (optional)",
            "type": "string",
            "description": "Leave empty for one-way. Prices are then for the whole round trip."
          },
          "searches": {
            "title": "More routes and dates (optional)",
            "type": "array",
            "description": "Search several routes or dates in one run. Each object can set origin, destination, departureDate, returnDate; anything left out falls back to the fields above. When this list is filled, the fields above are only defaults."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants with a seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "",
            "default": "economy"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three-letter code, e.g. USD, EUR, GBP.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Locale for airline and airport names, e.g. en-US, de-DE.",
            "default": "en-US"
          },
          "maxStops": {
            "title": "Maximum stops",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "0 = nonstop only."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 1,
            "type": "integer",
            "description": "Whole-trip price ceiling in the chosen currency."
          },
          "airlines": {
            "title": "Only these airlines",
            "type": "array",
            "description": "Two-letter IATA codes (UA, DL) or alliances (STAR_ALLIANCE, SKYTEAM, ONEWORLD).",
            "items": {
              "type": "string"
            }
          },
          "excludeAirlines": {
            "title": "Leave out these airlines",
            "type": "array",
            "description": "Two-letter IATA codes (NK, F9). Any trip using one of them is dropped.",
            "items": {
              "type": "string"
            }
          },
          "excludeBasicEconomy": {
            "title": "Exclude basic economy",
            "type": "boolean",
            "description": "",
            "default": false
          },
          "maxDurationMinutes": {
            "title": "Maximum trip duration (minutes)",
            "minimum": 30,
            "type": "integer",
            "description": "Total trip time ceiling; Google applies it."
          },
          "earliestDepartureHour": {
            "title": "Earliest departure hour",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "0-23, local time at the origin. Google applies it to the outbound flight."
          },
          "latestDepartureHour": {
            "title": "Latest departure hour",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "0-23, local time at the origin."
          },
          "earliestArrivalHour": {
            "title": "Earliest arrival hour",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "0-23, local time at the destination."
          },
          "latestArrivalHour": {
            "title": "Latest arrival hour",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "0-23, local time at the destination."
          },
          "minLayoverMinutes": {
            "title": "Minimum layover (minutes)",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "Skip tight connections."
          },
          "maxLayoverMinutes": {
            "title": "Maximum layover (minutes)",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "Skip long layovers."
          },
          "connectingAirports": {
            "title": "Only connect through these airports",
            "type": "array",
            "description": "Three-letter airport codes.",
            "items": {
              "type": "string"
            }
          },
          "lessEmissionsOnly": {
            "title": "Lower-emission flights only",
            "type": "boolean",
            "description": "Google's own emissions flag.",
            "default": false
          },
          "carryOnBags": {
            "title": "Carry-on bags",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Prices include this many carry-on bags per traveler (basic fares often charge for them).",
            "default": 0
          },
          "checkedBags": {
            "title": "Checked bags",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Prices include this many checked bags per traveler.",
            "default": 0
          },
          "hideSelfTransfer": {
            "title": "Hide self-transfer itineraries",
            "type": "boolean",
            "description": "Leave out trips made of separate tickets.",
            "default": false
          },
          "returnFlightsForTop": {
            "title": "Return flights for the top N results",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Round trips only. For each of the N best outbound flights (in your sort order), also list the return flights you could pair with it, priced as the whole trip. 0 = off. Adds about a second per flight.",
            "default": 0
          },
          "maxReturnOptions": {
            "title": "Return flights listed per outbound",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Cheapest first.",
            "default": 8
          },
          "includePriceHistory": {
            "title": "Save Google's price verdict and 60-day price history",
            "type": "boolean",
            "description": "Stored in the run's key-value store as PRICE_HISTORY: for each search, Google's low/typical/high verdict, the typical price range and about 60 days of the cheapest price for that trip.",
            "default": true
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure",
              "arrival"
            ],
            "type": "string",
            "description": "",
            "default": "best"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on flights returned (and charged) across all searches.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use if Google refuses direct requests.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}