🚀 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,american
- `priceLevel`: 1=$ (budget), 2=$$ (moderate), 3=$$$ (expensive), 4=$$$$ (luxury)
- `features`: wifi,parking,delivery,takeout,reservations,outdoor,halal,vegan
- `tags`: 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, upscale
- `family`: Kid-friendly, spacious, parking
- `business`: Quiet, wifi, professional atmosphere
**🧮 Advanced Features:**
- `useBayesian=true`: Enable probabilistic modeling for better accuracy
- `userId`: 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 sorting
- `strategy`: Which strategy was used
- `executionTime`: Response time in milliseconds
- `fromCache`: Whether result came from cache
- `totalResults`: Total number of matching restaurants
- `query`: 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.
