Skip to main content

AI-Powered Listing Search

Natural language search using vector embeddings + LLM. Combines with structured filters.


AI extracts intent from natural language, merges with explicit filters, runs full listing search.

POST /api/v1/crs/listings/ai-search

AI only:

{
"query": "Pet-friendly villas in Goa for 6 adults this weekend under 20k"
}

AI + explicit filters (explicit wins on conflict):

{
"query": "luxury beachfront villa with pool",
"rawParams": [
{ "filterName": "channelId", "filterValues": ["B2C"] },
{ "filterName": "city", "filterValues": ["Goa"] },
{ "filterName": "adults", "filterValues": ["6"] }
]
}

Response:

{
"intent": {
"listingIds": ["lst_abc", "lst_def", "lst_ghi"],
"checkInDate": "2026-04-05",
"checkOutDate": "2026-04-07",
"adultCount": 6,
"city": "Goa",
"propertyType": "Villa",
"budgetPerNight": 20000,
"petFriendly": true,
"originalQuery": "Pet-friendly villas in Goa for 6 adults this weekend under 20k"
},
"results": {
"singleListings": [ ... ],
"combinations": []
}
}

Extract Intent Only

Populate filter UI from natural language — no listing search executed.

POST /api/v1/crs/listings/ai-search/intent
{ "query": "3 BHK villa in Lonavala for 8 people next weekend" }

Response:

{
"listingIds": ["lst_abc", "lst_def"],
"checkInDate": "2026-04-05",
"checkOutDate": "2026-04-07",
"adultCount": 8,
"city": "Lonavala",
"propertyType": "Villa",
"originalQuery": "3 BHK villa in Lonavala for 8 people next weekend"
}
Use Case

User types in the search bar → frontend calls /ai-search/intent → auto-fills the filter chips (city, dates, guests, property type). User can then adjust filters manually before searching.


Caching

Same query on the same day returns cached results (no tokens burned):

  • Key: 2026-04-03:pet-friendly villas in goa this weekend
  • TTL: 10 minutes
  • Why date in key: "this weekend" means different dates on different days