Getting started
Step-by-step guide on how to use XO Search and make your first search query
Setting up
https://github.com/Attraqt/product-discovery-documentation/blob/main/new-docs/Archive/xo-search/broken-reference/README.mdMaking your first query
In this example, the items matching the "Pants"
query are fetched, and then displayed to the debug console.
xo.search.query('Pants').then((response) => {
response.items.forEach((item, index) => {
console.log(`Item #${index}`);
console.log(item);
});
}).catch((error) => {
if (error.message) {
console.error(error.message);
} else {
console.error('Unknown error', error);
}
});
Easy, right ?
What's next?
To go further in your implementation, you can refer to:
SearchPaginationFacetingSortingGroupingFilteringIf you want to use the API directly, without installing any SDK, you might be interested in this page:
API ReferenceLast updated