{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights API",
    "description": "Google Flights API for extracting flight search data. Search one-way, round-trip, and multi-city itineraries. Filter by price, stops, airlines, and passenger counts. Ideal for travel apps, price monitoring, data analytics, and flight comparison. Supports 29+ languages and 39+ countries.",
    "version": "0.0",
    "x-build-id": "LWJ8XBD8HWOFVYM92"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/johnvc~Google-Flights-Data-Scraper-Flight-and-Price-Search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-johnvc-Google-Flights-Data-Scraper-Flight-and-Price-Search",
        "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/johnvc~Google-Flights-Data-Scraper-Flight-and-Price-Search/runs": {
      "post": {
        "operationId": "runs-sync-johnvc-Google-Flights-Data-Scraper-Flight-and-Price-Search",
        "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/johnvc~Google-Flights-Data-Scraper-Flight-and-Price-Search/run-sync": {
      "post": {
        "operationId": "run-sync-johnvc-Google-Flights-Data-Scraper-Flight-and-Price-Search",
        "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": {
          "departure_id": {
            "title": "Departure Airport Code(s)",
            "type": "string",
            "description": "Departure airport code(s), comma-separated for multiple (e.g., 'LAX', 'JFK', 'CDG,ORY'). Required for one-way and round-trip searches. Not used for multi-city trips."
          },
          "arrival_id": {
            "title": "Arrival Airport Code(s)",
            "type": "string",
            "description": "Arrival airport code(s), comma-separated for multiple (e.g., 'JFK', 'SFO', 'LAX,SEA'). Required for one-way and round-trip searches. Not used for multi-city trips."
          },
          "outbound_date": {
            "title": "Outbound Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Departure date in YYYY-MM-DD format (e.g., '2025-11-25'). Required for one-way and round-trip searches. Not used for multi-city trips."
          },
          "return_date": {
            "title": "Return Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Return date in YYYY-MM-DD format (e.g., '2025-11-30'). Optional, used for round-trip searches."
          },
          "multi_city_json": {
            "title": "Multi-City JSON",
            "type": "string",
            "description": "JSON string for multi-city trips. Format: [{\"departure_id\":\"...\",\"arrival_id\":\"...\",\"date\":\"...\"},...]. When provided, departure_id, arrival_id, and outbound_date are not required."
          },
          "adults": {
            "title": "Number of Adults",
            "minimum": 1,
            "type": "integer",
            "description": "Number of adult passengers (default: 1, minimum: 1)",
            "default": 1
          },
          "children": {
            "title": "Number of Children",
            "minimum": 0,
            "type": "integer",
            "description": "Number of child passengers (default: 0, minimum: 0)",
            "default": 0
          },
          "infants": {
            "title": "Number of Infants",
            "minimum": 0,
            "type": "integer",
            "description": "Number of infant passengers (default: 0, minimum: 0)",
            "default": 0
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Currency code for prices (e.g., 'USD', 'EUR', 'GBP'). Default: 'USD'",
            "default": "USD"
          },
          "hl": {
            "title": "Language Code",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "hi",
              "tr",
              "pl",
              "nl",
              "sv",
              "da",
              "no",
              "fi",
              "cs",
              "hu",
              "ro",
              "el",
              "th",
              "vi",
              "id",
              "ms",
              "he",
              "uk"
            ],
            "type": "string",
            "description": "Language code for results (e.g., 'en', 'fr', 'de', 'es'). Default: 'en'",
            "default": "en"
          },
          "gl": {
            "title": "Country Code",
            "enum": [
              "us",
              "uk",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "pl",
              "br",
              "ru",
              "jp",
              "kr",
              "cn",
              "tw",
              "in",
              "sa",
              "tr",
              "se",
              "dk",
              "no",
              "fi",
              "cz",
              "hu",
              "ro",
              "mx",
              "ar",
              "ch",
              "at",
              "be",
              "ie",
              "nz",
              "sg",
              "my",
              "th",
              "ph",
              "id",
              "vn"
            ],
            "type": "string",
            "description": "Country code for results (e.g., 'us', 'uk', 'fr', 'de'). Default: 'us'",
            "default": "us"
          },
          "max_price": {
            "title": "Maximum Price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter in the specified currency. Optional."
          },
          "max_stops": {
            "title": "Maximum Stops",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of stops (0 = direct flights only, 1 = one stop max, null = no limit). Optional."
          },
          "airlines": {
            "title": "Preferred Airlines",
            "type": "string",
            "description": "Comma-separated list of preferred airline codes (e.g., 'UA,AA,DL'). Optional."
          },
          "exclude_basic": {
            "title": "Exclude Basic Economy",
            "type": "boolean",
            "description": "If true, filters out Economy flights that include carry-on bags and free seat selection. Optional.",
            "default": false
          },
          "max_pages": {
            "title": "Maximum Pages",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of pages to fetch (0 = no limit, default: 1).",
            "default": 1
          },
          "output_file": {
            "title": "Output File",
            "type": "string",
            "description": "Optional filename to save results. If not provided, will auto-generate based on route and parameters."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}