{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper 💰$0.52/1k",
    "description": "💰 from $0.52/1k — Scrape Google Flights: fares, routes, layovers, airlines, CO₂. One structured row per itinerary (JSON/CSV). Track price changes across runs, expand to nearby airports & flexible dates, resolve per-seller booking options. API + MCP for AI agents.",
    "version": "0.1",
    "x-build-id": "knKIZZ5Mstq39zx1T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-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/blackfalcondata~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-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/blackfalcondata~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-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": "✈️ Origin",
            "type": "string",
            "description": "Origin airport IATA code (e.g., JFK, LAX, LHR)"
          },
          "destination": {
            "title": "Destination",
            "type": "string",
            "description": "Destination airport IATA code (e.g., LAX, ORD, CDG)"
          },
          "outboundDate": {
            "title": "Outbound Date",
            "type": "string",
            "description": "Departure date (YYYY-MM-DD format). Leave empty to search 30 days from today. With incremental tracking on, that date is kept for later runs until it has passed, so every run watches the same flight date."
          },
          "returnDate": {
            "title": "Return Date",
            "type": "string",
            "description": "Return date for round-trip flights (YYYY-MM-DD format). Leave empty for one-way."
          },
          "tripType": {
            "title": "Trip Type",
            "enum": [
              "one-way",
              "round-trip",
              "multi-city"
            ],
            "type": "string",
            "description": "Type of trip. Leave unselected and the actor infers it: round-trip when a returnDate is set, one-way otherwise."
          },
          "maxItems": {
            "title": "⚙️ Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of results to return. Leave empty for unlimited."
          },
          "startUrls": {
            "title": "🔗 Paste Google Flights URLs",
            "type": "array",
            "description": "Paste one or more Google Flights links (a search URL or a results URL with a tfs parameter). Each is fetched as-is and its itineraries are returned — origin, destination, and date are not required when you use this. Accepts a list of URL strings.",
            "items": {
              "type": "string"
            }
          },
          "tripLengthDays": {
            "title": "Trip length (days)",
            "minimum": 0,
            "maximum": 330,
            "type": "integer",
            "description": "Round trips without fixed dates: when set and Return Date is empty, the return date is the departure date plus this many days (e.g. 7 for a one-week trip). Ignored when Return Date is set or Trip Type is one-way."
          },
          "adults": {
            "title": "👤 Adults",
            "minimum": 1,
            "type": "integer",
            "description": "Number of adult passengers",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "type": "integer",
            "description": "Number of child passengers",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin Class",
            "enum": [
              "economy",
              "premium-economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Preferred cabin class",
            "default": "economy"
          },
          "currency": {
            "title": "🌎 Currency",
            "type": "string",
            "description": "Currency code for prices",
            "default": "USD"
          },
          "language": {
            "title": "🌐 Language",
            "type": "string",
            "description": "Language code (e.g., en, de, fr)",
            "default": "en"
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude empty fields from output",
            "type": "boolean",
            "description": "Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.",
            "default": false
          },
          "compareMarkets": {
            "title": "💱 Compare markets (opt-in)",
            "type": "array",
            "description": "Re-query each itinerary in these markets and attach a point-of-sale price comparison. Billed per extra market. INDICATIVE ONLY — see README; this actor reports prices only and books nothing."
          },
          "detectThroughFares": {
            "title": "🔎 Through-fare data flag (opt-in)",
            "type": "boolean",
            "description": "For connecting itineraries, look up the direct fare to the connection point and attach a NEUTRAL comparison flag. INFORMATIONAL ONLY — see README; no booking advice, books/sells nothing, no airline branding.",
            "default": false
          },
          "resolveBookingOptions": {
            "title": "🛒 Booking options (opt-in)",
            "type": "boolean",
            "description": "For each itinerary, resolve the per-seller booking options (airline + travel agencies) with their prices, fare names, and a booking link. Billed per itinerary resolved. INFORMATIONAL ONLY — see README; prices are indicative, this actor books/sells nothing and uses no airline or agency branding.",
            "default": false
          },
          "incremental": {
            "title": "🔁 Incremental tracking",
            "type": "boolean",
            "description": "Track NEW / UPDATED / EXPIRED itineraries across runs (price-drop detection)."
          },
          "emitUnchanged": {
            "title": "♻️ Emit unchanged",
            "type": "boolean",
            "description": "Also output itineraries whose tracked fields did not change since the last run.",
            "default": false
          },
          "stateKey": {
            "title": "🗝️ Tracking namespace",
            "type": "string",
            "description": "Optional. Pin a name to share one incremental tracking history across runs. Leave empty and each distinct search keeps its own isolated history automatically."
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify Only New/Updated",
            "type": "boolean",
            "description": "When Incremental tracking is on, only notify for NEW and UPDATED itineraries.",
            "default": false
          },
          "notificationLimit": {
            "title": "📊 Max Items Per Notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of itineraries included in each notification message (1–20).",
            "default": 5
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID where alerts are sent."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL."
          },
          "whatsappPhoneNumberId": {
            "title": "📱 WhatsApp Phone Number ID",
            "type": "string",
            "description": "WhatsApp Business phone number ID from Meta Business Manager."
          },
          "whatsappAccessToken": {
            "title": "🔐 WhatsApp Access Token",
            "type": "string",
            "description": "Meta Cloud API access token with whatsapp_business_messaging scope."
          },
          "whatsappTo": {
            "title": "📨 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone number in E.164 format (e.g. +14155551234)."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Universal escape hatch for n8n / Make / Zapier / custom HTTP backends. Receives a JSON POST per run."
          },
          "webhookHeaders": {
            "title": "🪝 Webhook Headers (opt)",
            "type": "object",
            "description": "Additional HTTP headers sent with the generic webhook POST."
          },
          "appConnector": {
            "title": "📤 Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results. A run-summary is written to the connected app; support is best-effort as Apify expands its connector catalog."
          },
          "mcpIssueTeam": {
            "title": "🏷️ Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
          },
          "market": {
            "title": "Market",
            "type": "string",
            "description": "Market code (e.g., us, gb, de)",
            "default": "us"
          },
          "maxQueries": {
            "title": "Max queries",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on total searches after fan-out (radius × dates × batch).",
            "default": 1000
          },
          "maxExtraFetches": {
            "title": "Max add-on fetches",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on opt-in add-on lookups (market compare / through-fare / booking options).",
            "default": 100000
          },
          "searches": {
            "title": "Batch Searches",
            "type": "array",
            "description": "Array of search objects for batch processing"
          },
          "originRadiusKm": {
            "title": "🛫 Origin radius (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Expand the origin to all airports within this many km (0 = origin only)."
          },
          "destRadiusKm": {
            "title": "Destination radius (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Expand the destination to all airports within this many km (0 = destination only)."
          },
          "dateScanDays": {
            "title": "📅 Cheapest-date scan (± days)",
            "minimum": 0,
            "type": "integer",
            "description": "Scan ±N days around the outbound date and return the cheapest itinerary per day (0 = off)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}