> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alana.shopping/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform Adapters

> Connect the Alana Search API to VTEX, Shopify, and Nuvemshop with drop-in adapters

## Overview

Alana provides first-party adapters that wire the Search API v1 into the most common e-commerce platforms. Each adapter replaces the platform's native search with Alana's AI-powered semantic search — no custom backend required.

| Platform  | Adapter Type                        | Installation Guide                                                 |
| --------- | ----------------------------------- | ------------------------------------------------------------------ |
| VTEX IO   | GraphQL resolver app                | [VTEX Installation](/api-reference/v1/vtex-installation)           |
| Shopify   | Liquid snippet + Hydrogen component | [Shopify Installation](/api-reference/v1/shopify-installation)     |
| Nuvemshop | JavaScript snippet                  | [Nuvemshop Installation](/api-reference/v1/nuvemshop-installation) |

## Platform Detection Header

All adapters automatically send an `X-Alana-Platform` header on every request to identify the originating platform. This header is used for analytics segmentation and platform-specific response tuning.

```
X-Alana-Platform: vtex | shopify | nuvemshop | custom
```

You can also set this header manually for custom integrations:

```bash theme={null}
curl -X POST https://app.alana.shopping/api/v1/search \
  -H "Content-Type: application/json" \
  -H "x-api-key: ak_your_api_key" \
  -H "X-Alana-Platform: custom" \
  -d '{"query": "running shoes"}'
```

## CORS Configuration

All Search API v1 endpoints support cross-origin requests from browser-based adapters. The API responds with the following CORS headers when an `Origin` is present:

```
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, x-api-key, X-Alana-Platform
```

<Note>
  Wildcard CORS (`*`) is intentional for the Search API. The API key in the
  `x-api-key` header is the authentication mechanism — there is no session
  cookie to protect.
</Note>

## Shared Capabilities

All adapters provide:

* **Real-time autocomplete** — debounced suggestions via `/api/v1/autocomplete`
* **Full-text + semantic search** — via `/api/v1/search`
* **Spell correction** — `correctedQuery` displayed when available
* **Event tracking** — search and detail-page-view events sent via `/api/v1/events`
* **Visitor ID** — persistent `_alana_vid` stored in `localStorage` for session continuity

## API Key Security

The API key is embedded in the client-side adapter. This is by design: the Search API is read-only and rate-limited per key. Never use a service-role or admin key in a front-end adapter — use a dedicated **search-only API key** created in your workspace settings.
