๐ Unified Restaurant Search - One Endpoint for Everything!
The ultimate restaurant search endpoint that handles natural language queries, structured filters, and everything in between.
๐ฏ How it works:
- Natural Language: Just type what you want like โitalian restaurantsโ or โbest pizza near meโ
- Structured Filters: Use specific parameters for precise control
- Smart Parsing: Automatically understands your intent and applies the best strategy
- Proper Sorting: Results are intelligently ranked by relevance, rating, and distance
๐ Natural Language Examples:
?q=italian restaurantsโ Finds Italian restaurants?q=best pizza near meโ Finds top-rated pizza places nearby?q=romantic dinner spotsโ Finds romantic restaurants?q=cheap sushi with deliveryโ Finds affordable sushi with delivery
๐ Location Parameters:
lat/lng: Your coordinates (decimal degrees)radius: Search radius in meters (default: 5000, max: 50000)
๐ฝ๏ธ Preference Parameters:
cuisines: italian,chinese,mexican,indian,thai,french,americanpriceLevel: 1=$ (budget), 2=$$ (moderate), 3=$$$ (expensive), 4=$$$$ (luxury)features: wifi,parking,delivery,takeout,reservations,outdoor,halal,vegantags: romantic,family-friendly,business,casual,fine-dining,popular
๐ญ Context Parameters:
breakfast: Morning dining (6-11 AM optimized)lunch: Midday meals (11 AM-3 PM optimized)dinner: Evening dining (5-10 PM optimized)late_night: Late hours (10 PM+ optimized)date_night: Romantic atmosphere, upscalefamily: Kid-friendly, spacious, parkingbusiness: Quiet, wifi, professional atmosphere
๐งฎ Advanced Features:
useBayesian=true: Enable probabilistic modeling for better accuracyuserId: Enable personalized recommendations (header: x-user-id)
โก Performance:
- < 50ms: Hot cache hits
- < 150ms: Cold cache with database query
- < 500ms: Complex multi-strategy analysis
- Redis caching: 5-30 minute TTL based on data type
๐ฏ Smart Strategy Selection:
- Natural language queries โ NLP parsing + content-based
- Location + preferences โ Hybrid approach
- Location only โ Location-popular
- User ID + preferences โ Collaborative filtering
- Context only โ Context-aware
- Default โ Popular restaurants
๐ Response Format:
restaurants: Array of restaurants with proper sortingstrategy: Which strategy was usedexecutionTime: Response time in millisecondsfromCache: Whether result came from cachetotalResults: Total number of matching restaurantsquery: Parsed query information (for natural language queries)
Query parameters
q
userId
lat
lng
radius
cuisines
priceLevel
features
useBayesian
context
limit
openNow
timezoneOffset
mealType
offset
page
dietaryRestrictions
minRating
Response
This endpoint returns an object.

