Pular para o conteúdo principal

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.
PlatformAdapter TypeInstallation Guide
VTEX IOGraphQL resolver appVTEX Installation
ShopifyLiquid snippet + Hydrogen componentShopify Installation
NuvemshopJavaScript snippetNuvemshop 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:
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
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.

Shared Capabilities

All adapters provide:
  • Real-time autocomplete — debounced suggestions via /api/v1/autocomplete
  • Full-text + semantic search — via /api/v1/search
  • Spell correctioncorrectedQuery 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.
Last modified on March 12, 2026