{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "Collects public Google Flights itinerary and optional expanded segment details without bypassing access controls.",
    "version": "1.0",
    "x-build-id": "jIjf7dJFC1zjpA9CV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-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/googleapi~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-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/googleapi~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-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": {
          "origin": {
            "title": "Origin airport",
            "type": "string",
            "description": "IATA code or airport name used with the route fields.",
            "default": "JFK"
          },
          "destination": {
            "title": "Destination airport",
            "type": "string",
            "description": "IATA code or airport name used with the route fields.",
            "default": "LAX"
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Departure date in YYYY-MM-DD format.",
            "default": "2026-10-17"
          },
          "returnDate": {
            "title": "Return date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional return date in YYYY-MM-DD format. When supplied, price is labelled as a round-trip total only if Google says so.",
            "default": "2026-10-24"
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "round_trip",
              "one_way"
            ],
            "type": "string",
            "description": "Requested trip type for browser form searches.",
            "default": "round_trip"
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Requested seating class for browser form searches.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "queries": {
            "title": "Route queries",
            "maxItems": 50,
            "type": "array",
            "description": "Route strings such as JFK-LAX 2026-10-17 2026-10-24.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "searches": {
            "title": "Route search objects",
            "maxItems": 50,
            "type": "array",
            "description": "Structured route searches. Each object may override the top-level route fields.",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "title": "Origin",
                  "type": "string",
                  "description": "IATA code or airport name for this route."
                },
                "destination": {
                  "title": "Destination",
                  "type": "string",
                  "description": "IATA code or airport name for this route."
                },
                "departureDate": {
                  "title": "Departure date",
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "description": "Departure date in YYYY-MM-DD format."
                },
                "returnDate": {
                  "title": "Return date",
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "description": "Optional return date in YYYY-MM-DD format."
                },
                "tripType": {
                  "title": "Trip type",
                  "type": "string",
                  "enum": [
                    "round_trip",
                    "one_way"
                  ],
                  "description": "Round-trip or one-way search."
                },
                "cabin": {
                  "title": "Cabin",
                  "type": "string",
                  "enum": [
                    "economy",
                    "premium_economy",
                    "business",
                    "first"
                  ],
                  "description": "Requested seating class."
                },
                "adults": {
                  "title": "Adults",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9,
                  "description": "Number of adult passengers."
                },
                "currency": {
                  "title": "Currency",
                  "type": "string",
                  "maxLength": 3,
                  "description": "Google Flights display currency code."
                },
                "country": {
                  "title": "Google country",
                  "type": "string",
                  "maxLength": 2,
                  "description": "Two-letter Google country setting."
                },
                "language": {
                  "title": "Google language",
                  "type": "string",
                  "maxLength": 10,
                  "description": "Google language setting."
                }
              },
              "additionalProperties": false
            }
          },
          "startUrls": {
            "title": "Google Flights URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Public Google Flights landing or search URLs. Only google.com/travel/flights URLs are accepted.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "Public Google Flights landing or search URL."
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "maxItems": {
            "title": "Maximum itineraries",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of valid public itinerary records written to the dataset.",
            "default": 25
          },
          "page": {
            "title": "Starting page",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Google Flights exposes a scrollable result list rather than numbered pages; this compatibility field remains fixed at 1. Use maxPages to bound browser scrolling.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum result-list snapshots per source when browser rendering is active, including the initial list and subsequent bounded scrolls. Stops sooner when no new itinerary appears or maxItems is reached.",
            "default": 3
          },
          "renderJavaScript": {
            "title": "Render JavaScript fallback",
            "type": "boolean",
            "description": "Use a normal Playwright Chromium page for public URL searches when direct HTML does not contain itinerary cards. Structured route searches always use the browser to submit the requested route.",
            "default": true
          },
          "includeFlightDetails": {
            "title": "Expand flight details",
            "type": "boolean",
            "description": "In the browser-rendered page, open a bounded number of public Flight details panels to collect per-leg flight number, aircraft, legroom, amenities, emissions, and contrail data when shown. Does not bypass access controls.",
            "default": false
          },
          "maxFlightDetails": {
            "title": "Maximum detail panels",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum number of visible Flight details panels to expand when includeFlightDetails is enabled.",
            "default": 5
          },
          "browserWaitMs": {
            "title": "Browser wait (milliseconds)",
            "minimum": 500,
            "maximum": 20000,
            "type": "integer",
            "description": "Bounded wait for public results and details to render.",
            "default": 4000
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for each direct or browser request.",
            "default": 25
          },
          "maxRequestRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Bounded retries for transient direct requests. Access-control responses are not retried or bypassed.",
            "default": 1
          },
          "requestDelayMs": {
            "title": "Request delay (milliseconds)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional delay between sources.",
            "default": 1000
          },
          "currency": {
            "title": "Display currency",
            "maxLength": 3,
            "type": "string",
            "description": "Google Flights display currency code.",
            "default": "USD"
          },
          "country": {
            "title": "Google country",
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter Google country setting.",
            "default": "us"
          },
          "language": {
            "title": "Google language",
            "maxLength": 10,
            "type": "string",
            "description": "Google language setting.",
            "default": "en"
          },
          "acceptLanguage": {
            "title": "Accept-Language",
            "maxLength": 120,
            "type": "string",
            "description": "Language preference sent with public Google Flights requests.",
            "default": "en-US,en;q=0.8"
          },
          "userAgent": {
            "title": "User agent",
            "maxLength": 300,
            "type": "string",
            "description": "Optional ordinary user-agent string. Browser stealth or fingerprint evasion is not used."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Accepted for Apify input compatibility. This Actor currently makes direct public requests and does not route traffic through this setting."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}