{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper",
    "description": "Search Google Flights for fares on one route or dozens in a single run, with flexible dates and scheduled price tracking. Every row carries price, currency, price_tag, booking_url and the full departure and return itineraries. Export JSON, CSV or Excel.",
    "version": "2.1",
    "x-build-id": "DWlB0icSrSRemTWaE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/herus13~flight-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-herus13-flight-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/herus13~flight-search/runs": {
      "post": {
        "operationId": "runs-sync-herus13-flight-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/herus13~flight-search/run-sync": {
      "post": {
        "operationId": "run-sync-herus13-flight-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": {
          "searches": {
            "title": "Bulk searches",
            "type": "array",
            "description": "Several routes in one run, as a JSON array. Each entry is an object with `origin`, `destination` and `departure_date`, and optionally `return_date`, `flex_days` and `max_stops` — for example [{\"origin\": \"SGN\", \"destination\": \"HAN\", \"departure_date\": \"2026-05-15\"}]. When this is set, the single-route fields below are ignored. Leave empty to search the one route those fields describe."
          },
          "origin": {
            "title": "Origin",
            "type": "string",
            "description": "Where the trip starts, as an IATA airport code or a city name — for example `SGN` or `Ho Chi Minh City`. A city name is matched against an airport list, so you do not have to look the code up. Leave empty when you are filling in `searches`, which carries its own origin per route."
          },
          "destination": {
            "title": "Destination",
            "type": "string",
            "description": "Where the trip ends, as an IATA airport code or a city name — for example `HAN` or `Hanoi`. Leave empty when you are filling in `searches`, which carries its own destination per route."
          },
          "departure_date": {
            "title": "Departure date (optional)",
            "type": "string",
            "description": "Outbound date, written as YYYY-MM-DD — for example 2026-05-15. It must be in the future. Leave empty and a date about 30 days from today is used, which is handy for a quick price check on a route."
          },
          "return_date": {
            "title": "Return date (optional)",
            "type": "string",
            "description": "Return date, written as YYYY-MM-DD, on or after the departure date. Leave empty for a one-way search."
          },
          "flex_days": {
            "title": "Flex days (±)",
            "minimum": 0,
            "maximum": 14,
            "type": "integer",
            "description": "Also search this many days on each side of the departure date, from 0 to 14. Default 0, which searches the one date. Setting 3 turns one date into a seven-day window and shows which day is actually cheap; every extra date returns its own results.",
            "default": 0
          },
          "max_stops": {
            "title": "Max stops",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Most stops an itinerary may have, from 0 to 3 — 0 keeps direct flights only. Leave empty to keep itineraries with any number of stops."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "How many adult passengers the trip is priced for, from 1 to 9. Default 1. The price on each row is the one Google Flights quotes for that party.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "How many child passengers to include in the party, from 0 to 9. Default 0.",
            "default": 0
          },
          "cabin": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Which cabin to price: economy, premium for premium economy, business, or first. Default economy. A route with no seats in the cabin you pick returns no results for that route.",
            "default": "economy"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Currency every price is returned in, as an ISO 4217 code. Default USD. Supported: USD, EUR, GBP, INR, JPY, CNY, AUD, CAD, CHF, SGD, HKD, AED, SAR, ZAR, BRL, MXN and other major currencies. An unsupported code stops the run rather than quietly returning US dollars.",
            "default": "USD"
          },
          "max_price": {
            "title": "Max price",
            "type": "number",
            "description": "Drop any itinerary priced above this, in the currency you chose — for example 200. Leave empty to keep every price. Combined with flex days it turns a route search into a deal hunt."
          },
          "max_results_per_search": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Most itineraries to keep per route, from 1 to 200. Default 50. The cap applies to each route separately, so ten routes at 50 is up to 500 rows. You pay per row returned, so this is the ceiling on what a run costs.",
            "default": 50
          },
          "track_history": {
            "title": "Track price history",
            "type": "boolean",
            "description": "Turn a scheduled run into price monitoring: each run keeps the fares it found and compares them with the run before, adding previous_price, price_change, pct_change and alert to every row. Default false. Pair it with a daily schedule and `alert_threshold_pct`.",
            "default": false
          },
          "alert_threshold_pct": {
            "title": "Alert threshold (%)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How far a fare must fall, as a percentage, before its row is flagged with an alert, from 1 to 90. Default 10, so a drop of a tenth raises one. It does nothing unless `track_history` is true.",
            "default": 10
          },
          "tracking_key": {
            "title": "Tracking key (optional)",
            "type": "string",
            "description": "Name for the price history this run writes to. Leave empty and a name is derived from the route and dates, which is what you want unless you run two schedules over the same route and need their histories kept apart. It does nothing unless `track_history` is true."
          },
          "request_delay": {
            "title": "Request Delay (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Extra seconds to wait between requests, 0 or more. Default 0, which adds no wait at all. Raise it to be gentler on a long bulk run.",
            "default": 0
          },
          "proxyUrls": {
            "title": "Your own proxy URLs (optional)",
            "type": "array",
            "description": "Leave empty and the run uses the residential proxy this actor ships with, included in the price of the run. To route the run through your own account instead, add one gateway URL per entry, for example http://user:pass@host:port — works with DataImpulse, Bright Data, Oxylabs, Smartproxy or any provider that issues URLs. When set, only these URLs are used.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}