{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper & Price Monitor API 💰$2/1k",
    "description": "Scrape Google Flights itineraries and the cheapest fare per route and date, with exact prices, legs, aircraft, CO2 and a 60-day price history. Monitor mode outputs only fares that changed since the last run. No browser, no login.",
    "version": "0.1",
    "x-build-id": "QnQBSq5GA8joe2L2T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/programmx~google-flights-fare-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-programmx-google-flights-fare-feed",
        "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/programmx~google-flights-fare-feed/runs": {
      "post": {
        "operationId": "runs-sync-programmx-google-flights-fare-feed",
        "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/programmx~google-flights-fare-feed/run-sync": {
      "post": {
        "operationId": "run-sync-programmx-google-flights-fare-feed",
        "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": {
          "origins": {
            "title": "Origins (IATA codes)",
            "type": "array",
            "description": "Airport IATA codes (JFK) or a Google city id (/m/02_286 = New York, all airports in one search). Every origin is paired with every destination. Ignored when 'Routes' is filled.",
            "default": [
              "JFK"
            ],
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "Destinations (IATA codes)",
            "type": "array",
            "description": "Airport IATA codes (LHR) or a Google city id. Every origin is paired with every destination.",
            "default": [
              "LHR"
            ],
            "items": {
              "type": "string"
            }
          },
          "routes": {
            "title": "Routes (alternative to origins x destinations)",
            "type": "array",
            "description": "Explicit origin-destination pairs such as DXB-LHR or SFO>NRT. When set, origins and destinations are ignored.",
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Departure dates (YYYY-MM-DD)",
            "type": "array",
            "description": "Explicit dates. Leave empty to use the rolling window below (recommended for daily schedules). Dates up to about 330 days ahead work; past dates are skipped.",
            "items": {
              "type": "string"
            }
          },
          "daysAheadFrom": {
            "title": "Rolling window: first day ahead",
            "minimum": 1,
            "maximum": 330,
            "type": "integer",
            "description": "Used when 'Departure dates' is empty. 1 = tomorrow (UTC).",
            "default": 30
          },
          "daysAheadTo": {
            "title": "Rolling window: last day ahead",
            "minimum": 1,
            "maximum": 330,
            "type": "integer",
            "description": "Used when 'Departure dates' is empty. Inclusive. One search per route per date.",
            "default": 32
          },
          "everyNDays": {
            "title": "Rolling window: step (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "1 = every day in the window, 7 = one date per week.",
            "default": 1
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "one-way",
              "round-trip"
            ],
            "type": "string",
            "description": "One-way, or round-trip (returns the outbound options priced as a round trip; return legs are not included).",
            "default": "one-way"
          },
          "returnAfterDays": {
            "title": "Round-trip: return after N days",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Round-trip only: return date = departure date + N days. Ignored if 'Return date' is set.",
            "default": 7
          },
          "returnDate": {
            "title": "Round-trip: fixed return date (YYYY-MM-DD)",
            "type": "string",
            "description": "Round-trip only: a fixed return date for every search. Leave empty to use 'return after N days'."
          },
          "cabin": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class searched on Google Flights.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Prices are totals for all passengers (2 adults = about 2x).",
            "default": 1
          },
          "maxStops": {
            "title": "Max stops (filter)",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Keep only itineraries with at most this many stops. Empty = any."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO 4217 code passed to Google in the URL (USD, EUR, GBP, MXN, ZAR verified), so the proxy exit country does not change the currency.",
            "default": "USD"
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Google interface language for airport and airline names (en, de, fr, ...).",
            "default": "en"
          },
          "country": {
            "title": "Country (gl)",
            "type": "string",
            "description": "Google country parameter, forced in the URL so results do not depend on the proxy exit country.",
            "default": "US"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "itineraries",
              "cheapest"
            ],
            "type": "string",
            "description": "Itineraries: one row per flight option (billed per itinerary). Cheapest: one fare-snapshot row per route-date (billed per snapshot).",
            "default": "itineraries"
          },
          "includeSummaryRow": {
            "title": "Add a route-date summary row (itineraries mode)",
            "type": "boolean",
            "description": "Also output one 'fare-snapshot' row per route-date: cheapest fare, Google's typical price range and about 62 days of daily price history. Billed as a fare-snapshot event.",
            "default": true
          },
          "maxItinerariesPerSearch": {
            "title": "Max itineraries per route-date",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Google returns about 20-30 itineraries per search (best first). Keep the first N.",
            "default": 15
          },
          "onlyNew": {
            "title": "Monitoring: only new or re-priced itineraries",
            "type": "boolean",
            "description": "Remember every itinerary's last price per route-date in the named key-value store 'google-flights-fare-feed-state' and output only flights that are new or whose price changed by at least 'Minimum price change'.",
            "default": false
          },
          "onlyChanged": {
            "title": "Monitoring: skip route-dates whose cheapest fare did not change",
            "type": "boolean",
            "description": "Skip a route-date entirely (no rows, no charge) when its cheapest fare equals the one seen on the previous run.",
            "default": false
          },
          "minPriceChangePct": {
            "title": "Minimum price change to report (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "With 'only new or re-priced', ignore price changes smaller than this. 0 reports any change.",
            "default": 0
          },
          "maxSearches": {
            "title": "Max route-date searches per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on searches (routes x dates). Each search is one request of about 20-90 KB.",
            "default": 20
          },
          "maxItems": {
            "title": "Max rows per run",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on dataset rows (and charges) per run.",
            "default": 50
          },
          "ssrFallback": {
            "title": "Fall back to the full Google Flights page",
            "type": "boolean",
            "description": "If the fast RPC call fails after retries, load the search page instead (about 12x the bytes). Same data.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Google Flights answered without a proxy in our tests. If Apify Proxy is not selected, the actor uses Decodo credentials from secret env vars when present, otherwise it connects directly.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}