Help Center
Search-API info
In this section, you will find the relevant API keys to integrate Expertrec Search Engine into your Store/Site through API.
API documentation links:
Complete API Reference
Main Search Endpoint
POST /organisation/{org_id}/{api_key}/srh_post
Content-Type: application/json
{
"q": "search query",
"size": 10,
"page": 0,
"filters": {
"category": ["Electronics"],
"price": {"min": 10, "max": 100}
},
"sort": "price_asc",
"facets": ["category", "brand", "price"]
}
Response Format
{
"results": [
{
"id": "product_123",
"title": "Product Name",
"description": "...",
"price": 29.99,
"image": "https://...",
"url": "https://...",
"variants": [...]
}
],
"facets": {
"category": [{"value": "Electronics", "count": 42}],
"brand": [{"value": "BrandX", "count": 15}]
},
"total": 156,
"page": 0,
"size": 10
}
Request Parameters
- q (string, required): Search query
- size (integer, default 10): Number of results per page
- page (integer, default 0): Page number (0-indexed)
- filters (object): Key-value pairs for filtering
- sort (string): Sort order (relevance, price_asc, price_desc, date_desc, etc.)
- facets (array): Fields to return facet counts for
Authentication
Include your API key in the URL path. Keep it secure; do not expose in client-side code for sensitive operations.
Rate Limiting
Standard rate limits apply. Contact support for higher limits.
Error Codes
- 200: Success
- 400: Bad request (invalid parameters)
- 401: Unauthorized (invalid API key)
- 404: Organization not found
- 429: Rate limit exceeded
- 500: Server error
Code Examples
cURL
curl -X POST "https://api.expertrec.com/organisation/YOUR_ORG_ID/YOUR_API_KEY/srh_post" \
-H "Content-Type: application/json" \
-d '{"q": "blue shoes", "size": 10}'
JavaScript (fetch)
const response = await fetch(
'https://api.expertrec.com/organisation/YOUR_ORG_ID/YOUR_API_KEY/srh_post',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ q: 'blue shoes', size: 10 })
}
);
const data = await response.json();
Python (requests)
import requests
response = requests.post(
f'https://api.expertrec.com/organisation/{org_id}/{api_key}/srh_post',
json={'q': 'blue shoes', 'size': 10}
)
results = response.json()