> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.etera.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.etera.dev/_mcp/server.

# 🚀 Unified Restaurant Search - One Endpoint for Everything!

GET https://api.etera.dev/restaurant/search/recommendations/

**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)

Reference: https://docs.etera.dev/restaurant/search/restaurant-search-api/recommendations/get-recommendations

## Servers

- `https://api.etera.dev/restaurant/search` (Production, default)
- `https://api-stage.etera.dev/restaurant/search` (Staging)
- `https://api-dev.etera.dev/restaurant/search` (Development)

## Request

### Query parameters

- `q` (string, optional)
- `userId` (string, optional)
- `lat` (string, optional)
- `lng` (string, optional)
- `radius` (string, optional)
- `cuisines` (string, optional)
- `priceLevel` (string, optional)
- `features` (string, optional)
- `tags` (string, optional)
- `useBayesian` (string, optional)
- `context` (RecommendationsGetParametersContext, optional)
- `limit` (string, optional)
- `openNow` (string, optional)
- `timezoneOffset` (string, optional)
- `mealType` (string, optional)
- `offset` (string, optional)
- `page` (string, optional)
- `dietaryRestrictions` (string, optional)
- `minRating` (string, optional)

## Types

### RecommendationsGetParametersContext

- "breakfast"
- "lunch"
- "dinner"
- "late_night"
- "date_night"
- "family"
- "business"

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.etera.dev/restaurant/search/recommendations/"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.etera.dev/restaurant/search/recommendations/';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.etera.dev/restaurant/search/recommendations/"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.etera.dev/restaurant/search/recommendations/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.etera.dev/restaurant/search/recommendations/")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.etera.dev/restaurant/search/recommendations/');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.etera.dev/restaurant/search/recommendations/");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.etera.dev/restaurant/search/recommendations/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```