> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kicks.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Filtering products by criteria

> How to use filters to get products from KicksDB

KicksDB relies on Meilisearch to search and filter products, our following endpoints uses Meilisearch under the hood:

* StockX
* GOAT
* Shopify
* Kream

These endpoints often have `query` parameter to search for products and `filters` parameter to filter products based on certain criteria. This recipe will show you how to use `filters` parameter.

## Filtering products

You should consult the structure of the indexes below to understand the available filters.

For example, if you want to filter products by brand, you can use the `brand` filter, like this:

```js theme={null}
brand = "Nike";
```

Due to special characters, you might have to [encode the filters](https://www.urlencoder.org/) to avoid errors, it should give a result like this:

```http theme={null}
GET https://api.kicks.dev/v3/stockx/products?filters=brand%3D%22Nike%22
```

It's possible to combine multiple filters, like this:

```js theme={null}
brand = "Nike" AND product_type = "sneakers";
```

Finally, some filters use nested objects, like this:

```js theme={null}
prices["USD_US"]["9.5"] < 100;
```

<Info>Values in quotes are not case sensitive.</Info>

<Card href="https://www.meilisearch.com/docs/reference/api/search#filter" title="Meilisearch documentation" icon="book">
  You can consult the Meilisearch documentation for more information about the
  filters.
</Card>

## Indexes

Indexes are refreshed every 12 hours, you can consult the structure of the indexes below.

<Columns cols={2}>
  <Card href="#stockx" title="StockX" icon="globe" />

  <Card href="#goat" title="GOAT" icon="globe" />

  <Card href="#shopify" title="Shopify" icon="shopify" />

  <Card href="#kream" title="Kream" icon="globe" />

  <Card href="#snkrs" title="SNKRS" icon="globe" />

  <Card href="#novelship" title="Novelship" icon="globe" />
</Columns>

### StockX

```json theme={null}
{
  "slug": "string",
  "brand": "string",
  "gender": "string",
  "product_type": "string",
  "category": "string",
  "secondary_category": "string",
  "categories": ["string"],
  "sku": "string",
  "rank": "number",
  "release_date": "string",
  "colorway": "string",
  "barcodes": ["string"],
  "breadcrumbs": ["string"],
  "updated_at": "date-time",
  "created_at": "date-time"
}
```

### GOAT

```json theme={null}
{
  "brand": "string",
  "slug": "string",
  "sku": "string",
  "colorway": "string",
  "release_date": "string", // Format: YYYYMMDD or YYYY
  "rank": "number",
  "product_type": "string",
  "category": "string",
  "model": "string",
  "season": "string"
}
```

### Shopify

```json theme={null}
{
  "id": "string",
  "product_id": "number",
  "title": "string", // searchable
  "slug": "string", // searchable, filterable
  "brand": "string", // searchable, filterable
  "product_type": "string", // searchable, filterable
  "sku": "string", // searchable, filterable
  "tags": ["string"],
  "shop_name": "string", // filterable
  "updated_at": "string", // sortable
  "published_at": "string", // sortable
  "prices": {
    // filterable
    "string": "number" // size: price
  },
  "barcodes": ["string"], // filterable
  "cursor": "number" // filterable, sortable
}
```

### Kream

```json theme={null}
{
  "id": "number", // sortable
  "name": "string", // searchable
  "brand": "string", // searchable, filterable
  "category": "string", // searchable, filterable
  "colorway": "string", // searchable, filterable
  "gender": "string", // filterable
  "sku": "string", // searchable, filterable
  "release_date": "string" // filterable, sortable
}
```

### SNKRS

```json theme={null}
{
  "id": "string",
  "country_code": "string", // filterable
  "title": "string", // searchable
  "subtitle": "string", // searchable
  "slug": "string", // searchable, filterable
  "skus": ["string"], // searchable, filterable
  "barcodes": ["string"], // searchable, filterable
  "product_type": "string", // filterable
  "status": "string", // filterable
  "exclusive": "boolean", // filterable
  "start_date": "string" // filterable
}
```

### Novelship

```json theme={null}
{
  "id": "string",
  "name": "string", // searchable
  "brand": "string", // searchable, filterable
  "slug": "string", // searchable, filterable
  "sku": "string", // searchable, filterable
  "colorway": "string", // filterable
  "release_date": "string", // filterable
  "retail_price": "number", // filterable
  "product_type": "string", // filterable
  "model": "string", // searchable, filterable
  "season": "string" // filterable
}
```
