SL
SemiLayer · Live Demo
ask anything. no backend.

Semantic search

Ask in plain English — “spicy ramen”, “something sweet for breakfast”, “organic oat milk”. The layer returns the products that mean what you asked, not the ones that happen to share your keywords.

Try:

The entire integration

One publishable key. That's it — copy the call into curl, any fetch, any HTTP client. The key carries scope.

POST https://api.semilayer.com/v1/search/food_products
Authorization: Bearer pk_...
Content-Type: application/json

{
  "query": "dark chocolate with hazelnuts",
  "limit": 20
}

What the layer is doing

Somewhere behind this page a food_products lens was declared. SemiLayer took care of understanding it, indexing it, and keeping it fresh. You get one endpoint to ask in words, another to ask in shape, a third to compose a live feed. The data never moves.

// one lens, every surface on this page.
food_products: {
  facets: {
    search:  { fields: ['name', 'description', 'brand', 'tags'] },
    similar: { fields: ['name', 'description', 'brand', 'tags'] },
    feed: {
      discover:  { /* similarity + recency */ },
      latest:    { /* pure recency */ },
      relatedTo: { /* recordVector seed */ },
    },
  },
  rules: {
    query:   'public',
    search:  'public',
    similar: 'public',
    feed:    { discover: 'public', latest: 'public', relatedTo: 'public' },
  },
}