Pular para o conteúdo principal
POST
/
api
/
v1
/
search
Search Products
curl --request POST \
  --url https://api.example.com/api/v1/search
{
  "hits": [
    {}
  ],
  "nbHits": 123,
  "page": 123,
  "nbPages": 123,
  "hitsPerPage": 123,
  "facets": {},
  "processingTimeMs": 123,
  "correctedQuery": "<string>"
}

Authentication

All requests must include an API key via the X-API-Key header or api_key query parameter.
curl -X POST https://alana.shopping/api/v1/search \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ak_your_api_key" \
  -d '{"query": "camiseta azul"}'

Rate Limits

LevelLimitWindow
Per API key1,000 requests1 minute
Per API key + IP100 requests1 minute
When a rate limit is exceeded, the response has status 429 with a Retry-After header indicating seconds until reset.

Sorting

ValueDescription
relevance (default)Semantic similarity ranking
price_ascPrice low to high
price_descPrice high to low
newestMost recently added
optimization_scoreAI Commerce Score

Pagination

  • page: 0-based page number (default: 0)
  • hitsPerPage: Results per page, max 100 (default: 20)

Response Format

Compatible with Algolia InstantSearch for drop-in frontend integration.
hits
SearchHit[]
obrigatório
Array of matching products. Each hit includes _highlightResult with matched query terms wrapped in <em> tags.
nbHits
integer
obrigatório
Total number of matching results across all pages.
page
integer
obrigatório
Current page number (0-based).
nbPages
integer
obrigatório
Total number of pages.
hitsPerPage
integer
obrigatório
Number of results per page.
facets
object
Facet counts per attribute and value. Only populated when facets is specified in the request.
{ "brand": { "Nike": 12, "Adidas": 7 }, "availability": { "in_stock": 18 } }
processingTimeMs
integer
obrigatório
Query processing time in milliseconds.
correctedQuery
string
Spell-corrected query string, present only when different from input.
Last modified on March 12, 2026