{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Fares, Routes, Booking Links",
    "description": "Scrape Google Flights for one-way and round-trip itineraries. Prices, airlines, stops, layovers, aircraft, carbon emissions, and direct booking deeplinks. MCP-ready.",
    "version": "0.7",
    "x-build-id": "eoywbHf839N8A94mS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~google-flights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~google-flights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~google-flights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": [
          "origin",
          "destination",
          "departureDate"
        ],
        "properties": {
          "origin": {
            "title": "Origin Airport (IATA)",
            "pattern": "^[A-Z]{3}$",
            "type": "string",
            "description": "3-letter IATA airport code for departure (e.g., 'LAX', 'JFK', 'LHR'). Required. Use ALL CAPS. NOT a city name — for Tokyo, use 'HND' or 'NRT' explicitly; for London, use 'LHR'."
          },
          "destination": {
            "title": "Destination Airport (IATA)",
            "pattern": "^[A-Z]{3}$",
            "type": "string",
            "description": "3-letter IATA airport code for arrival (e.g., 'JFK', 'CDG', 'HND'). Required. Use ALL CAPS. NOT a city name. For multi-airport cities, pick the specific airport you want results for."
          },
          "departureDate": {
            "title": "Departure Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Outbound departure date in YYYY-MM-DD format (e.g., '2026-08-15'). Required. Must be a future date; past dates return empty results. NOT a time or datetime — date only."
          },
          "returnDate": {
            "title": "Return Date (optional)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Return date in YYYY-MM-DD format for round-trip searches. Leave empty for one-way. Must be on or after departureDate. NOT used for multi-city — multi-city support is on the v0.2 roadmap."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers (age 12+). Default: 1. Min 1, max 9. Most airlines cap total passengers per booking at 9.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of child passengers (age 2-11). Default: 0. Max 8. Children require an adult companion on most carriers.",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of infants (under 2) with their own seat. Default: 0. Max 8. NOT 'lap infants' — those go in the infantsOnLap field.",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of lap-held infants (under 2, no seat). Default: 0. Max equals number of adults — one lap infant per adult. NOT 'infants with their own seat' — those go in infantsInSeat.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin Class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class to search. Default 'economy'. Premium economy and business are not available on every route. NOT a price filter — for max-price use 'maxPrice' field.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Max Stops",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Filter by maximum number of stops. 0=nonstop only, 1=up to one stop, 2=up to two stops. Leave empty for no limit. Applied to each leg of round-trips."
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "JPY",
              "CHF",
              "CNY",
              "INR",
              "MXN",
              "BRL",
              "ZAR",
              "AED",
              "SAR",
              "SGD",
              "HKD",
              "KRW",
              "THB",
              "PHP",
              "IDR",
              "MYR",
              "TRY",
              "RUB",
              "PLN",
              "SEK",
              "NOK",
              "DKK",
              "CZK",
              "HUF",
              "RON",
              "NZD",
              "ILS"
            ],
            "type": "string",
            "description": "ISO 4217 currency code for prices (e.g., 'USD', 'EUR', 'GBP', 'JPY'). Default 'USD'. Google Flights converts at its own rate. NOT the country of search — that is the 'country' field.",
            "default": "USD"
          },
          "country": {
            "title": "Country (search market)",
            "enum": [
              "us",
              "uk",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "br",
              "mx",
              "jp",
              "kr",
              "in",
              "sg",
              "ae",
              "za",
              "ch",
              "se",
              "no",
              "dk",
              "pl",
              "tr",
              "id",
              "ph",
              "th",
              "my",
              "vn",
              "nz",
              "ie",
              "be",
              "at"
            ],
            "type": "string",
            "description": "Two-letter ISO country code for Google's search market (e.g., 'us', 'uk', 'de', 'jp'). Default 'us'. Affects which airlines/OTAs appear in booking links. NOT the currency — for currency use 'currency'.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "hi",
              "tr",
              "pl",
              "nl",
              "sv",
              "da",
              "no",
              "fi",
              "cs",
              "hu",
              "ro",
              "el",
              "th",
              "vi",
              "id",
              "ms",
              "he",
              "uk"
            ],
            "type": "string",
            "description": "Two-letter ISO 639-1 language code for response (e.g., 'en', 'es', 'fr', 'de', 'ja'). Default 'en'. Affects airline/airport name strings only — prices and codes are unchanged.",
            "default": "en"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of flight itineraries to return per run. Default 50, max 200. Lower numbers run faster and cost less (PPE is .005 per flight).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}