Search Products
curl --request POST \
--url https://api.example.com/api/v1/searchimport requests
url = "https://api.example.com/api/v1/search"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v1/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/search"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"hits": [
{}
],
"nbHits": 123,
"page": 123,
"nbPages": 123,
"hitsPerPage": 123,
"facets": {},
"processingTimeMs": 123,
"correctedQuery": "<string>"
}Search Products
Semantically search products with Algolia-compatible response format
POST
/
api
/
v1
/
search
Search Products
curl --request POST \
--url https://api.example.com/api/v1/searchimport requests
url = "https://api.example.com/api/v1/search"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v1/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/search"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"hits": [
{}
],
"nbHits": 123,
"page": 123,
"nbPages": 123,
"hitsPerPage": 123,
"facets": {},
"processingTimeMs": 123,
"correctedQuery": "<string>"
}Authentication
All requests must include an API key via theX-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
| Level | Limit | Window |
|---|---|---|
| Per API key | 1,000 requests | 1 minute |
| Per API key + IP | 100 requests | 1 minute |
429 with a Retry-After header indicating seconds until reset.
Sorting
| Value | Description |
|---|---|
relevance (default) | Semantic similarity ranking |
price_asc | Price low to high |
price_desc | Price high to low |
newest | Most recently added |
optimization_score | AI 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.SearchHit[]
obrigatório
Array of matching products. Each hit includes
_highlightResult with matched
query terms wrapped in <em> tags.integer
obrigatório
Total number of matching results across all pages.
integer
obrigatório
Current page number (0-based).
integer
obrigatório
Total number of pages.
integer
obrigatório
Number of results per page.
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 } }
integer
obrigatório
Query processing time in milliseconds.
string
Spell-corrected query string, present only when different from input.
Última modificação em 12 de março de 2026
⌘I