{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper – Batch Route Prices to CSV",
    "description": "Search multiple Google Flights routes in one run and export results to CSV. Get flight prices, airlines, flight numbers, departure and arrival times, stops, layovers, duration and CO2 estimates. Supports one-way and round-trip searches. Uses plain HTTP.",
    "version": "0.2",
    "x-build-id": "aibe3hTfboib8sin3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kilo_metric~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kilo_metric-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/kilo_metric~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kilo_metric-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/kilo_metric~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kilo_metric-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",
            "pattern": "^$|^\\s*[A-Za-z]{3}\\s*$",
            "type": "string",
            "description": "Departure airport as a 3-letter IATA code, e.g. `LHR` or `JFK`. City names and city codes such as `LON` are not supported yet. Ignored when **Routes** is filled in."
          },
          "destination": {
            "title": "To",
            "pattern": "^$|^\\s*[A-Za-z]{3}\\s*$",
            "type": "string",
            "description": "Arrival airport as a 3-letter IATA code, e.g. `JFK`. Ignored when **Routes** is filled in."
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "A date as `YYYY-MM-DD`, or relative to the day of the run (UTC), e.g. `30 days` or `2 weeks`. Relative dates keep scheduled runs and saved tasks from going stale. Ignored when **Routes** is filled in."
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Leave empty for a one-way search. Same formats as the departure date; relative dates also count from the day of the run, not from the departure date. Ignored when **Routes** is filled in."
          },
          "routes": {
            "title": "Routes (several searches in one run)",
            "type": "array",
            "description": "One search per route. When this list is not empty, the single-route fields above are ignored; the passenger, cabin, stop, currency and result settings below apply to every route. A route with a mistake is skipped and reported in the dataset; the other routes still run.",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "title": "From",
                  "type": "string",
                  "editor": "textfield",
                  "description": "3-letter IATA airport code, e.g. LHR.",
                  "pattern": "^\\s*[A-Za-z]{3}\\s*$",
                  "errorMessage": {
                    "pattern": "Enter a 3-letter IATA airport code such as LHR, JFK or BCN."
                  }
                },
                "destination": {
                  "title": "To",
                  "type": "string",
                  "editor": "textfield",
                  "description": "3-letter IATA airport code, e.g. JFK.",
                  "pattern": "^\\s*[A-Za-z]{3}\\s*$",
                  "errorMessage": {
                    "pattern": "Enter a 3-letter IATA airport code such as LHR, JFK or BCN."
                  }
                },
                "departureDate": {
                  "title": "Departure date",
                  "type": "string",
                  "editor": "datepicker",
                  "dateType": "absoluteOrRelative",
                  "description": "YYYY-MM-DD, or relative to the day of the run, e.g. 30 days.",
                  "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
                  "errorMessage": {
                    "pattern": "Enter a date as YYYY-MM-DD or relative to today, e.g. \"30 days\"."
                  }
                },
                "returnDate": {
                  "title": "Return date",
                  "type": "string",
                  "editor": "datepicker",
                  "dateType": "absoluteOrRelative",
                  "description": "Leave empty for one way.",
                  "nullable": true,
                  "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
                  "errorMessage": {
                    "pattern": "Enter a date as YYYY-MM-DD or relative to today, e.g. \"37 days\"."
                  }
                }
              },
              "required": [
                "origin",
                "destination",
                "departureDate"
              ]
            }
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers. At most 9 passengers per search in total (adults, children and infants).",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Passengers aged 2 to 11.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in 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. Cannot exceed the number of adults.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Travel class to search.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops per direction.",
            "default": "any"
          },
          "currency": {
            "title": "Currency",
            "pattern": "^\\s*[A-Za-z]{3}\\s*$",
            "type": "string",
            "description": "3-letter currency code for the prices, e.g. `USD`, `EUR`, `GBP`.",
            "default": "USD"
          },
          "market": {
            "title": "Market (country of sale)",
            "pattern": "^$|^\\s*[A-Za-z]{2}\\s*$",
            "type": "string",
            "description": "2-letter country code of the point of sale, e.g. `US`, `GB`, `DE`. Prices and the airlines and agencies shown can differ by market. Leave empty to let Google decide."
          },
          "language": {
            "title": "Language",
            "pattern": "^\\s*[a-z]{2,3}(-[A-Za-z]{2,4})?\\s*$",
            "type": "string",
            "description": "Language of airport and airline names, e.g. `en`, `de`, `en-GB`.",
            "default": "en"
          },
          "maxResults": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Upper limit of flights saved per search, applied after sorting. The Google Flights results page lists a limited number of itineraries per search, so you may get fewer.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure"
            ],
            "type": "string",
            "description": "Order of the saved flights. \"Google's order\" keeps Google's ranking: the Top flights first (best trade-off of price and convenience), then the other flights by price.",
            "default": "best"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies for the requests to Google. Default: Apify Proxy, datacenter IP addresses. A search that Google refuses is retried from a new proxy session (a new IP address), up to 3 attempts in total. Apify residential proxies (the RESIDENTIAL group) are not offered in this version; your own proxy URLs work. Without a proxy, a refused search is reported and not retried, and a rate limit, CAPTCHA or consent page stops the remaining routes of the run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}