{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & Price Monitor",
    "description": "Collect Google Flights fares for travel apps and recurring price comparisons. Get paired round-trip totals, flight segments, booking links, and stable itinerary IDs. Batch up to 100 searches and export JSON or CSV. Schedule runs through Apify and compare saved results.",
    "version": "0.1",
    "x-build-id": "5tmZqmwiSDQXsfgOX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vincesoft~google-flights-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vincesoft-google-flights-price-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/vincesoft~google-flights-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-vincesoft-google-flights-price-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/vincesoft~google-flights-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-vincesoft-google-flights-price-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": {
          "origin": {
            "title": "Origin airport",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter departure airport IATA code, such as JFK."
          },
          "destination": {
            "title": "Destination airport",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter arrival airport IATA code, such as LHR."
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Future outbound date in YYYY-MM-DD. For a single search, omission selects 30 days after the run date (UTC)."
          },
          "returnDate": {
            "title": "Return date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional return date for a paired round trip. Omit for a one-way search."
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Requested ISO 4217 currency. Each returned fare must independently match it.",
            "default": "USD"
          },
          "country": {
            "title": "Country edition",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Google country edition (gl), not a guarantee of proxy IP or point of sale.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google interface language, such as en or en-GB.",
            "default": "en"
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Requested seating class.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers. All passenger types combined are limited to nine.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2–11. Google may inline fewer priced results for children.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in a seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants under two in their own seat. Coverage may be reduced.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Lap infants",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Infants on an adult lap; cannot exceed the adult count.",
            "default": 0
          },
          "maxStops": {
            "title": "Maximum stops",
            "minimum": -1,
            "maximum": 2,
            "type": "integer",
            "description": "-1 means unrestricted, 0 nonstop, 1 up to one stop, 2 up to two stops, each direction.",
            "default": -1
          },
          "airlines": {
            "title": "Airlines",
            "maxItems": 30,
            "type": "array",
            "description": "Optional included airline codes. Sent to Google; codeshares may involve other operators.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9]{2}$"
            },
            "default": []
          },
          "maxPrice": {
            "title": "Maximum total fare",
            "minimum": 0.01,
            "type": "number",
            "description": "Optional maximum total fare for the entire passenger party, in the requested currency."
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "price",
              "duration",
              "departure",
              "google"
            ],
            "type": "string",
            "description": "Ordering applied to the observed options. Google preserves its source grouping.",
            "default": "price"
          },
          "searches": {
            "title": "Batch searches",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Use a batch OR the single route/date fields above. Each entry can override global search defaults.",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "title": "Origin airport",
                  "type": "string",
                  "description": "Three-letter departure airport IATA code, such as JFK.",
                  "pattern": "^[A-Za-z]{3}$"
                },
                "destination": {
                  "title": "Destination airport",
                  "type": "string",
                  "description": "Three-letter arrival airport IATA code, such as LHR.",
                  "pattern": "^[A-Za-z]{3}$"
                },
                "departureDate": {
                  "title": "Departure date",
                  "type": "string",
                  "description": "Required future outbound date in YYYY-MM-DD for each batch search.",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "returnDate": {
                  "title": "Return date",
                  "type": "string",
                  "description": "Optional return date for a paired round trip. Omit for a one-way search.",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "currency": {
                  "title": "Currency",
                  "type": "string",
                  "description": "Requested ISO 4217 currency. Each returned fare must independently match it.",
                  "pattern": "^[A-Za-z]{3}$"
                },
                "country": {
                  "title": "Country edition",
                  "type": "string",
                  "description": "Google country edition (gl), not a guarantee of proxy IP or point of sale.",
                  "pattern": "^[A-Za-z]{2}$"
                },
                "language": {
                  "title": "Language",
                  "type": "string",
                  "description": "Google interface language, such as en or en-GB."
                },
                "cabin": {
                  "title": "Cabin",
                  "type": "string",
                  "description": "Requested seating class.",
                  "enum": [
                    "economy",
                    "premium-economy",
                    "business",
                    "first"
                  ]
                },
                "adults": {
                  "title": "Adults",
                  "type": "integer",
                  "description": "Adult passengers. All passenger types combined are limited to nine.",
                  "minimum": 1,
                  "maximum": 9
                },
                "children": {
                  "title": "Children",
                  "type": "integer",
                  "description": "Children aged 2–11. Google may inline fewer priced results for children.",
                  "minimum": 0,
                  "maximum": 8
                },
                "infantsInSeat": {
                  "title": "Infants in a seat",
                  "type": "integer",
                  "description": "Infants under two in their own seat. Coverage may be reduced.",
                  "minimum": 0,
                  "maximum": 8
                },
                "infantsOnLap": {
                  "title": "Lap infants",
                  "type": "integer",
                  "description": "Infants on an adult lap; cannot exceed the adult count.",
                  "minimum": 0,
                  "maximum": 8
                },
                "maxStops": {
                  "title": "Maximum stops",
                  "type": "integer",
                  "description": "-1 means unrestricted, 0 nonstop, 1 up to one stop, 2 up to two stops, each direction.",
                  "minimum": -1,
                  "maximum": 2
                },
                "airlines": {
                  "title": "Airlines",
                  "type": "array",
                  "description": "Optional included airline codes. Sent to Google; codeshares may involve other operators.",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{2}$"
                  },
                  "maxItems": 30
                },
                "maxPrice": {
                  "title": "Maximum total fare",
                  "type": "number",
                  "description": "Optional maximum total fare for the entire passenger party, in the requested currency.",
                  "minimum": 0.01
                },
                "sortBy": {
                  "title": "Sort results",
                  "type": "string",
                  "description": "Ordering applied to the observed options. Google preserves its source grouping.",
                  "enum": [
                    "price",
                    "duration",
                    "departure",
                    "google"
                  ]
                },
                "label": {
                  "title": "Label",
                  "type": "string",
                  "description": "Optional name identifying this search in output.",
                  "maxLength": 200
                }
              },
              "required": [
                "origin",
                "destination",
                "departureDate"
              ],
              "additionalProperties": false
            }
          },
          "maxResultsPerSearch": {
            "title": "Maximum options per search",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum dataset rows saved for each search.",
            "default": 50
          },
          "maxOutboundOptions": {
            "title": "Round-trip outbound options",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Expand this many outbound choices into real return options. A round trip costs 1 + this many successful page requests, before retries.",
            "default": 3
          },
          "maxRequestsPerRun": {
            "title": "Maximum upstream requests",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on all Google requests, including retries and return expansion.",
            "default": 100
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Additional attempts after an unsuccessful Google request.",
            "default": 2
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum seconds per Google request.",
            "default": 30
          },
          "minRequestIntervalMillis": {
            "title": "Minimum request interval",
            "minimum": 250,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum milliseconds between starting Google requests across the entire run.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Concurrent searches",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum concurrent independent searches. Request interval and total request cap still apply.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify or custom proxies. Disabled by default; enabling Apify proxies may add platform costs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}