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

FieldDescription
foundTotal matching documents
hitsResults. Each hit has document and highlights
facetCountsCounts per facet field and value
pageCurrent page
queryIdKeep 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?

On this page