{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "Scrapes Google Flights for any origin/destination. Extracts airline, flight numbers, airports, departure/arrival times, duration, stops, price, cabin class, booking site, emissions, aircraft, and more.",
    "version": "3.0",
    "x-build-id": "t2Mx4d4LVHPyKH8SH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/searchapi~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-searchapi-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/searchapi~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-searchapi-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/searchapi~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-searchapi-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",
        "properties": {
          "mode": {
            "title": "Search mode",
            "enum": [
              "single",
              "batch"
            ],
            "type": "string",
            "description": "Run one top-level route or multiple routes from the searches array.",
            "default": "single"
          },
          "departure": {
            "title": "Departure airport",
            "minLength": 3,
            "maxLength": 3,
            "type": "string",
            "description": "Three-letter IATA airport code.",
            "default": "JFK"
          },
          "arrival": {
            "title": "Arrival airport",
            "minLength": 3,
            "maxLength": 3,
            "type": "string",
            "description": "Three-letter IATA airport code.",
            "default": "LAX"
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Date in YYYY-MM-DD format."
          },
          "returnDate": {
            "title": "Return date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Required for round-trip searches; YYYY-MM-DD."
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one-way",
              "round-trip"
            ],
            "type": "string",
            "description": "Choose a one-way or round-trip itinerary.",
            "default": "one-way"
          },
          "passengers": {
            "title": "Adult passengers",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers in each search unless overridden in batch mode.",
            "default": 1
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin preference used for each search unless overridden in batch mode.",
            "default": "economy"
          },
          "searches": {
            "title": "Batch flight searches",
            "maxItems": 20,
            "type": "array",
            "description": "Routes to run concurrently in batch mode. Omitted values inherit the top-level trip, passenger, and cabin defaults.",
            "items": {
              "type": "object",
              "properties": {
                "departure": {
                  "type": "string",
                  "title": "Departure IATA",
                  "description": "Three-letter origin airport code."
                },
                "arrival": {
                  "type": "string",
                  "title": "Arrival IATA",
                  "description": "Three-letter destination airport code."
                },
                "departureDate": {
                  "type": "string",
                  "title": "Departure date",
                  "description": "Departure date in YYYY-MM-DD format."
                },
                "returnDate": {
                  "type": "string",
                  "title": "Return date",
                  "description": "Return date for a round trip."
                },
                "tripType": {
                  "type": "string",
                  "title": "Trip type",
                  "description": "One-way or round-trip itinerary.",
                  "enum": [
                    "one-way",
                    "round-trip"
                  ]
                },
                "passengers": {
                  "type": "integer",
                  "title": "Passengers",
                  "description": "Adult passenger count.",
                  "minimum": 1,
                  "maximum": 9
                },
                "cabinClass": {
                  "type": "string",
                  "title": "Cabin class",
                  "description": "Cabin preference for this route.",
                  "enum": [
                    "economy",
                    "premium_economy",
                    "business",
                    "first"
                  ]
                }
              },
              "required": [
                "departure",
                "arrival",
                "departureDate"
              ]
            }
          },
          "gl": {
            "title": "Country",
            "pattern": "^[a-z]{2}$",
            "type": "string",
            "description": "Two-letter lowercase country code used by Google Flights.",
            "default": "us"
          },
          "hl": {
            "title": "Language",
            "type": "string",
            "description": "English Google interface locale: en or en-XX.",
            "default": "en"
          },
          "maxItems": {
            "title": "Maximum total records",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Global limit, allocated fairly across batch routes.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum flight searches processed at the same time.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded retries for temporary network, browser, rate-limit, or proxy failures.",
            "default": 2
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (seconds)",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time allowed for the initial page navigation.",
            "default": 60
          },
          "requestHandlerTimeoutSecs": {
            "title": "Handler timeout (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum total processing time for one route.",
            "default": 120
          },
          "resultSelectorTimeoutSecs": {
            "title": "Flight results timeout (seconds)",
            "minimum": 5,
            "maximum": 90,
            "type": "integer",
            "description": "Maximum time to wait for a flight card or no-results state.",
            "default": 30
          },
          "maxLoadMoreClicks": {
            "title": "Maximum load-more clicks",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum View more flights expansions per route when the requested quota exceeds visible cards.",
            "default": 5
          },
          "loadMoreDelayMs": {
            "title": "Load-more delay (ms)",
            "minimum": 250,
            "maximum": 3000,
            "type": "integer",
            "description": "Short stabilization delay after each View more flights expansion.",
            "default": 750
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use direct access, Apify Residential, or custom proxy URLs. GOOGLE_SERP is not compatible with this interactive page.",
            "default": {
              "useApifyProxy": false
            }
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Enable additional non-sensitive diagnostics.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}