The Discovery API is the API which is designed to power your storefront with product information and marketing content. It is a read only API that is distributed and designed for read performance. You can browse, search, filter, facet and sort your data from Crystallize via the Discovery API.
It is designed to replace the catalogue API and search API (to be deprecated) as one API for fetching data from your Crystallize tenant. Discovery is a semantic API which means that the API signature follows the structure of your shapes and the components on your shape.
The Discovery API is a powerful, flexible API for querying and retrieving content from Crystallize. It is a read-only API, distributed and optimized for read performance, designed to power storefronts with product information and marketing content. From a single GraphQL endpoint you can browse, search, filter, facet, sort, paginate, rank, and personalize results across your entire catalogue.
You can access the Discovery API from the following URL. Remember to replace the tenant-name with your tenant identifier.
https://api.crystallize.com/tenant-name/discoveryhttps://api.crystallize.com/tenant-name/discoveryAll queries in this Discovery documentation are connected to the demo site Furnitut which is using a best practice setup for content modeling. You can check out our open-source Next.js commerce storefront accelerator which is built on top of this tenant.
By default, the Discovery API is a public, open endpoint that requires no authentication. If you configure a static authentication token for your tenant, every request must include it in the X-Crystallize-Static-Auth-Token header; requests without a valid token are rejected.
Send your queries as POST requests to the base URL. Open the same URL in a browser (a GET request) to launch the built-in GraphiQL IDE, where you can explore the tenant-specific schema and run queries interactively.
Optionally, pass the X-Discovery-Feature-Flags header (a comma-separated list) to opt into experimental capabilities.
The Discovery API is designed for flexible data access, but exposing it without proper protection in a production environment can pose security risks. Always secure your API with authentication in production.
The Discovery API brings together everything you need to query your catalogue from a single endpoint:
The Discovery API exposes a few top-level query types. Each has its own dedicated page with in-depth guidance and examples:
For commerce use cases, the API resolves price-list-aware pricing alongside your results. priceRange returns the minimum and maximum price across a result set, priceFor resolves the best price for a given price variant and markets (with optional quantity-tier matching), and bestPriceList reveals which price list produced that best price. See the Discovery Queries page for details.
Score variations are expected and can arise from corpus updates (e.g. BM25 recalculation) or internal segment merges. Additionally, when multiple documents receive the same score, the engine does not guarantee which one is returned first — tied results may appear in any order. Without an explicit secondary sort, this can lead to random-looking result order and even duplication or omission when paginating. To ensure a stable and reproducible order, always include a deterministic sort field alongside the score (e.g. sort by score first, then by a unique field like itemId).
When paginating search results, using `skip` is discouraged. Offset-based pagination forces the engine to scan and discard rows up to the offset on every request, which becomes increasingly slow as you move deeper in the result set.
A paginationToken (a.k.a. cursor-based pagination) solves these issues. Instead of saying “give me page N”, it says “continue after this exact last document”. It prevents random reordering, avoids duplication between pages, and scales correctly on large datasets.
In short:
Use paginationToken (combined with after). for correctness and performance; avoid skip for real-world pagination.