{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Airfare, Routes, Prices",
    "description": "Scrape Google Flights at scale: one-way, round-trip, or multi-city itineraries with per-offer pricing, total duration, stops, layovers, airline metadata, and carbon emissions. Returns Google's Best flights recommendations plus the full Other flights result set.",
    "version": "1.0",
    "x-build-id": "9vV42kgDowqzyahvn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrape.badger~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrape.badger-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/scrape.badger~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrape.badger-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/scrape.badger~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrape.badger-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": [
          "departure_id",
          "arrival_id",
          "outbound_date"
        ],
        "properties": {
          "departure_id": {
            "title": "Departure airport",
            "type": "string",
            "description": "Departure airport IATA code (e.g. <b>JFK</b>, <b>LAX</b>, <b>LHR</b>) or Google location ID."
          },
          "arrival_id": {
            "title": "Arrival airport",
            "type": "string",
            "description": "Arrival airport IATA code (e.g. <b>LHR</b>, <b>CDG</b>, <b>NRT</b>) or Google location ID."
          },
          "outbound_date": {
            "title": "Outbound date",
            "type": "string",
            "description": "Outbound date in <b>YYYY-MM-DD</b> format. Example: <b>2026-06-15</b>."
          },
          "return_date": {
            "title": "Return date",
            "type": "string",
            "description": "Return date in <b>YYYY-MM-DD</b> format. Required when <b>trip_type</b> is <b>round_trip</b>. Leave blank for one-way."
          },
          "trip_type": {
            "title": "Trip type",
            "enum": [
              "round_trip",
              "one_way",
              "multi_city"
            ],
            "type": "string",
            "description": "Itinerary type: <b>round_trip</b> (default), <b>one_way</b>, or <b>multi_city</b>.",
            "default": "round_trip"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers (1-9).",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children passengers (0-8).",
            "default": 0
          },
          "infants_in_seat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants with their own seat (0-4).",
            "default": 0
          },
          "infants_on_lap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants travelling on an adult's lap (0-4).",
            "default": 0
          },
          "travel_class": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class to search.",
            "default": "economy"
          },
          "stops": {
            "title": "Stops filter",
            "enum": [
              "any",
              "nonstop",
              "one_stop",
              "two_stops"
            ],
            "type": "string",
            "description": "Maximum number of stops per leg.",
            "default": "any"
          },
          "max_price": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Upper price bound in the currency selected below. Optional."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO-4217 currency code. Example: <b>USD</b>, <b>EUR</b>, <b>GBP</b>.",
            "default": "USD"
          },
          "gl": {
            "title": "Country",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (lowercase). Example: <b>us</b>, <b>gb</b>, <b>de</b>.",
            "default": "us"
          },
          "hl": {
            "title": "Language",
            "type": "string",
            "description": "ISO 639-1 language code. Example: <b>en</b>, <b>es</b>, <b>de</b>.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}