{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & API - Flight Prices & Cheap Flights",
    "description": "[Limited Launch Offer $1/1K] Scrape Google Flights for many routes and dates: flight prices, airlines, flight numbers, stops, layovers, aircraft, CO2, round trips and a calendar of the cheapest flights per day. Airfare data, fast, no browser.",
    "version": "0.1",
    "x-build-id": "eaZqzKXYVyW5DbOqV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kalilfagundes.w~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kalilfagundes.w-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/kalilfagundes.w~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kalilfagundes.w-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/kalilfagundes.w~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kalilfagundes.w-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": [
          "routes"
        ],
        "properties": {
          "routes": {
            "title": "Routes (routes)",
            "type": "array",
            "description": "Origin-destination pairs, one per line, e.g. JFK-LHR or GRU-LIS. Airport codes, supported city codes (NYC, LON, PAR, TYO...) and comma lists on either side (JFK,EWR-LHR,LGW) all work in both modes. Invalid routes are skipped with a warning and listed in OUTPUT.skippedRoutes; at least one valid route is required.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode (mode)",
            "enum": [
              "flights",
              "cheapest-dates"
            ],
            "type": "string",
            "description": "Flights: every flight for each route and departure date. Calendar: the lowest price for every day between From and To.",
            "default": "flights"
          },
          "departureDates": {
            "title": "Departure dates (departureDates)",
            "type": "array",
            "description": "YYYY-MM-DD, one per line (flights mode). Empty = 30 days from today.",
            "items": {
              "type": "string"
            }
          },
          "tripType": {
            "title": "Trip type (tripType)",
            "enum": [
              "one-way",
              "round-trip"
            ],
            "type": "string",
            "description": "One-way or round trip.",
            "default": "one-way"
          },
          "returnAfterDays": {
            "title": "Return after days (returnAfterDays)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Length of stay for round trips.",
            "default": 7
          },
          "dateFrom": {
            "title": "Calendar from (dateFrom)",
            "type": "string",
            "description": "Calendar mode: first departure date. Empty = tomorrow."
          },
          "dateTo": {
            "title": "Calendar to (dateTo)",
            "type": "string",
            "description": "Calendar mode: last departure date. Empty = 60 days after From."
          },
          "adults": {
            "title": "Adults (adults)",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "cabin": {
            "title": "Cabin (cabin)",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops (maxStops)",
            "enum": [
              "any",
              "nonstop",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines (airlines)",
            "type": "array",
            "description": "Only these airlines (IATA codes, e.g. AA, LA, TP). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by (sortBy)",
            "enum": [
              "best",
              "cheapest",
              "duration",
              "departure",
              "arrival",
              "emissions"
            ],
            "type": "string",
            "description": "Order of flights in flights mode.",
            "default": "best"
          },
          "currency": {
            "title": "Currency (currency)",
            "type": "string",
            "description": "3-letter currency code (USD, EUR, BRL...).",
            "default": "USD"
          },
          "maxFlightsPerSearch": {
            "title": "Flights per search (maxFlightsPerSearch)",
            "minimum": 1,
            "type": "integer",
            "description": "Keep the first N flights of each route and date.",
            "default": 50
          },
          "roundTripOutboundOptions": {
            "title": "Round trip: outbound options (roundTripOutboundOptions)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many outbound flights to pair with return flights (each adds one request).",
            "default": 3
          },
          "maxItems": {
            "title": "Maximum rows in total (maxItems)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows in the whole run. 0 = no limit.",
            "default": 500
          },
          "language": {
            "title": "Language (language)",
            "type": "string",
            "description": "Language of airport/airline names.",
            "default": "en"
          },
          "country": {
            "title": "Google country (country)",
            "type": "string",
            "description": "Two-letter country of the Google storefront.",
            "default": "us"
          },
          "proxyConfiguration": {
            "title": "Proxy (proxyConfiguration)",
            "type": "object",
            "description": "Requests start direct; this proxy is used only if Google refuses one.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}