{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Fares, Itineraries & Price Insights",
    "description": "Google Flights itineraries for any route and dates: total and per-person fares, airlines, flight numbers, segments, layovers, CO2, price insights and booking options.",
    "version": "0.1",
    "x-build-id": "Og9QLIvMc2bgDaame"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-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/tortuga~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-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/tortuga~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-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": "From",
            "type": "string",
            "description": "Where you fly from: an airport code (JFK), a city or metro area (New York, NYC, London) or several airports separated by commas (JFK, EWR, LGA). City names are resolved by Google itself."
          },
          "destination": {
            "title": "To",
            "type": "string",
            "description": "Where you fly to: an airport code (LAX), a city (Paris, Tokyo) or several airports separated by commas."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD, or relative to today like \"+30 days\" or \"in 2 weeks\" (a rolling date for scheduled runs). Empty = 30 days from today. Use a fixed date to watch one trip's fares."
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "type": "string",
            "description": "Leave empty for a one-way search. For a round trip: YYYY-MM-DD or relative to today (\"+37 days\")."
          },
          "routes": {
            "title": "More routes",
            "type": "array",
            "description": "Optional: several searches in one run, e.g. [{\"origin\": \"SFO\", \"destination\": \"Tokyo\", \"departureDate\": \"2026-12-20\", \"returnDate\": \"2027-01-03\"}]. Dates left out use the dates above. Passengers, cabin and filters below apply to every route. Clear From/To above to search only these."
          },
          "startUrls": {
            "title": "Google Flights URLs",
            "type": "array",
            "description": "Optional: Google Flights search URLs (google.com/travel/flights/search?tfs=... or ?q=...). The route, dates, passengers, cabin and filters set in the URL are used. One-way and round trips.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers (prices are totals for all passengers).",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Child passengers aged 2-11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 on an adult's lap (at most one per adult).",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Seat class to price.",
            "default": "economy"
          },
          "stops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops per direction.",
            "default": "any"
          },
          "airlines": {
            "title": "Only these airlines",
            "type": "array",
            "description": "Two-letter airline codes (BA, DL, LH) or alliances (STAR_ALLIANCE, ONEWORLD, SKYTEAM). Sent to Google like its airline filter. Empty = all airlines.",
            "items": {
              "type": "string"
            }
          },
          "excludeAirlines": {
            "title": "Exclude airlines",
            "type": "array",
            "description": "Two-letter airline codes to leave out (any flight segment by that airline drops the itinerary).",
            "items": {
              "type": "string"
            }
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 1,
            "type": "integer",
            "description": "Total price limit for all passengers in the chosen currency. Sent to Google and checked again on every itinerary."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "cheapest",
              "duration",
              "departure_time",
              "arrival_time"
            ],
            "type": "string",
            "description": "Order of the itineraries: Google's \"Top flights\" ranking (best first), cheapest, shortest, earliest departure or earliest arrival. For round trips it also picks which return flights are taken.",
            "default": "best"
          },
          "returnFlightsPerOutbound": {
            "title": "Return flights per outbound (round trips)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Round trips: for each outbound flight, how many return flights to output as complete itineraries priced at Google's exact round-trip total (one extra request per outbound flight). 0 = outbound flights only, with Google's cheapest round-trip total.",
            "default": 1
          },
          "maxResultsPerSearch": {
            "title": "Max itineraries per search",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap per route (e.g. the 10 best or cheapest). Empty = every itinerary Google shows (usually 20-40)."
          },
          "includeBookingOptions": {
            "title": "Include booking options",
            "type": "boolean",
            "description": "For each itinerary, also get Google's booking options: airline or travel agency, price and fare name (one extra request and a small extra charge per itinerary).",
            "default": false
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code for all prices, e.g. USD, EUR, GBP, INR, JPY.",
            "default": "USD"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code Google prices for (gl), e.g. us, gb, de, in. Fares and booking options can differ by country.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of airport and airline names (hl), e.g. en, de, fr, es.",
            "default": "en"
          },
          "maxItems": {
            "title": "Max itineraries",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many itineraries in total (all routes). Keeps cost predictable.",
            "default": 100
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new items or items whose price/status changed. Use with a Schedule; unchanged items are not charged.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's standard datacenter proxy works (no paid SERP or residential proxy needed).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}