{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper – Airfare Data, $0.80/1,000 Flights",
    "description": "Turn a list of routes into a sheet of live Google Flights fares. Every row is one flight with its price, airline, flight number, local times, stops, layover airports and CO2. Pair origins with destinations, scan up to 60 departure dates, pull return legs. Searches with no fares cost nothing.",
    "version": "0.1",
    "x-build-id": "Wjcx9lHRhIM0bg2oE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/griffie~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-griffie-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/griffie~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-griffie-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/griffie~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-griffie-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": "What to collect",
            "enum": [
              "flights",
              "calendar"
            ],
            "type": "string",
            "description": "<b>Flights</b>: one row per flight for each route and date. <b>Price calendar</b>: one row per departure day with that day's lowest fare, for up to 330 days from the first departure date — the quickest way to find the cheapest day to fly. Each saved calendar day costs $0.0001 (60 days = $0.006, 330 days = $0.033 per route).",
            "default": "flights"
          },
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line as <code>ORIGIN-DESTINATION</code> with 3-letter IATA codes, e.g. <code>SEA-LAX</code>, <code>JFK-LHR</code>. City codes search every airport in the city: <code>NYC-LON</code>, <code>TYO-SEL</code>. <code>SEA&gt;LAX</code> and <code>SEA to LAX</code> also work. Each route × date is one search.",
            "items": {
              "type": "string"
            }
          },
          "origins": {
            "title": "Origins (bulk)",
            "type": "array",
            "description": "Optional. Airport or city codes to combine with <b>Destinations</b>: every origin × destination pair is searched, e.g. 3 origins × 4 destinations = 12 routes.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "Destinations (bulk)",
            "type": "array",
            "description": "Optional. Airport or city codes paired with every code in <b>Origins</b>.",
            "items": {
              "type": "string"
            }
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one_way",
              "round_trip"
            ],
            "type": "string",
            "description": "Round trip prices are the total for outbound + return, as Google shows them.",
            "default": "one_way"
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "Fixed date (YYYY-MM-DD). Leave empty to use <b>Departure in days</b> instead, so saved tasks and schedules never go stale."
          },
          "departureInDays": {
            "title": "Departure in days (from today)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Used when <b>Departure date</b> is empty: 14 = two weeks from the day the run starts.",
            "default": 14
          },
          "numberOfDates": {
            "title": "Number of departure dates",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Search several departure dates in one run to find the cheapest day to fly: 7 = the start date and the next 6 days (with step 1).",
            "default": 1
          },
          "dateStepDays": {
            "title": "Days between dates",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Gap between the departure dates above, e.g. 7 for the same weekday each week.",
            "default": 1
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "type": "string",
            "description": "Fixed return date (YYYY-MM-DD). Leave empty to use <b>Trip length</b>."
          },
          "tripLengthDays": {
            "title": "Trip length in days (round trip)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Return = departure + this many days, when no fixed return date is given.",
            "default": 7
          },
          "calendarDays": {
            "title": "Calendar: days to cover",
            "minimum": 1,
            "maximum": 330,
            "type": "integer",
            "description": "Price calendar mode only: how many consecutive departure days to price, starting at the departure date. Round trips use <b>Trip length</b> as the fixed stay. Google's calendar ends about 330 days from today; a longer range is shortened to Google's last day and the summary row says so (<code>rangeShortenedToGoogleLimit</code>).",
            "default": 60
          },
          "returnFlightsForCheapestOutbound": {
            "title": "Return flights for the N cheapest outbound flights",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Round trip only. Google lists return flights only after you choose an outbound flight. The Actor does that for the N cheapest outbound options and adds the return flights as <code>legType: \"return\"</code> rows (one extra request each). 0 = outbound list only.",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Prices are the total for all passengers.",
            "default": 1
          },
          "children": {
            "title": "Children (2–11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children 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 (max one per adult).",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Economy, premium economy, business or first.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Limit the number of stops (applies to outbound and return).",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Optional. Only these airlines: 2-letter IATA codes (<code>UA</code>, <code>DL</code>, <code>BA</code>) or an alliance: <code>STAR_ALLIANCE</code>, <code>ONEWORLD</code>, <code>SKYTEAM</code>.",
            "items": {
              "type": "string"
            }
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional price cap in the chosen currency (0 = no cap).",
            "default": 0
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter ISO code: USD, EUR, GBP, AUD, JPY…",
            "default": "USD"
          },
          "country": {
            "title": "Country (Google market)",
            "type": "string",
            "description": "2-letter country code for the Google market prices come from, e.g. us, gb, de, au. Fares can differ by market.",
            "default": "us"
          },
          "completeResults": {
            "title": "Complete flight list",
            "type": "boolean",
            "description": "Return as much of the route's flight list as possible. In Auto mode the full list comes from Google's data feed; when it falls back to results pages, the Actor also opens one page per airline in Google's filter panel and merges the extra flights (de-duplicated). No fee for extra pages or calls: you pay only for the flight rows you keep (cap them with <b>Max flights per search</b>). Turn off for Google's shortlist only.",
            "default": true
          },
          "maxResultsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit of flight rows per search (and per return lookup). With <b>Complete flight list</b> on, a busy route often has more than 100 flights. You pay per flight row, so lower this to keep only the top of the list: Google's own order first, then the extra flights cheapest first.",
            "default": 100
          },
          "searchMethod": {
            "title": "Search method",
            "enum": [
              "auto",
              "page"
            ],
            "type": "string",
            "description": "<b>Auto</b> asks Google Flights' own data feed for the route's full flight list in one call and falls back to reading the results pages when Google declines. <b>Results pages only</b> always uses the page method (slower, fewer flights). Each row's <code>source</code> field shows which method served it.",
            "default": "auto"
          },
          "includeSearchSummary": {
            "title": "Search summary + price history row",
            "type": "boolean",
            "description": "Adds one free row per search (<code>recordType: \"search\"</code>): cheapest flight, Google's price level and typical range, and the 60-day price history. Never charged. Searches with no results or errors always get this row.",
            "default": true
          },
          "includeLegs": {
            "title": "Include per-leg details",
            "type": "boolean",
            "description": "Adds a <code>legs</code> array with each segment's flight number, aircraft, legroom, times and emissions.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default Apify datacenter proxy works. Google sometimes answers with a temporary error page, and the Actor retries those on a new IP automatically.",
            "default": {
              "useApifyProxy": true
            }
          },
          "fallbackToResidential": {
            "title": "Fall back to residential proxy",
            "type": "boolean",
            "description": "Switch to Apify RESIDENTIAL proxy if Google keeps blocking the datacenter IPs. Off by default because it is rarely needed.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel searches. 4 is a good balance; lower it if you see many retries.",
            "default": 4
          },
          "maxRetries": {
            "title": "Max retries per search",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Retries per search on a new IP when Google answers with a temporary error page or blocks.",
            "default": 8
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Verbose log for troubleshooting.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}