{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "🔥 Up to 30% OFF! Scrape Google Flights — no login. Airlines, price, duration, stops, layovers, departure/arrival times, CO2 emissions + round-trip & multi-city. Fast & reliable, pay per flight.",
    "version": "0.0",
    "x-build-id": "ZVBCh1FqEZwCJwowO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bgfc97~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bgfc97-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/bgfc97~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bgfc97-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/bgfc97~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bgfc97-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",
          "departDate"
        ],
        "properties": {
          "origin": {
            "title": "Origin",
            "type": "string",
            "description": "Departure airport IATA code or city, e.g. \"JFK\" or \"New York\". (For a multi-city trip, fill this with the first leg's origin and use \"legs\" below.)"
          },
          "destination": {
            "title": "Destination",
            "type": "string",
            "description": "Arrival airport IATA code or city, e.g. \"LAX\" or \"Los Angeles\"."
          },
          "departDate": {
            "title": "Departure date",
            "type": "string",
            "description": "Departure date in YYYY-MM-DD format."
          },
          "returnDate": {
            "title": "Return date (optional)",
            "type": "string",
            "description": "Return date in YYYY-MM-DD format. Leave empty to search a one-way trip."
          },
          "legs": {
            "title": "Multi-city legs (optional)",
            "type": "array",
            "description": "Optional multi-city itinerary. Provide at least 2 legs, each an object with \"origin\", \"destination\" and \"date\" (YYYY-MM-DD). Example: [{\"origin\":\"JFK\",\"destination\":\"LAX\",\"date\":\"2026-11-15\"},{\"origin\":\"LAX\",\"destination\":\"SEA\",\"date\":\"2026-11-20\"},{\"origin\":\"SEA\",\"destination\":\"JFK\",\"date\":\"2026-11-25\"}]. When set, \"legs\" takes priority over origin/destination/returnDate. (Google parses multi-city from a natural-language query — best effort.)"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class to search.",
            "default": "economy"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter currency code Google Flights should display prices in, e.g. USD, EUR, BRL.",
            "default": "USD"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "best",
              "price",
              "duration"
            ],
            "type": "string",
            "description": "How to order the returned itineraries. \"best\" keeps Google's own ranking; \"price\" sorts cheapest-first; \"duration\" sorts fastest-first.",
            "default": "best"
          },
          "expandDetails": {
            "title": "Expand flight details (slower)",
            "type": "boolean",
            "description": "Best-effort: click each itinerary card to also capture flight numbers, aircraft type and cabin amenities. Slower and only applied to the first few results. Off by default.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of itineraries to return.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Max retries on block/timeout",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "How many times to retry with a fresh browser + proxy IP if Google blocks the request or results don't render. Higher = more robust but slower on bad luck.",
            "default": 3
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 20,
            "maximum": 180,
            "type": "integer",
            "description": "How long to wait for Google Flights results to render before giving up (per attempt).",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}