{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Prices & Carbon Emissions",
    "description": "Search Google Flights: one-way, round-trip, multi-city. Real prices, airline/plane-type detail, and per-flight carbon-emission data. Deep filters: departure/arrival hour windows, layover duration, connecting airports, less-emissions-only. No API key, no browser.",
    "version": "1.0",
    "x-build-id": "cEpebxItPyuh5FNJ8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inexhaustible_glass~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inexhaustible_glass-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/inexhaustible_glass~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-inexhaustible_glass-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/inexhaustible_glass~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-inexhaustible_glass-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": [
          "fromAirport",
          "toAirport",
          "date"
        ],
        "properties": {
          "fromAirport": {
            "title": "✈️ From airport",
            "type": "string",
            "description": "Three-letter IATA airport code."
          },
          "toAirport": {
            "title": "🛬 To airport",
            "type": "string",
            "description": "Three-letter IATA airport code."
          },
          "date": {
            "title": "📅 Departure date",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "tripType": {
            "title": "🔁 Trip type",
            "enum": [
              "one-way",
              "round-trip"
            ],
            "type": "string",
            "description": "One-way needs date; round-trip also needs returnDate (expanded into two full one-way searches internally).",
            "default": "one-way"
          },
          "returnDate": {
            "title": "📅 Return date (round-trip only)",
            "type": "string",
            "description": "YYYY-MM-DD. Required if trip type is round-trip."
          },
          "flightSearches": {
            "title": "📋 Multiple searches (JSON, overrides the simple fields above)",
            "type": "array",
            "description": "For bulk runs or multi-city itineraries. Each item: {fromAirport, toAirport, date, tripType, returnDate} for one-way/round-trip, or {tripType:'multi-city', legs:[{fromAirport,toAirport,date}, ...]} for multi-city. Per-search filters (maxStops, airlines, etc.) override the Advanced defaults below just for that search."
          },
          "seatType": {
            "title": "💺 Seat class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class for the search.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "type": "integer",
            "description": "Number of child passengers.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants (own seat)",
            "minimum": 0,
            "type": "integer",
            "description": "Number of infants with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants (on lap)",
            "minimum": 0,
            "type": "integer",
            "description": "Number of infants travelling on a lap.",
            "default": 0
          },
          "maxResultsPerSearch": {
            "title": "📊 Max results per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Caps how many flight results are pushed per search (Google itself may return fewer).",
            "default": 50
          },
          "maxStops": {
            "title": "Max stops",
            "type": "integer",
            "description": "0 = nonstop only. Leave blank for no limit."
          },
          "maxPrice": {
            "title": "Max price",
            "type": "integer",
            "description": "In the selected currency. Leave blank for no limit."
          },
          "airlines": {
            "title": "Airlines (IATA codes, e.g. AI, 6E)",
            "type": "array",
            "description": "Only include these airlines (IATA codes). Leave empty for all airlines.",
            "items": {
              "type": "string"
            }
          },
          "excludeBasicEconomy": {
            "title": "Exclude basic economy fares",
            "type": "boolean",
            "description": "Remove basic economy fares from results.",
            "default": false
          },
          "lessEmissionsOnly": {
            "title": "Lower-emissions flights only",
            "type": "boolean",
            "description": "Only include flights Google flags as lower-emissions for the route.",
            "default": false
          },
          "earliestDepartureHour": {
            "title": "Earliest departure hour (0-23, local time)",
            "type": "integer",
            "description": "Only include flights departing at or after this local hour."
          },
          "latestDepartureHour": {
            "title": "Latest departure hour (0-23, local time)",
            "type": "integer",
            "description": "Only include flights departing at or before this local hour."
          },
          "earliestArrivalHour": {
            "title": "Earliest arrival hour (0-23, local time)",
            "type": "integer",
            "description": "Only include flights arriving at or after this local hour."
          },
          "latestArrivalHour": {
            "title": "Latest arrival hour (0-23, local time)",
            "type": "integer",
            "description": "Only include flights arriving at or before this local hour."
          },
          "maxDurationMinutes": {
            "title": "Max total journey duration (minutes)",
            "type": "integer",
            "description": "Only include flights whose total journey duration is at or under this many minutes."
          },
          "connectingAirports": {
            "title": "Only connect through these airports (IATA codes)",
            "type": "array",
            "description": "Only allow connections through these airports (IATA codes). Leave empty for any.",
            "items": {
              "type": "string"
            }
          },
          "minLayoverMinutes": {
            "title": "Min layover duration (minutes)",
            "type": "integer",
            "description": "Only include flights whose layover(s) are at least this many minutes."
          },
          "maxLayoverMinutes": {
            "title": "Max layover duration (minutes)",
            "type": "integer",
            "description": "Only include flights whose layover(s) are at most this many minutes."
          },
          "carryOnBags": {
            "title": "Carry-on bags (included in price estimate)",
            "type": "integer",
            "description": "Number of carry-on bags to include in the price estimate.",
            "default": 0
          },
          "checkedBags": {
            "title": "Checked bags (included in price estimate)",
            "type": "integer",
            "description": "Number of checked bags to include in the price estimate.",
            "default": 0
          },
          "hideSeparateAndSelfTransfer": {
            "title": "Hide separate-ticket / self-transfer itineraries",
            "type": "boolean",
            "description": "Remove separate-ticket and self-transfer itineraries from results.",
            "default": false
          },
          "currency": {
            "title": "Currency code (e.g. USD, INR, EUR)",
            "type": "string",
            "description": "ISO currency code for prices. Leave blank to let Google decide."
          },
          "language": {
            "title": "Language code (e.g. en-US, hi, fr)",
            "type": "string",
            "description": "Language code for result text. Leave blank to let Google decide."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}