{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & Price Tracker - $2/1K Searches",
    "description": "$2 per 1,000 searches, all fares included. Track Google Flights prices: monitor mode returns only fares that are new or changed since the last run, with the previous price. Many routes x dates per run, Google's low/typical/high price level, airlines, flight numbers, stops, layovers, CO2.",
    "version": "0.1",
    "x-build-id": "ysn1BIc2qzUdIUgFE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhyou~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhyou-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/zhyou~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zhyou-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/zhyou~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zhyou-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",
        "required": [
          "routes",
          "departureDates"
        ],
        "properties": {
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "Origin-destination pairs as IATA airport or city codes, one per line, e.g. JFK-LAX or NYC-LON.",
            "default": [
              "JFK-LAX"
            ],
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Departure dates",
            "type": "array",
            "description": "One or more departure dates: YYYY-MM-DD, or +N for N days from the day the Actor runs (e.g. +30; handy for scheduled monitoring). Every route is searched on every date.",
            "default": [
              "+30"
            ],
            "items": {
              "type": "string"
            }
          },
          "additionalDays": {
            "title": "Also search the following days",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Search each departure date plus this many following days, to find the cheapest day. 0 = only the listed dates.",
            "default": 0
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one-way",
              "round-trip"
            ],
            "type": "string",
            "description": "Round trip lists outbound options priced as a round trip (Google's first results page). To also get return flights, set Return flights for.",
            "default": "one-way"
          },
          "returnAfterDays": {
            "title": "Return after (days)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Round trip only: return date = departure date + this many days.",
            "default": 7
          },
          "returnFlightsFor": {
            "title": "Return flights for the first N outbound options",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "For round trips, also fetch the return flights for the first N outbound itineraries (Google's order). Each costs one extra search. Ignored for one-way.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to search.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers (12+). Up to 9 passengers in total.",
            "default": 1
          },
          "children": {
            "title": "Children (2-11)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of children aged 2-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 sitting on an adult's lap.",
            "default": 0
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops per direction.",
            "default": "any"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Optional. Only show these airlines (2-letter IATA codes, e.g. AA, DL) or alliances (ONEWORLD, SKYTEAM, STAR_ALLIANCE).",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code, e.g. USD, EUR, GBP.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google language code, e.g. en-US, de, es.",
            "default": "en-US"
          },
          "country": {
            "title": "Point of sale country",
            "type": "string",
            "description": "Optional 2-letter country code (Google's gl parameter). Fares can differ by country."
          },
          "maxItinerariesPerSearch": {
            "title": "Max itineraries per search",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all itineraries Google shows (usually 10-100).",
            "default": 0
          },
          "monitorMode": {
            "title": "Monitor mode: only new or changed fares",
            "type": "boolean",
            "description": "Remembers fares between runs (per monitor key). Schedule the Actor and get only itineraries that are new or whose price changed, with previousPrice.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name of the watch list. Use different keys for independent schedules.",
            "default": "default"
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Add Google's ~60-day lowest-price history for the route and date to every row.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run in parallel. Lower it if you see many failed searches.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy datacenter IPs in the US work well. Switch to residential only if you see many failures.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}