Headless APIAPI Reference
Search
Fuzzy search across products, collections, blog posts, pages, and policies.
Search store
Returns search results across all content types in your store. The search is typo-tolerant and uses trigram matching, so "cotten" still finds "cotton". Results are ranked by relevance with products weighted highest.
GET /v1/searchAuth: Publishable or secret key
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
q | string | required | Search term (minimum 2 characters) |
limit | integer | 20 | Max product results (1-50). Other types are capped at 10. |
Response
Results are grouped by content type. Each group is an array sorted by relevance.
{
"data": {
"products": [
{
"title": "Classic Tee",
"handle": "classic-tee",
"description": "A comfortable everyday tee...",
"image_url": "https://cdn.quantm7.com/store/products/abc123.webp",
"price": 29.99,
"compare_at_price": 39.99,
"vendor": "Basics Co",
"product_type": "Apparel"
}
],
"collections": [
{
"title": "Summer 2026",
"handle": "summer-2026",
"description": "Lightweight styles for warm weather.",
"image_url": "https://cdn.quantm7.com/store/collections/summer.webp"
}
],
"blog_posts": [
{
"title": "Summer Style Guide",
"handle": "summer-style-guide",
"description": "Five looks to take you from beach to bar.",
"image_url": "https://cdn.quantm7.com/store/blog/summer-guide.webp"
}
],
"pages": [],
"policies": []
}
}Search ranking
Results are scored using a combination of exact matches and trigram similarity:
- SKU match (products only) scores highest
- Title match scores next
- Vendor or product type match follows
- Description match scores last
- Fuzzy similarity catches typos and partial matches
Content types are boosted differently: products (1.0x), collections (0.5x), blog posts (0.3x), pages (0.2x), policies (0.15x).
Errors
| Status | Code | Message |
|---|---|---|
| 400 | bad_request | Search query must be at least 2 characters |
Examples
Search for products:
curl "https://api.quantm7.com/v1/search?q=cotton+tee" \
-H "Authorization: Bearer q7_pk_your_key"Limit results:
curl "https://api.quantm7.com/v1/search?q=summer&limit=5" \
-H "Authorization: Bearer q7_pk_your_key"