{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper: flight prices by route and date",
    "description": "Flight options and prices Google Flights shows for a route and date: airline, times, duration, stops, layovers. One-way or round trip, optional return flights. Plain HTTP, no login. Not affiliated with Google or any airline.",
    "version": "0.1",
    "x-build-id": "fRKQ39bULvSBWBmTL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadharbor~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadharbor-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/leadharbor~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-leadharbor-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/leadharbor~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-leadharbor-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": [
          "searches"
        ],
        "properties": {
          "searches": {
            "title": "Searches",
            "type": "array",
            "description": "One entry per search: {\"from\": \"MCT\", \"to\": \"DXB\", \"departureDate\": \"2027-01-15\", \"returnDate\": \"2027-01-22\"}. from and to are 3-letter IATA airport or city codes (MCT, DXB, LHR, NYC). departureDate is optional: left out, the search uses the day 28 days after the run starts, so the prefill never goes stale. returnDate is optional: left out, the search is one-way. Dates are written YYYY-MM-DD, from today up to 320 days ahead. Up to 50 searches per run. A bad entry becomes a free search_failed row and the other searches still run."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult travellers, 1 to 9. Prices are Google's totals for all travellers together, not per person. Adults plus children are at most 9.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of child travellers, 0 to 8, searched as child passengers; the fares Google returns for children are not verified. Infants are not supported.",
            "default": 0
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class asked for.",
            "default": "economy"
          },
          "stops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "max1",
              "max2"
            ],
            "type": "string",
            "description": "Google's stops filter. Any: no filter. Nonstop: only flights without a stop. Up to 1 stop and up to 2 stops: Google's filters of that name.",
            "default": "any"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "AED",
              "OMR",
              "SAR",
              "QAR",
              "KWD",
              "BHD",
              "EGP",
              "INR",
              "PKR",
              "JPY",
              "KRW",
              "CNY",
              "HKD",
              "SGD",
              "MYR",
              "THB",
              "IDR",
              "PHP",
              "AUD",
              "NZD",
              "CAD",
              "MXN",
              "BRL",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON",
              "TRY",
              "ILS",
              "ZAR",
              "UAH"
            ],
            "type": "string",
            "description": "Currency Google prices in. Each row carries the currency Google reported for its price; the run summary counts rows where it differs from this setting.",
            "default": "USD"
          },
          "maxResults": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many flight rows are delivered per search, 1 to 500, after sorting. Google lists from a few to a few hundred options for a route. You pay per delivered row. For a one-way search this is your cost cap per search; with Include return flights it caps the outbound rows and each outbound can add up to Return options per outbound return rows.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort and keep",
            "enum": [
              "price",
              "duration",
              "google"
            ],
            "type": "string",
            "description": "Which options are kept when there are more than Max flights per search, and the order they are delivered in. Price: cheapest first. Duration: shortest first. Google: Google's own order (its top group first).",
            "default": "price"
          },
          "includeUnpriced": {
            "title": "Include options without a price",
            "type": "boolean",
            "description": "Google lists some options with no price. Off: they are left out, not delivered and not charged. On: they are delivered with priceAvailable false and price null, after the priced ones, and charged like any other row. With this on, a Google change that hides every price is not caught as an unreadable answer: you receive rows with a null price, and they are charged.",
            "default": false
          },
          "includeReturnFlights": {
            "title": "Include return flights (round trips)",
            "type": "boolean",
            "description": "Only for searches with a returnDate. Off: you get the outbound options, each priced as the cheapest round trip Google lists for it. On: for every delivered outbound option the actor makes one more request with that outbound chosen and delivers up to Return options per outbound return flights, each priced as the round-trip total with that outbound. Every outbound and return row is charged as one flight row, and the run takes one extra request per outbound.",
            "default": false
          },
          "returnOptionsPerOutbound": {
            "title": "Return options per outbound",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "With Include return flights: how many return flights are delivered for each outbound, 1 to 10, by the Sort setting.",
            "default": 3
          },
          "requestGapSeconds": {
            "title": "Seconds between requests",
            "minimum": 0.8,
            "maximum": 10,
            "type": "number",
            "description": "Pause between two requests to Google, 0.8 to 10 seconds, default 2. In our test on 22 Nov 2026 Google answered with an error for 57% of requests at a 0.8 second pause and 44% at 2 or 3 seconds (small samples). The pause only makes errors somewhat rarer; failed requests are retried either way.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}