{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Prices & Schedules",
    "description": "Scrape Google Flights live fares: prices, airlines, flight numbers, times, stops, layovers and CO2. One-way or round-trip with return options, any cabin and currency, plus cheapest-day sweep. No proxies needed.",
    "version": "0.1",
    "x-build-id": "uI9svF5X3lbaZgJku"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/workstream~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-workstream-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/workstream~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-workstream-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/workstream~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-workstream-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 (IATA)",
            "type": "string",
            "description": "3-letter airport code, e.g. JFK, BEY, DXB."
          },
          "destination": {
            "title": "To (IATA)",
            "type": "string",
            "description": "3-letter airport code, e.g. LHR."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. If omitted (and no dates/sweep given), defaults to 30 days from today."
          },
          "returnDate": {
            "title": "Return date (round trip)",
            "type": "string",
            "description": "Leave empty for one-way. With a return date, outbound prices are round-trip totals, and return options are fetched for the top N outbound flights."
          },
          "returnOptionsForTopN": {
            "title": "Return options for top N outbound",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Round trips only: fetch return flights (with combined round-trip price and booking link) for the first N outbound flights in Google's order. 0 = off. Charged as 'return-options' per outbound flight expanded.",
            "default": 3
          },
          "maxReturnOptions": {
            "title": "Max return options per outbound",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on return flights listed under each expanded outbound flight.",
            "default": 20
          },
          "departureDates": {
            "title": "Extra departure dates",
            "type": "array",
            "description": "Optional: search the same route on more dates (YYYY-MM-DD), e.g. to find the cheapest day.",
            "items": {
              "type": "string"
            }
          },
          "sweepStartDate": {
            "title": "Date sweep: from",
            "type": "string",
            "description": "Cheapest-day mode: search every departure date from this date..."
          },
          "sweepEndDate": {
            "title": "Date sweep: to",
            "type": "string",
            "description": "...to this date (max 90 days). Results go to the CHEAPEST_DAYS record."
          },
          "tripLengthDays": {
            "title": "Date sweep: trip length (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Optional: make each swept date a round trip returning after this many days."
          },
          "sweepSummaryOnly": {
            "title": "Date sweep: summary only",
            "type": "boolean",
            "description": "Only produce the cheapest-day summary (charged per search), without pushing every flight to the dataset.",
            "default": false
          },
          "searches": {
            "title": "Multiple searches",
            "type": "array",
            "description": "Optional list of searches, e.g. [{\"origin\":\"BEY\",\"destination\":\"DXB\",\"departureDate\":\"2026-11-20\"}]. Missing fields fall back to the values above."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children (2-11).",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants with own seat.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants on lap.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "ECONOMY",
              "PREMIUM_ECONOMY",
              "BUSINESS",
              "FIRST"
            ],
            "type": "string",
            "description": "Cabin class.",
            "default": "ECONOMY"
          },
          "maxStops": {
            "title": "Max stops",
            "enum": [
              "ANY",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "ANY, 0 (nonstop), 1 or 2.",
            "default": "ANY"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code, e.g. USD, EUR, AED.",
            "default": "USD"
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on flights returned per search.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel searches (keep low to avoid rate limits).",
            "default": 4
          },
          "verifyAgainstPage": {
            "title": "Debug: verify prices against Google page",
            "type": "boolean",
            "description": "Also loads the Google Flights page and compares prices (slower; for testing).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}