# Hybrid search across app entities

> Source: https://docs.clonepartner.com/api-reference/ai/search-ai-app/

`GET /api/ai/search`

Hybrid search across app entities

**Operation ID:** `searchAiApp`

## Authentication

### Option 1

- **BearerAuth** (`http bearer`)
  API key token. Create via POST /api/api-keys. Format: `envoy_<hex>`

### Option 2

- **CookieAuth** (`apiKey`)
  Session cookie set after login + TOTP verification

## Query parameters

- `q` — `string`, `required`
- `types` — `string`
  Comma-separated entity types to filter
- `limit` — `integer`
  Example: `10`
  - Default: `10`

## Success responses

### 200

Search results

**Content type:** `application/json`

- Type: `object`
- Properties:
  - `results` (`array<object>`)
    - Items:
      - Type: `object`

## Error responses

### 400

Validation error


## Examples

### cURL

```bash
curl --request GET \
  --url 'https://your-envoy.example.com/api/ai/search?q=YOUR_Q&limit=10' \
  --header 'Authorization: Bearer $API_KEY'
```

### JavaScript (fetch)

```javascript
const response = await fetch('https://your-envoy.example.com/api/ai/search?q=YOUR_Q&limit=10', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  },
});

if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);
```
