{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vistalink-com/json-schema/vistalink-com-search-response-schema.json",
  "title": "SearchResponse",
  "description": "POST /v1/search response body.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vistalink-com-openapi.json#/components/schemas/SearchResponse",
  "properties": {
    "hotels": {
      "items": {
        "$ref": "#/$defs/HotelCard"
      },
      "type": "array",
      "title": "Hotels"
    },
    "total": {
      "type": "integer",
      "title": "Total",
      "default": 0
    },
    "fallback_used": {
      "type": "boolean",
      "title": "Fallback Used",
      "default": false
    },
    "fallback_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fallback Message"
    },
    "pricing_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pricing Note",
      "description": "Why results carry no (or only some) prices: prices need both check_in and check_out, and are only the all-inclusive total for that stay. Key-less: the cached total for those dates; with a key, include_rates=true also fetches live rates."
    },
    "notes": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes",
      "description": "How the request was interpreted, when it was not taken literally: an alias read as its documented name, a city taken from vibe, a country chosen for a city name found in several countries, a reduced limit."
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/UsageInfo"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "$defs": {
    "ExplanationFactor": {
      "properties": {
        "factor_type": {
          "type": "string",
          "title": "Factor Type"
        },
        "human_readable": {
          "type": "string",
          "title": "Human Readable"
        },
        "contribution": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Contribution"
        }
      },
      "type": "object",
      "required": [
        "factor_type",
        "human_readable",
        "contribution"
      ],
      "title": "ExplanationFactor",
      "description": "Single ranking signal exposed to MCP clients."
    },
    "GuestInsightAspect": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type"
        },
        "summary": {
          "type": "string",
          "title": "Summary"
        },
        "sentiment": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment"
        },
        "quote": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quote"
        }
      },
      "type": "object",
      "required": [
        "type",
        "summary"
      ],
      "title": "GuestInsightAspect",
      "description": "Single guest insight aspect (e.g. food, staff)."
    },
    "GuestInsights": {
      "properties": {
        "highlights": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Highlights"
        },
        "aspects": {
          "items": {
            "$ref": "#/$defs/GuestInsightAspect"
          },
          "type": "array",
          "title": "Aspects"
        }
      },
      "type": "object",
      "title": "GuestInsights",
      "description": "Aggregated guest insights for a hotel."
    },
    "HotelCard": {
      "properties": {
        "hotel_id": {
          "type": "string",
          "title": "Hotel Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country"
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Address"
        },
        "star_rating": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Star Rating"
        },
        "review_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Review Score"
        },
        "review_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Review Count"
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Latitude"
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Longitude"
        },
        "website_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Website Url"
        },
        "parley_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Parley Url",
          "description": "Public hotel page on Parley (meetparley.ai) with the stay's dates; send users here to view or book the hotel."
        },
        "amenities": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Amenities"
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/StayPrice"
            },
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price"
        },
        "images": {
          "items": {
            "$ref": "#/$defs/HotelImageCard"
          },
          "type": "array",
          "title": "Images",
          "description": "Ordered gallery of hotel images (up to 5 on /v1/chat and /v1/search; up to 50 on /v1/hotels/{id}). Use for lightbox/carousel — not as the card thumbnail. Empty list when the hotel has no images."
        },
        "review_highlight": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Review Highlight"
        },
        "guest_insights": {
          "anyOf": [
            {
              "$ref": "#/$defs/GuestInsights"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "hotel_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hotel Type"
        },
        "rates": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/RoomRate"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rates"
        },
        "hero_image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hero Image Url",
          "description": "Intent-aware thumbnail URL. Pre-selected to match the query context (e.g. a pool search returns a pool photo). Always use this field as the card thumbnail — do not substitute images[0]. Null only when the hotel has no images."
        },
        "hero_image_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hero Image Label",
          "description": "Category label of the hero image (e.g. 'swimming pool indoor', 'building'). Null when unclassified."
        },
        "explanation": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Explanation"
        },
        "explanation_factors": {
          "items": {
            "$ref": "#/$defs/ExplanationFactor"
          },
          "type": "array",
          "title": "Explanation Factors"
        },
        "poi_distances": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Poi Distances"
        },
        "routes_to_pois": {
          "additionalProperties": true,
          "type": "object",
          "title": "Routes To Pois"
        }
      },
      "type": "object",
      "required": [
        "hotel_id",
        "name"
      ],
      "title": "HotelCard",
      "description": "Hotel summary returned by ``/v1/chat``, ``/v1/search``, and ``/v1/hotels/{id}``.\n\n## Images\n\nTwo complementary image fields are provided — use both, never substitute one for the other:\n\n**``hero_image_url`` — use this as the card thumbnail.**\nA single, pre-selected image URL chosen to best represent the hotel *in the\ncontext of this specific query*. For example, a search for \"hotel with pool\"\nreturns a pool photo rather than a generic exterior shot. Always prefer this\nfield for the primary card image; do **not** fall back to ``images[0]`` as a\nthumbnail because ``hero_image_url`` may intentionally point to a different\n(more relevant) image. ``null`` only when the hotel has no images at all.\n\n**``images`` — use this for the gallery / lightbox.**\nThe full ordered gallery: up to 5 images per hotel on ``/v1/chat`` and\n``/v1/search``; up to 50 on ``/v1/hotels/{id}``. Each entry has a ``url``\nand an optional ``label`` (e.g. ``\"swimming pool indoor\"``, ``\"room\"``).\nAn empty list means no images are available for this hotel."
    },
    "HotelImageCard": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url",
          "description": "Fully-qualified CDN URL of the image."
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label",
          "description": "Image category label (e.g. 'swimming pool indoor', 'building', 'room'). Null when unclassified."
        }
      },
      "type": "object",
      "required": [
        "url"
      ],
      "title": "HotelImageCard",
      "description": "One image in a hotel's gallery.\n\nThe ``url`` is a fully-qualified CDN URL ready to use in an ``<img>`` tag.\n``label`` is a human-readable category such as ``\"swimming pool indoor\"``,\n``\"building\"``, or ``\"room\"``; it may be ``null`` when the image has no\nclassified label."
    },
    "RoomOffer": {
      "properties": {
        "price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price"
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "default": "EUR"
        },
        "includes_taxes_and_fees": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Includes Taxes And Fees"
        },
        "has_breakfast": {
          "type": "boolean",
          "title": "Has Breakfast",
          "default": false
        },
        "has_free_cancellation": {
          "type": "boolean",
          "title": "Has Free Cancellation",
          "default": false
        }
      },
      "type": "object",
      "title": "RoomOffer",
      "description": "A single price offer for a room.\n\nOn the developer API ``price`` is the all-inclusive total for the\nrequested stay (taxes and fees included); offers whose tax basis is\nunknown are not returned."
    },
    "RoomRate": {
      "properties": {
        "room_name": {
          "type": "string",
          "title": "Room Name",
          "default": ""
        },
        "amenities": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Amenities"
        },
        "room_size_sqm": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Room Size Sqm"
        },
        "room_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Room Description"
        },
        "offers": {
          "items": {
            "$ref": "#/$defs/RoomOffer"
          },
          "type": "array",
          "title": "Offers"
        }
      },
      "type": "object",
      "title": "RoomRate",
      "description": "Room type with its available offers."
    },
    "StayPrice": {
      "properties": {
        "total": {
          "type": "number",
          "title": "Total",
          "description": "All-inclusive total for the whole stay, in `currency`."
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "description": "ISO 4217 currency of `total` (the requested currency)."
        },
        "includes_taxes_and_fees": {
          "type": "boolean",
          "title": "Includes Taxes And Fees",
          "description": "Always true: totals with an unknown tax basis are never returned.",
          "default": true
        },
        "check_in": {
          "type": "string",
          "format": "date",
          "title": "Check In"
        },
        "check_out": {
          "type": "string",
          "format": "date",
          "title": "Check Out"
        },
        "nights": {
          "type": "integer",
          "title": "Nights"
        },
        "adults": {
          "type": "integer",
          "title": "Adults",
          "default": 2
        },
        "rooms": {
          "type": "integer",
          "title": "Rooms",
          "default": 1
        },
        "source_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Total",
          "description": "The same total in the currency it was observed in."
        },
        "source_currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Currency"
        },
        "observed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Observed At",
          "description": "When this price was observed."
        }
      },
      "type": "object",
      "required": [
        "total",
        "currency",
        "check_in",
        "check_out",
        "nights"
      ],
      "title": "StayPrice",
      "description": "The price of one specific stay.\n\nOnly present when the request carried both ``check_in`` and\n``check_out``. Always the all-inclusive total (taxes and fees included)\nfor the whole stay, in ``currency``, for one room and ``adults`` guests,\nfrom a scrape no older than 72 hours."
    },
    "UsageInfo": {
      "properties": {
        "latency_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Latency Ms"
        },
        "cost_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cost Usd"
        }
      },
      "type": "object",
      "title": "UsageInfo",
      "description": "Per-request usage info attached to responses.\n\nSurfaces cost and latency — the metrics API clients need for\nbudgeting and performance monitoring.  Token-level detail is\nrecorded internally but not exposed here (billing is per-call,\nnot per-token)."
    }
  }
}