{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper - Prices, Airlines, Stops, CO2",
    "description": "Scrape Google Flights: every flight for any route and date with price, airlines, flight numbers, times, stops, layovers, aircraft, legroom, CO2 and route price history. One-way, round trip, any cabin and passengers. $1 per 1,000 flights.",
    "version": "0.1",
    "x-build-id": "pQPnIhGPBG6xAmMx4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coiled_magistrate~google-flights-fast/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coiled_magistrate-google-flights-fast",
        "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/coiled_magistrate~google-flights-fast/runs": {
      "post": {
        "operationId": "runs-sync-coiled_magistrate-google-flights-fast",
        "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/coiled_magistrate~google-flights-fast/run-sync": {
      "post": {
        "operationId": "run-sync-coiled_magistrate-google-flights-fast",
        "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": {
          "origins": {
            "title": "From (airport or city codes)",
            "type": "array",
            "description": "3-letter IATA codes of airports (JFK, LHR, PRG) or cities with all their airports (NYC, LON, PAR). Every origin is combined with every destination.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "To (airport or city codes)",
            "type": "array",
            "description": "3-letter IATA codes of airports or cities, e.g. LHR, CDG, LON, TYO.",
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Departure dates (YYYY-MM-DD)",
            "type": "array",
            "description": "One or more departure dates. Leave empty to search 30 days from today.",
            "items": {
              "type": "string"
            }
          },
          "alsoSearchNextDays": {
            "title": "Also search the next N days",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Flexible dates: for each departure date also search the following N days (find the cheapest day to fly). 0 = only the given dates.",
            "default": 0
          },
          "returnAfterDays": {
            "title": "Round trip: return after N days",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Makes it a round trip returning N days after each departure date. 0 = one-way. Round-trip prices are totals for both directions.",
            "default": 0
          },
          "returnDate": {
            "title": "Round trip: fixed return date (YYYY-MM-DD)",
            "type": "string",
            "description": "Alternative to 'return after N days': the same return date for every search."
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Travel class.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers. Prices are totals for all passengers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2-11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 on an adult's lap.",
            "default": 0
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops.",
            "default": "any"
          },
          "airlines": {
            "title": "Only these airlines (IATA codes)",
            "type": "array",
            "description": "Optional 2-letter airline codes, e.g. BA, LH, DL. Empty = all airlines.",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "3-letter currency code, e.g. USD, EUR, GBP, CZK.",
            "default": "USD"
          },
          "country": {
            "title": "Country (point of sale)",
            "type": "string",
            "description": "2-letter country code Google uses for prices and availability, e.g. us, gb, de.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of airport and airline names, e.g. en, de, fr.",
            "default": "en"
          },
          "sortBy": {
            "title": "Sort flights by",
            "enum": [
              "google",
              "price",
              "duration",
              "departure"
            ],
            "type": "string",
            "description": "Order of flights within each search.",
            "default": "google"
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit the number of flights returned (and charged) per route and date. Use 1 with 'Cheapest first' to get only the cheapest flight.",
            "default": 100
          },
          "includePriceHistory": {
            "title": "Include route price history",
            "type": "boolean",
            "description": "Adds Google's price history of the route (about the last 60 days) to the first flight of each search.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run in parallel.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used automatically only if Google blocks a request.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}