> 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 search across all verticals

POST https://api.etera.dev/context/search/
Content-Type: application/json


        Provides a single entry point to search across all verticals (Restaurants, Hotels, Experiences) 
        with unified filtering, ranking, and pagination. This endpoint acts as a wrapper over the 
        respective search endpoints for each vertical.
        
        **Supported Data Types:**
        - RESTAURANT: Search for restaurants with filters like cuisines, tags, location
        - EXPERIENCE: Search for experiences with filters like categories, location
        - HOTEL: Search for hotels with filters like amenities, check-in/out dates, location
        
        **Authentication:** Optional. If provided, enables personalized results.
      

Reference: https://docs.etera.dev/platform/context/context-api/search/post-search

## Servers

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

## Request

### Body (application/json)

This endpoint expects an object.

- `query` (string, required) — Search query string
- `dataType` (string, required) — Type of data to search (case-insensitive: restaurant, experience, hotel)
- `filters` (SearchPostRequestBodyContentApplicationJsonSchemaFilters, optional)
- `limit` (double, optional, default: 20) — Maximum number of results to return
- `offset` (double, optional, default: 0) — Number of results to skip (for pagination)
- `userId` (string, optional) — User ID for personalized results

## Response

### 200

- `search_postSearch_Response_200`
  - SearchPostSearchResponse2000
  - SearchPostSearchResponse2001

## Types

### SearchPostRequestBodyContentApplicationJsonSchemaFilters

- `city` (string, optional) — City name
- `rating` (double, optional) — Minimum rating (0-5)
- `lat` (double, optional) — Latitude coordinate
- `lng` (double, optional) — Longitude coordinate
- `radius` (double, optional) — Search radius in meters
- `cuisines` (string, optional) — Cuisines filter (comma-separated for multiple)
- `tags` (string, optional) — Tags filter (comma-separated for multiple)
- `categories` (string, optional) — Experience categories (comma-separated for multiple)
- `adults` (double, optional) — Number of adults
- `rooms` (double, optional) — Number of rooms
- `children` (double, optional) — Number of children
- `childAges` (string, optional) — Ages of children (comma-separated)
- `checkIn` (string, optional) — Check-in date (YYYY-MM-DD)
- `checkOut` (string, optional) — Check-out date (YYYY-MM-DD)
- `country` (string, optional) — Country code
- `amenities` (string, optional) — Hotel amenities filter (comma-separated)
- `include_amenities` (boolean, optional) — Include amenities in response

### SearchPostSearchResponse2000

- `results` (list of SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItems, required)
- `meta` (SearchPostResponsesContentApplicationJsonSchemaOneOf0Meta, required)

### SearchPostSearchResponse2001

- `error` (string, required)
- `message` (string, required)

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItems

- `type` (SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsType, required)
- `id` (string, required)
- `name` (string, required)
- `rating` (double, optional)
- `city` (string, optional)
- `distance` (SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsDistance, optional)
- `priceLevel` (string, optional) — Price level (e.g., 'AVERAGE', 'CHEAP', 'LUXURY')
- `tags` (list of string, optional)
- `subtitle` (string, optional)
- `media` (string, optional) — Primary image/media URL
- `images` (list of string, optional) — Array of image URLs for map view / galleries
- `price` (double, optional)
- `currency` (string, optional)
- `compareAtPrice` (double, optional) — Original price before discount
- `discount` (double, optional) — Discount amount
- `lat` (double, optional) — Latitude coordinate
- `lng` (double, optional) — Longitude coordinate
- `hasInstantConfirmation` (boolean, optional) — Instant booking confirmation
- `minPrice` (double, optional) — Minimum/starting price
- `userRatingsTotal` (double, optional) — Total number of user ratings
- `priceRange` (string, optional) — Price range (e.g., '$', '$$', '$$$')
- `image` (string, optional)
- `thumbnail` (string, optional)
- `description` (string, optional, nullable)
- `address` (string, optional)
- `categories` (list of string, optional)
- `cuisines` (list of string, optional)
- `amenities` (SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsAmenities, optional)
- `availability` (boolean, optional)
- `location` (SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsLocation, optional)
- `distanceTo` (string, optional) — What distance is measured to (e.g., 'center', 'beach')
- `stars` (double, optional) — Hotel star rating
- `priceClass` (string, optional) — Price class (e.g., 'BUDGET', 'MID_RANGE', 'PREMIUM', 'LUXURY')

