Search Properties
Paginated property search with optional map markers
/members/properties/searchOverview
Paginated property search with comprehensive filtering, sorting, and optional map markers. When includeMarkers is true, the backend runs a single pipeline execution and returns both the scored top-N results for the list view and lean map markers for all matching properties, reducing round-trips compared to separate search and map calls.
This is the primary search endpoint for Journey's property discovery experience.
Authentication
Requires a valid Clerk JWT token in the Authorization header.
Request Body
limitbodynumberMaximum number of properties to return (default: 20)
offsetbodynumberNumber of properties to skip for pagination (default: 0)
sortbodystringSort order for results. Options: "recommended", "price_low", "price_high", "rating", "distance"
includeMarkersbodybooleanWhether to include map markers for all matching properties (default: false)
datesbodyobjectCheck-in and check-out dates for availability and pricing
properties
checkInbodystringCheck-in date (YYYY-MM-DD)
checkOutbodystringCheck-out date (YYYY-MM-DD)
locationbodyobjectLocation-based search filters
properties
latitudebodynumberLatitude coordinate
longitudebodynumberLongitude coordinate
radiusbodynumberSearch radius in kilometers
citybodystringCity name
statebodystringState or region
countrybodystringCountry code (ISO 3166-1)
priceRangebodyobjectPrice range in points per night
price range
minbodynumberMinimum price per night
maxbodynumberMaximum price per night
guestRatingbodynumberMinimum guest rating (1-5 stars)
amenitiesbodyarrayRequired amenities (array of amenity IDs)
propertyTypesbodyarrayProperty types to include (e.g., "hotel", "resort", "villa")
maxGuestsbodynumberMaximum guest capacity required
brandsbodyarraySpecific brands to include
tagsbodyarrayProperty tags for themed filtering
Request
curl -X POST "http://localhost:3000/v1/members/properties/search" \
-H "Authorization: Bearer YOUR_CLERK_JWT" \
-H "Content-Type: application/json" \
-d '{
"limit": 20,
"offset": 0,
"sort": "recommended",
"includeMarkers": true,
"dates": {
"checkIn": "2024-06-15",
"checkOut": "2024-06-17"
},
"location": {
"city": "New York",
"state": "NY",
"country": "US"
},
"priceRange": {
"min": 30000,
"max": 100000
},
"guestRating": 4.0,
"amenities": ["pool", "spa"],
"propertyTypes": ["hotel", "resort"]
}'Response
Returns a paginated list of properties matching the search criteria, with optional map markers.
itemsarrayrequiredArray of property summaries matching search criteria
property items
idnumberrequiredUnique property identifier
documentIdstringrequiredProperty document identifier
namestringrequiredProperty name
brandNamestringBrand or chain name
typestringrequiredProperty type (hotel, resort, villa, etc.)
baseRoomCategorystringBase room type offered
nightlyCostnumberrequiredCost per night in points
guestRatingnumberAverage guest rating (1-5 stars)
maxGuestsnumberrequiredMaximum guest capacity
addressobjectrequiredProperty location details
address
citystringrequiredCity name
statestringState or region
countrystringrequiredCountry name
latitudenumberrequiredLatitude coordinate
longitudenumberrequiredLongitude coordinate
heroImageobjectMain property image
hero image
urlstringrequiredImage URL
altstringAlt text for accessibility
amenitiesarrayAvailable property amenities
tagsarrayProperty tags for categorization
totalnumberrequiredTotal number of properties matching the search criteria
limitnumberrequiredNumber of items returned in this response
offsetnumberrequiredNumber of items skipped for pagination
markersarrayMap markers for all matching properties (only when includeMarkers=true)
markers
idnumberrequiredProperty ID for the marker
latitudenumberrequiredMarker latitude
longitudenumberrequiredMarker longitude
nightlyCostnumberrequiredPoints cost for map display
searchViewportobjectSuggested map viewport for the search results
viewport
boundsobjectrequiredBounding box for the search area
bounds
northnumberrequiredNorthern boundary
southnumberrequiredSouthern boundary
eastnumberrequiredEastern boundary
westnumberrequiredWestern boundary
Response
{
"items": [
{
"id": 123,
"documentId": "prop_manhattan_boutique_hotel",
"name": "Manhattan Boutique Hotel",
"brandName": "Journey Urban Collection",
"type": "Hotel",
"baseRoomCategory": "Deluxe Room",
"nightlyCost": 45000,
"guestRating": 4.6,
"maxGuests": 4,
"address": {
"city": "New York",
"state": "NY",
"country": "United States",
"latitude": 40.7128,
"longitude": -74.0060
},
"heroImage": {
"url": "https://cdn.example.com/hotels/manhattan-boutique.jpg",
"alt": "Manhattan boutique hotel exterior"
},
"amenities": ["WiFi", "Fitness Center", "Pool", "Spa", "Restaurant"],
"tags": ["business", "luxury", "urban"]
}
],
"total": 245,
"limit": 20,
"offset": 0,
"markers": [
{
"id": 123,
"latitude": 40.7128,
"longitude": -74.0060,
"nightlyCost": 45000
}
],
"searchViewport": {
"bounds": {
"north": 40.8176,
"south": 40.6829,
"east": -73.9442,
"west": -74.0859
}
}
}Search Behavior
Unified Pipeline
When includeMarkers=true, the backend executes a single search pipeline with a limit of 3000 properties, then:
- Returns the top-N scored results for the list view (based on requested limit/offset)
- Provides lean map markers for all 3000 matching properties
- Includes a suggested viewport for the map display
Scoring and Ranking
The search uses a sophisticated scoring algorithm that considers:
- Relevance: Match to search criteria and location
- Member preferences: Based on profile and search history
- Property quality: Guest ratings and amenity scores
- Availability: Real-time availability for requested dates
- Pricing: Competitive pricing within the member's range
Personalization
Search results are personalized using a user seed based on the member ID, ensuring:
- Consistent ranking across pagination
- Personalized recommendations
- A/B testing capabilities
- Privacy-compliant personalization
Related Endpoints
- Search Hydrate - Bulk property enrichment by IDs
- Get Suggestions - Location autocomplete
- Get Filters - Available filter options