Content Search API endpoint to run semantic searches across blog articles, knowledge base pages, and other content using AI similarity matching.
Documentation Index
Fetch the complete documentation index at: https://docs.uselayers.com/llms.txt
Use this file to discover all available pages before exploring further.
<YOUR_LAYERS_TOKEN>."article" and "page". When omitted, all content types are searched and results from both articles and pages are returned together.content_type filter is applied. Each item includes:| Header | Description |
|---|---|
x-request-id | A unique identifier (ULID) for the request. Use it to correlate requests across your infrastructure or when contacting support. |
x-layers-build | The Layers build version that served the request. |
| Content type | __typename | Description |
|---|---|---|
| Articles | "Article" | Blog posts from your Shopify blog. Includes author, tags, and blog association. |
| Pages | "Page" | Shopify pages (e.g., About Us, FAQ, Size Guide). Includes featured images when available. |
content_type parameter, results from both articles and pages are returned together, ranked by a unified scoring model. Use the __typename field to distinguish between content types when rendering results.
| Signal group | Default weight | What it measures |
|---|---|---|
| Semantic (text) | 50% | How closely the content text matches the meaning of the query |
| Semantic (image) | 20% | How closely the content’s images match the query |
| Freshness | 30% | How recently the content was published (newer items score higher) |
tuning.rankingWeightOverrides parameter. For product search testing, use Test text search in Lab.
totalResults: 0 rather than throwing an error. This ensures graceful degradation of the search experience.
seo.hidden metafield is included in search results.