{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper: Fares, Schedules, Stops and Round Trips",
    "description": "Google Flights scraper, no browser: prices for your route, dates, passengers and cabin, with times, duration, stops, layovers, each leg's flight number and aircraft, and CO2. One way or round trip, many dates per run for cheapest-day searches. Trial: 0.01 USD per 1,000 itineraries until 30 Nov 2026.",
    "version": "1.0",
    "x-build-id": "dpcNgJctdVCbzg8wq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cozybit~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cozybit-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/cozybit~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cozybit-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/cozybit~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cozybit-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",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Enter 1-100 routes such as JFK-CDG (New York to Paris) or LAX-NYC. Use uppercase three-letter IATA airport or city codes. Duplicate routes and extra spaces are removed.",
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Departure dates",
            "maxItems": 30,
            "type": "array",
            "description": "Up to 30 YYYY-MM-DD or relative dates such as 3 weeks, from today through 330 days ahead (UTC). Use a whole number of days, weeks, months or years; relative dates count from the run date. Empty means 14 days from today. Each route is searched for each resolved date; duplicates are removed.",
            "items": {
              "type": "string",
              "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+\\s*(day|week|month|year)s?)$"
            },
            "default": []
          },
          "returnAfterDays": {
            "title": "Return after days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "0 for one way; 1-30 for a round trip returning this many days after departure. Round-trip prices are totals, not one-way prices; results describe outbound options.",
            "default": 0
          },
          "fareCalendarDays": {
            "title": "Fare calendar (days)",
            "minimum": 0,
            "maximum": 180,
            "type": "integer",
            "description": "0 turns this off. Otherwise returns one row per departure day with Google's cheapest total fare, replacing the itinerary list. Requires airport codes, not city codes (for example JFK instead of NYC). Starts at the earliest departure date and covers this many consecutive days, maximum 180. Round trips use Return after days as a fixed trip length. The full window, including returns, must stay within 330 days ahead. Uses one Google request per route. Maximum itineraries per search does not apply; free plans return at most 40 calendar rows per run.",
            "default": 0
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adults, from 1 to 9. Prices cover the whole party.",
            "default": 1
          },
          "children": {
            "title": "Children (experimental)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of children, from 0 to 8. Child passenger request codes are unverified; Google may ignore them.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap (experimental)",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Number of lap infants, from 0 to 4, at most one per adult. Infant request codes are unverified; Google may ignore them.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Requested cabin class.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Maximum stops (experimental)",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Any, nonstop (0), at most 1 or at most 2 stops. This request encoding is unverified; Google may ignore it.",
            "default": "any"
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Z]{3}$",
            "type": "string",
            "description": "Three-letter uppercase currency code. A returned search-state currency mismatch is an error.",
            "default": "USD"
          },
          "country": {
            "title": "Search market",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter uppercase country code. Sets Google's market (gl) and, for residential proxies only, the proxy country. Datacenter and custom proxies retain their own routing.",
            "default": "US"
          },
          "maxResultsPerSearch": {
            "title": "Maximum itineraries per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum itineraries per route and date. Google may list fewer; there is no pagination. Free Apify plans return at most 40 itineraries across the entire run.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Datacenter by default. Residential proxies are optional and use the search country. No automatic fallback. Turn off for direct requests, which cannot rotate a blocked IP.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}