{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & API — $0.01/Search, All Flights",
    "description": "Google Flights API for cheap flights and airfare tracking: every flight for a route and date (100–300), one-way, round trip or multi-city, with price, airlines, flight numbers, stops, CO₂, price level and 60-day history, plus a cheapest-dates calendar. $0.01 per search; failed searches free.",
    "version": "1.0",
    "x-build-id": "4TTjkqthnUubv4NbT"
  },
  "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",
        "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. Leave empty for a trip 30 days from today (handy for schedules).",
            "items": {
              "type": "string"
            }
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one_way",
              "round_trip",
              "multi_city"
            ],
            "type": "string",
            "description": "One way, or round trip (then give return dates or a trip length). Multi-city: describe the trips in \"Multi-city trips\" below and leave origins, destinations and dates empty. Empty = one-way (multi-city when trips are given)."
          },
          "multiCityTrips": {
            "title": "Multi-city trips",
            "type": "array",
            "description": "One trip per line, its flights separated by \";\": ORIGIN DESTINATION YYYY-MM-DD, e.g. \"CDG JFK 2027-06-15; JFK LAX 2027-06-20; LAX CDG 2027-06-27\" (2 to 6 flights, airport or city codes). Each trip is one search, charged once, with the options of every leg. Leave Origins, Destinations and Departure dates empty.",
            "items": {
              "type": "string"
            }
          },
          "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": "Round trip: also fetch the return options for the cheapest or best outbound (none by default, no extra charge). Multi-city: the flight of each leg that leads to the options of the next leg (cheapest by default, or best)."
          },
          "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"
            }
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 1,
            "type": "integer",
            "description": "Only flights at or under this price, in the chosen currency, for all passengers (round trip and multi-city: price of the whole trip). Flights without a price are left out. In <b>Cheapest dates</b> mode: only days at or under this price. Empty = no limit."
          },
          "departureTimeRange": {
            "title": "Departure time",
            "type": "string",
            "description": "Only flights leaving in this time range, local time of the airport: \"06:00-12:00\", or \"22:00-06:00\" overnight. Applies to every flight listed (outbound, return, each multi-city leg). <b>Flights</b> mode only. Empty = any time."
          },
          "arrivalTimeRange": {
            "title": "Arrival time",
            "type": "string",
            "description": "Only flights arriving in this time range, local time of the airport, e.g. \"08:00-20:00\". Same rules as the departure time."
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}