{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper: Fares, Flight Numbers and Layovers",
    "description": "Scrape Google Flights by route and date: one row per itinerary with price, airlines, flight numbers, departure and arrival times, stops, layovers, aircraft, CO2 and a booking link. One way or round trip, many routes per run. No login.",
    "version": "0.1",
    "x-build-id": "WMsGqc0e5QjrU0bdm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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",
        "properties": {
          "origin": {
            "title": "From (airport or city code)",
            "type": "string",
            "description": "IATA code of the departure airport, for example JFK, LHR or BOM, or a city code that groups several airports, for example NYC, LON or TYO."
          },
          "destination": {
            "title": "To (airport or city code)",
            "type": "string",
            "description": "IATA code of the arrival airport or city, for example LAX, CDG, DEL or PAR."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD, for example 2026-12-15, or a date relative to the day of the run: \"+30 days\", \"+7\", \"tomorrow\". Relative dates keep a scheduled run searching the same distance ahead. Google Flights sells up to about 330 days ahead."
          },
          "returnDate": {
            "title": "Return date (empty for one way)",
            "type": "string",
            "description": "Fill it for a round trip, same formats as the departure date (\"2026-12-22\" or \"+37 days\"). Round trip rows are the outbound flights, each with the total price for both directions, as Google shows them."
          },
          "routes": {
            "title": "More routes or dates (batch)",
            "type": "array",
            "description": "Several searches in one run, each an object with origin, destination, departureDate and optional returnDate, for example [{\"origin\": \"JFK\", \"destination\": \"LHR\", \"departureDate\": \"2026-12-20\", \"returnDate\": \"2026-12-28\"}, {\"origin\": \"BOM\", \"destination\": \"DXB\", \"departureDate\": \"+14 days\"}]. Passengers, cabin, stops and the other settings below apply to every route. Up to 500 searches per run."
          },
          "startUrls": {
            "title": "Google Flights links (optional)",
            "type": "array",
            "description": "Search links copied from your browser after a search on google.com/travel/flights, the ones with tfs= in them, for example https://www.google.com/travel/flights/search?tfs=CBwQAhoeEgoyMDI2LTEyLTE1agcIARIDSkZLcgcIARIDTEFYQAFIAZgBAg. The route, dates, passengers and cabin are read from the link.",
            "items": {
              "type": "string"
            }
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Passengers aged 12 or over. Prices are the total for all passengers.",
            "default": 1
          },
          "children": {
            "title": "Children (2 to 11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in their own seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 with their own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under 2 on an adult's lap (at most one per adult).",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Seat class to search.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Most stops per direction. Google applies it on its side, so the search itself returns only those flights.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines (optional)",
            "type": "array",
            "description": "Two letter airline codes to keep, for example DL, AA, BA. Google applies it on its side. Alliances work too: STAR_ALLIANCE, ONEWORLD, SKYTEAM. Empty means every airline.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure",
              "arrival"
            ],
            "type": "string",
            "description": "Order of the rows. Best is Google's own ranking (its \"Top flights\" first, marked is_best).",
            "default": "best"
          },
          "maxResults": {
            "title": "Max itineraries per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "The most itineraries to return for each route and date, 1 to 500. A busy route has 100 to 300.",
            "default": 100
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three letter currency code for the prices, for example USD, EUR, GBP, INR. Google converts the prices.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for airline and airport names, for example en, de, fr, es, hi.",
            "default": "en"
          },
          "market": {
            "title": "Country (point of sale)",
            "type": "string",
            "description": "Two letter country code of the shopper, for example US, GB, IN, DE. Fares and sellers can differ by country.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is on by default (datacenter IPs, included in the price). If Google stops answering from datacenter IPs, the actor tries a few residential IPs by itself before it gives up on a search. You can pick another group here.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}