{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — All Flights & Cheapest Dates",
    "description": "Every flight Google Flights has for a route and date (100–300, not just the top 15): prices, airlines, flight numbers, stops, layovers, aircraft, CO₂. Plus price insights (low/typical/high, 60-day history) and a cheapest-dates calendar. Pay per search, not per flight.",
    "version": "1.0",
    "x-build-id": "R0BFZPYjsaARLpEye"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datafabrik~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datafabrik-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/datafabrik~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datafabrik-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/datafabrik~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datafabrik-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": [
          "origins",
          "destinations"
        ],
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "flights",
              "cheapest-dates"
            ],
            "type": "string",
            "description": "<b>Flights</b>: every flight for each route and date. <b>Cheapest dates</b>: the lowest price for each departure day over a date range (Google's price calendar).",
            "default": "flights"
          },
          "origins": {
            "title": "From (airports)",
            "type": "array",
            "description": "IATA airport codes (CDG, JFK…), city codes (PAR, LON, NYC… = all airports of the city), several airports joined with + (CDG+ORY), or a Google place id (/m/05qtj). Every origin is combined with every destination.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "To (airports)",
            "type": "array",
            "description": "Same format as origins.",
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Departure dates",
            "type": "array",
            "description": "Dates as YYYY-MM-DD. One search per route and date. Used in <b>Flights</b> mode.",
            "items": {
              "type": "string"
            }
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one_way",
              "round_trip"
            ],
            "type": "string",
            "description": "One way, or round trip (then give return dates or a trip length).",
            "default": "one_way"
          },
          "returnDates": {
            "title": "Return dates (round trip)",
            "type": "array",
            "description": "One return date per departure date, in the same order. Or leave empty and set a trip length.",
            "items": {
              "type": "string"
            }
          },
          "tripLengthDays": {
            "title": "Trip length in days (round trip)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Return date = departure date + this many days. Required for round trips in <b>Cheapest dates</b> mode."
          },
          "returnFlightsFor": {
            "title": "Also get return flights (round trip)",
            "enum": [
              "none",
              "cheapest",
              "best"
            ],
            "type": "string",
            "description": "Google lists outbound flights with the round-trip price. Pick an outbound to also get the matching return options (one extra request, no extra charge).",
            "default": "none"
          },
          "dateRangeStart": {
            "title": "Cheapest dates: from",
            "type": "string",
            "description": "First departure day to check (YYYY-MM-DD). Default: today. Used in <b>Cheapest dates</b> mode."
          },
          "dateRangeEnd": {
            "title": "Cheapest dates: to",
            "type": "string",
            "description": "Last departure day to check (YYYY-MM-DD), up to 366 days after the start. Default: 60 days."
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class to search.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adults (12+).",
            "default": 1
          },
          "children": {
            "title": "Children (2–11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of 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.",
            "default": 0
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "one_stop_or_fewer",
              "two_stops_or_fewer"
            ],
            "type": "string",
            "description": "Maximum number of stops.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Only these airlines: 2-character IATA codes (AF, DL…) or STAR_ALLIANCE, SKYTEAM, ONEWORLD. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 = all flights Google has (often 100–300). Google's top flights come first.",
            "default": 0
          },
          "includeUnpricedFlights": {
            "title": "Include flights without a price",
            "type": "boolean",
            "description": "Google lists some flights as \"price unavailable\". Off by default.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "flights",
              "searches"
            ],
            "type": "string",
            "description": "<b>One row per flight</b> (plus one summary row per search) is best for spreadsheets. <b>One item per search</b> nests the flights.",
            "default": "flights"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter code: USD, EUR, GBP…",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of airport and airline names (en, fr, de…).",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Point of sale (us, fr, gb…). Prices can differ by country.",
            "default": "us"
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 5
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request is retried (Google often needs one retry).",
            "default": 6
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works well for Google Flights and is the cheapest.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}