Journey Docs
Members APIProperties

Search Properties

Paginated property search with optional map markers

POST/members/properties/search

Overview

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

limitbodynumber

Maximum number of properties to return (default: 20)

offsetbodynumber

Number of properties to skip for pagination (default: 0)

sortbodystring

Sort order for results. Options: "recommended", "price_low", "price_high", "rating", "distance"

includeMarkersbodyboolean

Whether to include map markers for all matching properties (default: false)

datesbodyobject

Check-in and check-out dates for availability and pricing

properties
checkInbodystring

Check-in date (YYYY-MM-DD)

checkOutbodystring

Check-out date (YYYY-MM-DD)

locationbodyobject

Location-based search filters

properties
latitudebodynumber

Latitude coordinate

longitudebodynumber

Longitude coordinate

radiusbodynumber

Search radius in kilometers

citybodystring

City name

statebodystring

State or region

countrybodystring

Country code (ISO 3166-1)

priceRangebodyobject

Price range in points per night

price range
minbodynumber

Minimum price per night

maxbodynumber

Maximum price per night

guestRatingbodynumber

Minimum guest rating (1-5 stars)

amenitiesbodyarray

Required amenities (array of amenity IDs)

propertyTypesbodyarray

Property types to include (e.g., "hotel", "resort", "villa")

maxGuestsbodynumber

Maximum guest capacity required

brandsbodyarray

Specific brands to include

tagsbodyarray

Property 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.

itemsarrayrequired

Array of property summaries matching search criteria

property items
idnumberrequired

Unique property identifier

documentIdstringrequired

Property document identifier

namestringrequired

Property name

brandNamestring

Brand or chain name

typestringrequired

Property type (hotel, resort, villa, etc.)

baseRoomCategorystring

Base room type offered

nightlyCostnumberrequired

Cost per night in points

guestRatingnumber

Average guest rating (1-5 stars)

maxGuestsnumberrequired

Maximum guest capacity

addressobjectrequired

Property location details

address
citystringrequired

City name

statestring

State or region

countrystringrequired

Country name

latitudenumberrequired

Latitude coordinate

longitudenumberrequired

Longitude coordinate

heroImageobject

Main property image

hero image
urlstringrequired

Image URL

altstring

Alt text for accessibility

amenitiesarray

Available property amenities

tagsarray

Property tags for categorization

totalnumberrequired

Total number of properties matching the search criteria

limitnumberrequired

Number of items returned in this response

offsetnumberrequired

Number of items skipped for pagination

markersarray

Map markers for all matching properties (only when includeMarkers=true)

markers
idnumberrequired

Property ID for the marker

latitudenumberrequired

Marker latitude

longitudenumberrequired

Marker longitude

nightlyCostnumberrequired

Points cost for map display

searchViewportobject

Suggested map viewport for the search results

viewport
boundsobjectrequired

Bounding box for the search area

bounds
northnumberrequired

Northern boundary

southnumberrequired

Southern boundary

eastnumberrequired

Eastern boundary

westnumberrequired

Western boundary

Response

200 Response - Search Results
{
  "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:

  1. Returns the top-N scored results for the list view (based on requested limit/offset)
  2. Provides lean map markers for all 3000 matching properties
  3. 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

On this page