### SearchPostResponsesContentApplicationJsonSchemaOneOf0Meta

- `total` (double, required)
- `limit` (double, required)
- `offset` (double, required)
- `dataType` (string, required) — Normalized data type (lowercase)
- `query` (string, required)

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsType

- "restaurant"
- "experience"
- "hotel"

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsDistance

- double
- string

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsAmenities

- list of string
- list of SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsAmenitiesOneOf1Items

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsLocation

- string
- SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsLocation1
- SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsLocation2

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsAmenitiesOneOf1Items

- `id` (string, required)
- `label` (string, required)
- `values` (list of SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsAmenitiesOneOf1ItemsValuesItems, required)

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsLocation1

Location coordinates

- `lat` (double, required)
- `lng` (double, required)
- `address` (string, optional)

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsLocation2

Location coordinates

- `lat` (double, required)
- `lng` (double, required)
- `address` (string, optional)

### SearchPostResponsesContentApplicationJsonSchemaOneOf0ResultsItemsAmenitiesOneOf1ItemsValuesItems

- `id` (string, required)
- `value` (string, required)
- `included` (boolean, required)

## Examples

**Request**

```json
{
  "query": "seafood",
  "dataType": "restaurant"
}
```

**Response**

```json
{
  "results": [
    {
      "type": "restaurant",
      "id": "string",
      "name": "string",
      "rating": 1.1,
      "city": "string",
      "distance": 1.1,
      "priceLevel": "string",
      "tags": [
        "string"
      ],
      "subtitle": "string",
      "media": "string",
      "images": [
        "string"
      ],
      "price": 1.1,
      "currency": "string",
      "compareAtPrice": 1.1,
      "discount": 1.1,
      "lat": 1.1,
      "lng": 1.1,
      "hasInstantConfirmation": true,
      "minPrice": 1.1,
      "userRatingsTotal": 1.1,
      "priceRange": "string",
      "image": "string",
      "thumbnail": "string",
      "description": "string",
      "address": "string",
      "categories": [
        "string"
      ],
      "cuisines": [
        "string"
      ],
      "amenities": [
        "string"
      ],
      "availability": true,
      "location": "string",
      "distanceTo": "string",
      "stars": 1.1,
      "priceClass": "string"
    }
  ],
  "meta": {
    "total": 1.1,
    "limit": 1.1,
    "offset": 1.1,
    "dataType": "string",
    "query": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.etera.dev/context/search/"

payload = {
    "query": "seafood",
    "dataType": "restaurant"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.etera.dev/context/search/';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"query":"seafood","dataType":"restaurant"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.etera.dev/context/search/"

	payload := strings.NewReader("{\n  \"query\": \"seafood\",\n  \"dataType\": \"restaurant\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	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/context/search/")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"query\": \"seafood\",\n  \"dataType\": \"restaurant\"\n}"

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.post("https://api.etera.dev/context/search/")
  .header("Content-Type", "application/json")
  .body("{\n  \"query\": \"seafood\",\n  \"dataType\": \"restaurant\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.etera.dev/context/search/', [
  'body' => '{
  "query": "seafood",
  "dataType": "restaurant"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.etera.dev/context/search/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": \"seafood\",\n  \"dataType\": \"restaurant\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "query": "seafood",
  "dataType": "restaurant"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.etera.dev/context/search/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```