Quick start
Run your first Kelp search with curl or the optional JS SDK.
You need a tenant slug, a search-scoped API key, and a collection with documents. Get those from Get your keys. Magento and Liquid can finish the API path with no npm.
curl -X POST https://{TENANT_ID}-search.kelp.click/api/v1/collections/products/search \
-H "Content-Type: application/json" \
-H "X-Api-Key: kelp_pk_..." \
-d '{"q":"shirt","perPage":20}'A Magento or Liquid theme does the same POST from browser fetch, or from a same-origin proxy that attaches the key. See Magento and Shopify Liquid.
What you get back
| Field | Description |
|---|---|
found | Total matching documents |
hits | Results. Each hit has document and highlights |
facetCounts | Counts per facet field and value |
page | Current page |
queryId | Keep this. Send it on later click and cart events. See Events |
A highlight is { "field": "title", "snippet": "..." }. The snippet may contain <mark> tags.
What next?
- Magento or Shopify Liquid - theme mount
- Core concepts - collections, filters,
queryId - Merchandising - pin, boost, bury, hide
- Semantic search - meaning match on search