{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights and Hotels Prices API",
    "description": "Live Google Flights and Google Hotels prices: ranked flights with stops, layovers, CO2 and low/typical/high price insight, flexible dates, and hotel prices on every booking site with direct links. Pay per search, not per result. Works as an MCP server for AI agents.",
    "version": "0.0",
    "x-build-id": "GJxtBncjx4PJ2l3lo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jixiaohao~google-flights-hotels-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jixiaohao-google-flights-hotels-prices",
        "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/jixiaohao~google-flights-hotels-prices/runs": {
      "post": {
        "operationId": "runs-sync-jixiaohao-google-flights-hotels-prices",
        "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/jixiaohao~google-flights-hotels-prices/run-sync": {
      "post": {
        "operationId": "run-sync-jixiaohao-google-flights-hotels-prices",
        "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": {
          "mode": {
            "title": "What to search",
            "enum": [
              "flights",
              "hotels"
            ],
            "type": "string",
            "description": "Flights uses the Flights fields below; Hotels uses the Hotels fields.",
            "default": "flights"
          },
          "origin": {
            "title": "From (IATA code)",
            "type": "string",
            "description": "Airport or city code, e.g. JFK, NYC, LHR."
          },
          "destination": {
            "title": "To (IATA code)",
            "type": "string",
            "description": "Airport or city code, e.g. LAX, PAR, TYO."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "YYYY-MM-DD. Default: 30 days from today."
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty for one-way. Round-trip prices are totals; each option is an outbound flight, as Google Flights lists it."
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin class for flights.",
            "default": "economy"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Flights: 1-9 (default 1). Hotels: 1-6 (default 2)."
          },
          "children": {
            "title": "Children (flights)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Children aged 2-11 (flights).",
            "default": 0
          },
          "infantsInSeat": {
            "title": "Infants in seat (flights)",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 with their own seat (flights).",
            "default": 0
          },
          "infantsOnLap": {
            "title": "Infants on lap (flights)",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infants under 2 on an adult's lap (flights).",
            "default": 0
          },
          "maxStops": {
            "title": "Max stops",
            "enum": [
              "any",
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Maximum number of stops per direction (flights).",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best",
              "price",
              "duration",
              "departure",
              "relevance",
              "rating"
            ],
            "type": "string",
            "description": "Flights: best (Google's ranking), price, duration, departure. Hotels: relevance, price, rating.",
            "default": "best"
          },
          "flexDays": {
            "title": "Flexible dates (± days)",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Also search this many days before and after, shifting the return by the same amount, and report the cheapest dates. Each extra date is billed as one flight search.",
            "default": 0
          },
          "location": {
            "title": "Location or hotel",
            "type": "string",
            "description": "City, area or a hotel's name, e.g. \"Paris\", \"Shibuya, Tokyo\", \"Hilton Paris Opera\". A hotel name returns that hotel with its price on every booking site."
          },
          "checkIn": {
            "title": "Check-in",
            "type": "string",
            "description": "YYYY-MM-DD. Default: 30 days from today."
          },
          "checkOut": {
            "title": "Check-out",
            "type": "string",
            "description": "YYYY-MM-DD, 1-30 nights after check-in. Default: 2 nights."
          },
          "childrenAges": {
            "title": "Children's ages (hotels)",
            "type": "array",
            "description": "One age (0-17) per child."
          },
          "compareSites": {
            "title": "Compare booking sites for top N hotels",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "For the first N hotels, fetch the price on each booking site (Booking.com, Expedia, Agoda, the official site...). Each hotel is billed as one hotel-prices event. 0 to skip.",
            "default": 3
          },
          "minRating": {
            "title": "Minimum guest rating",
            "enum": [
              "0",
              "3.5",
              "4",
              "4.5"
            ],
            "type": "string",
            "description": "Only hotels with at least this Google guest rating.",
            "default": "0"
          },
          "minHotelClass": {
            "title": "Minimum star class",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only hotels with at least this many stars (1-5)."
          },
          "maxPrice": {
            "title": "Max nightly price",
            "minimum": 1,
            "type": "integer",
            "description": "Before taxes, in the chosen currency."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Options returned per search. Default 10 for flights, 20 for hotels."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO code, e.g. USD, EUR, GBP, JPY.",
            "default": "USD"
          },
          "country": {
            "title": "Searcher country",
            "type": "string",
            "description": "Two-letter code. Prices and sites can differ by country.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for Google pages, e.g. en, de, fr.",
            "default": "en"
          },
          "searches": {
            "title": "Batch of searches (advanced)",
            "type": "array",
            "description": "Run several searches in one run. Each entry is an object with the same fields as above plus \"mode\", e.g. {\"mode\": \"hotels\", \"location\": \"Rome\", \"checkIn\": \"2026-12-10\", \"checkOut\": \"2026-12-12\"}. When set, the single-search fields are ignored except currency, country and language."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's datacenter proxy is tried first because it is cheaper; if Google blocks it, the run switches to residential automatically. Choosing residential here skips the datacenter attempt.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries per Google request, each on a fresh proxy session.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}