> For the complete documentation index, see [llms.txt](https://fredhopper.gitbook.io/product-discovery/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fredhopper.gitbook.io/product-discovery/resources/archived-pages/introduction/get-started.md).

# Getting started

Step-by-step guide on how to use XO Search and make your first search query

## Setting up

{% content-ref url="<https://github.com/Attraqt/product-discovery-documentation/blob/main/new-docs/Archive/xo-search/broken-reference/README.md>" %}
<https://github.com/Attraqt/product-discovery-documentation/blob/main/new-docs/Archive/xo-search/broken-reference/README.md>
{% endcontent-ref %}

## Making your first query

In this example, the items matching the `"Pants"` query are fetched, and then displayed to the debug console.

```javascript
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);
  }
});
```

{% hint style="success" %}
Easy, right ?
{% endhint %}

## What's next?

To go further in your implementation, you can refer to:

{% content-ref url="/pages/mNjxOXcVI46TYsaPxTpT" %}
[Search](/product-discovery/resources/archived-pages/introduction/api-parameters/search.md)
{% endcontent-ref %}

{% content-ref url="/pages/zG0bmbs7itZy1zY5WnXM" %}
[Pagination](/product-discovery/resources/archived-pages/introduction/api-parameters/pagination.md)
{% endcontent-ref %}

{% content-ref url="/pages/iL6keUDkVT6nU1rwYksz" %}
[Faceting](/product-discovery/resources/archived-pages/introduction/api-parameters/faceting.md)
{% endcontent-ref %}

{% content-ref url="/pages/BxiiEGXPkaEy5RGjrK7J" %}
[Sorting](/product-discovery/resources/archived-pages/introduction/api-parameters/sorting.md)
{% endcontent-ref %}

{% content-ref url="/pages/wHzTRAalMOgmYg7uYjqk" %}
[Grouping](/product-discovery/resources/archived-pages/introduction/api-parameters/grouping.md)
{% endcontent-ref %}

{% content-ref url="/pages/JPoZouwHdcBWni3M46fC" %}
[Filtering](/product-discovery/resources/archived-pages/introduction/api-parameters/filtering.md)
{% endcontent-ref %}

If you want to use the API directly, without installing any SDK, you might be interested in this page:

{% content-ref url="/pages/9oz6YlEAkw7zR7txwjhG" %}
[API Reference](/product-discovery/resources/archived-pages/introduction/api.md)
{% endcontent-ref %}
