{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & Fare Monitor · $1/1K",
    "description": "From $1 per 1,000 flights. Google Flights fares for any route and date, a fare calendar with Google's low/typical/high price level, and Explore: the cheapest destinations from any airport, with dates. Price-drop alerts between runs.",
    "version": "0.0",
    "x-build-id": "iBv0oSEZPoBr13Ug8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xpandalabs~google-flights-fare-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xpandalabs-google-flights-fare-monitor",
        "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/xpandalabs~google-flights-fare-monitor/runs": {
      "post": {
        "operationId": "runs-sync-xpandalabs-google-flights-fare-monitor",
        "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/xpandalabs~google-flights-fare-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-xpandalabs-google-flights-fare-monitor",
        "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": {
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line. Airport codes (<code>JFK-LAX</code>), city codes for every airport in a city (<code>NYC-LON</code>, <code>TYO-SEL</code>), major city names (<code>New York to London</code>, <code>上海到东京</code>) or a Google Flights link. Each route is searched for every departure date below.",
            "items": {
              "type": "string"
            }
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one_way",
              "round_trip"
            ],
            "type": "string",
            "description": "Round trip prices are the total for the return trip; flight details are the outbound flights Google lists for it.",
            "default": "one_way"
          },
          "outputMode": {
            "title": "What to return",
            "enum": [
              "flights",
              "cheapest"
            ],
            "type": "string",
            "description": "<b>Every flight</b>: airline, flight numbers, times, duration, stops, layovers, aircraft, CO₂ and price.<br><b>Fare calendar</b>: the cheapest fare per route and departure date, whether Google rates it low, typical or high, the typical price range and the 60-day price history. Best for price alerts and finding the cheapest day.",
            "default": "flights"
          },
          "exploreFrom": {
            "title": "Explore from (cheapest destinations)",
            "type": "array",
            "description": "Airports or cities to fly from, one per line: <code>JFK</code>, <code>LON</code> (every London airport), <code>London</code>, <code>上海</code>. Returns one row per destination with its cheapest fare, cheapest first ($1 per 1,000 destinations). Uses the dates, trip type, passengers, cabin, stops and currency set below. When this is filled, Routes are not searched.",
            "items": {
              "type": "string"
            }
          },
          "exploreTo": {
            "title": "Destinations in",
            "type": "array",
            "description": "Which parts of the world to search. Anywhere covers all of them (several hundred destinations).",
            "items": {
              "type": "string",
              "enum": [
                "anywhere",
                "north_america",
                "south_america",
                "europe",
                "africa_middle_east",
                "asia",
                "oceania"
              ],
              "enumTitles": [
                "Anywhere",
                "North America",
                "Central & South America",
                "Europe",
                "Africa & Middle East",
                "Asia",
                "Oceania"
              ]
            },
            "default": [
              "anywhere"
            ]
          },
          "flexibleDates": {
            "title": "Flexible dates (cheapest time to go)",
            "type": "boolean",
            "description": "Let Google pick each destination's cheapest dates in the coming months (round trips of about a week). The departure and return dates are then ignored.",
            "default": false
          },
          "maxDestinations": {
            "title": "Max destinations per origin",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Keep the cheapest N destinations for each origin and date.",
            "default": 100
          },
          "departDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty and use <b>Days ahead</b> so a scheduled run always checks a future date."
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "When no departure date is set: depart this many days after the run date.",
            "default": 14
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "YYYY-MM-DD. Setting a return date makes the search a round trip. With several departure dates the trip length stays the same."
          },
          "tripLengthDays": {
            "title": "Trip length (days)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Round trip only, when no return date is set.",
            "default": 7
          },
          "datesToCheck": {
            "title": "Departure dates to check",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Check this many departure dates in one run, starting from the departure date. 30 gives a month-long fare calendar.",
            "default": 1
          },
          "dateStepDays": {
            "title": "Days between dates",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "1 = every day, 7 = the same weekday each week.",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Prices are the total for all passengers. Infants are not supported yet.",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Passengers aged 2-11.",
            "default": 0
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class for every flight.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Most stops allowed on each one-way journey.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Only these airlines: 2-letter codes (DL, UA, BA, SQ) or common names (Delta, Cathay Pacific). Empty = all airlines.",
            "items": {
              "type": "string"
            }
          },
          "maxFlightsPerSearch": {
            "title": "Max flights per search",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Every flight mode: keep the first N flights of each search after sorting. 0 = all (usually 10-60).",
            "default": 0
          },
          "sortBy": {
            "title": "Sort flights by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure"
            ],
            "type": "string",
            "description": "Order of the flights within each search.",
            "default": "best"
          },
          "region": {
            "title": "Region preset",
            "enum": [
              "US",
              "CA",
              "GB",
              "EU",
              "AU",
              "NZ",
              "JP",
              "SG",
              "HK",
              "TH",
              "CN",
              "IN",
              "AE",
              "KR",
              "MY"
            ],
            "type": "string",
            "description": "Sets currency and Google market in one go. Default: United States (USD)."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO code (USD, EUR, GBP, CNY...). Overrides the region preset."
          },
          "country": {
            "title": "Google country",
            "type": "string",
            "description": "2-letter Google market code (us, gb, de...). Overrides the region preset."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google interface language, e.g. en. Airport and airline names follow it."
          },
          "targetPrice": {
            "title": "Target price (alert)",
            "minimum": 0,
            "type": "integer",
            "description": "Rows at or below this total price get <code>belowTargetPrice: true</code>. Combine with a schedule and an email or Slack integration for fare alerts."
          },
          "trackChanges": {
            "title": "Track price changes",
            "type": "boolean",
            "description": "Compare with the previous run: <code>changeType</code> up / down / new / unavailable / available, previous price, % change and the lowest price seen.",
            "default": true
          },
          "onlyChanges": {
            "title": "Only return changes",
            "type": "boolean",
            "description": "Return only rows whose price moved (or that hit your target price). Unchanged rows are not saved and not charged. The first run returns everything as a baseline.",
            "default": false
          },
          "changeThresholdPct": {
            "title": "Change threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Price moves smaller than this % count as unchanged.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 4
          },
          "maxRetries": {
            "title": "Retries per search",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Extra tries when a search fails.",
            "default": 3
          },
          "residentialFallback": {
            "title": "Residential proxy fallback",
            "type": "boolean",
            "description": "Retry a search through residential proxies if datacenter proxies keep failing.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) works for Google Flights; keep the default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}