{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights Scraper — Global Flight Prices API",
    "description": "Scrape Google Flights worldwide with a fast HTTP-based API. Extract airfare prices, schedules, one-way and round-trip itineraries across multiple markets and currencies.",
    "version": "1.6",
    "x-build-id": "9pHYfIi3lM6G8l7KD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aiconsulting~google-flights-scraper-v2/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aiconsulting-google-flights-scraper-v2",
        "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/aiconsulting~google-flights-scraper-v2/runs": {
      "post": {
        "operationId": "runs-sync-aiconsulting-google-flights-scraper-v2",
        "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/aiconsulting~google-flights-scraper-v2/run-sync": {
      "post": {
        "operationId": "run-sync-aiconsulting-google-flights-scraper-v2",
        "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",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter IATA airport code. Examples: DEL, JFK, LHR, CDG, HND, SYD.",
            "default": "DEL"
          },
          "destination": {
            "title": "Destination airport",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter destination IATA airport code.",
            "default": "BOM"
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "ONE_WAY",
              "ROUND_TRIP"
            ],
            "type": "string",
            "description": "ONE_WAY or ROUND_TRIP. A return date is required for round trips.",
            "default": "ONE_WAY"
          },
          "departureDate": {
            "title": "Departure date",
            "pattern": "^(AUTO|\\d{4}-\\d{2}-\\d{2})$",
            "type": "string",
            "description": "Enter AUTO for 30 calendar days ahead using the Asia/Kolkata timezone, or provide YYYY-MM-DD. Explicit dates are not changed.",
            "default": "AUTO"
          },
          "returnDate": {
            "title": "Return date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Required for ROUND_TRIP. Must be an explicit YYYY-MM-DD date later than the departure date. Omit for ONE_WAY."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult travelers. At least one adult is required.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of children traveling.",
            "default": 0
          },
          "infantsInSeats": {
            "title": "Infants in seats",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants occupying their own seats. Infants on laps are not supported. Total passenger count cannot exceed nine.",
            "default": 0
          },
          "maxStops": {
            "title": "Maximum stops",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Maximum connections per direction (0–2). CONNECTING requires at least one permitted stop. NONSTOP always applies zero stops.",
            "default": 2
          },
          "maxRetries": {
            "title": "Additional retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Number of retries after the initial Google Flights request for each stage.",
            "default": 2
          },
          "maxOutboundSelections": {
            "title": "Outbound flights to explore",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Round trips only. Number of outbound itineraries selected for return-flight searches.",
            "default": 2
          },
          "maxReturnOptions": {
            "title": "Return flights per outbound",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Round trips only. Maximum return options considered per selected outbound flight.",
            "default": 10
          },
          "maxResults": {
            "title": "Maximum output results",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum published itinerary combinations. Default 100; example input 10. Does not guarantee the cheapest flights.",
            "default": 100
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "ECONOMY",
              "PREMIUM_ECONOMY",
              "BUSINESS",
              "FIRST"
            ],
            "type": "string",
            "description": "Requested cabin class. Availability varies by airline and route.",
            "default": "ECONOMY"
          },
          "flightType": {
            "title": "Flight filter",
            "enum": [
              "ALL",
              "NONSTOP",
              "CONNECTING"
            ],
            "type": "string",
            "description": "ALL includes eligible nonstop and connecting flights. NONSTOP requires zero connections; CONNECTING requires at least one. maxStops applies per direction.",
            "default": "ALL"
          },
          "locale": {
            "title": "Language",
            "pattern": "^[A-Za-z]{2,3}(-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "Google Flights display language. Examples: en, fr, de, ja, es.",
            "default": "en"
          },
          "country": {
            "title": "Country market",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter Google Flights country market code, not necessarily the origin airport's country. Examples: IN, US, GB, FR, DE, JP, AU, AE. Market choice can affect available fares and booking providers.",
            "default": "IN"
          },
          "currency": {
            "title": "Fare currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Optional three-letter currency code, such as INR, USD, GBP, EUR, JPY, AUD or AED. Leave empty to use the Actor's market-based currency default. Currency is requested from Google, but the extracted numerical fare does not independently identify its currency."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}