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

# Search products

> Filter, search and sort products, and optionally export them to XLSX.

Unlike [list](/en/guides/integraciones/e-commerce/api-productos/listar), this endpoint does apply filters, search, scopes and sorting, sent in the request body.

<ParamField path="app_id" type="string" required>
  Your store ID in Jelou Shop.
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number to return.
</ParamField>

<ParamField query="limit" type="integer" default="15">
  Number of results per page (max. 200).
</ParamField>

<ParamField query="download" type="boolean">
  If present, the response is an **XLSX** file with the products matching the filters, instead of JSON.
</ParamField>

<ParamField body="search" type="object">
  Text search object.

  <Expandable title="Search properties">
    <ParamField body="value" type="string" required>
      Text to search in the `name` and `sku` fields.
    </ParamField>

    <ParamField body="case_sensitive" type="boolean" default="false">
      Whether the search is case-sensitive.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="filters" type="object[]">
  List of filters to apply.

  <Expandable title="Properties of each filter">
    <ParamField body="field" type="string" required>
      Field to filter by: `created_at`, `price`, `has_tax` or `categories.id`.
    </ParamField>

    <ParamField body="operator" type="string" default="=">
      Comparison operator. Supported values: `=`, `!=`, `<`, `<=`, `>`, `>=`, `like`, `not like`, `in`, `not in`.
    </ParamField>

    <ParamField body="value" type="string | number | boolean | array" required>
      Filter value. Use an array with the `in` and `not in` operators.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="scopes" type="object[]">
  List of scopes (predefined filters) to apply.

  <Expandable title="Properties of each scope">
    <ParamField body="name" type="string" required>
      Scope name. Available:

      * `withDiscount` — only products with a discount.
      * `withoutDiscount` — only products without a discount.
      * `whereDate` — products created between two dates. Requires `parameters: [from, to]`.
    </ParamField>

    <ParamField body="parameters" type="array">
      Scope parameters. For `whereDate`: `["2026-01-01", "2026-01-31"]`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="sort" type="object[]">
  Result ordering.

  <Expandable title="Properties of each sort">
    <ParamField body="field" type="string" required>
      Field to sort by. Available: `created_at`.
    </ParamField>

    <ParamField body="direction" type="string" default="asc">
      Sort direction: `asc` or `desc`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="includes" type="object[]">
  List of relations to expand in the response.

  <Expandable title="Properties of each include">
    <ParamField body="relation" type="string" required>
      Relation name. Available: `media`, `categories`, `attributes`, `prices`, `variations`, `variations.media`, `variations.productAttributes`, `attributeTypes`, `featureValues`.
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://gateway.jelou.ai/ecommerce/v2/apps/{app_id}/products/search?page=1&limit=20" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "search": {
        "value": "t-shirt",
        "case_sensitive": false
      },
      "filters": [
        { "field": "price", "operator": ">=", "value": 10 },
        { "field": "has_tax", "operator": "=", "value": true }
      ],
      "scopes": [
        { "name": "withDiscount" }
      ],
      "sort": [
        { "field": "created_at", "direction": "desc" }
      ],
      "includes": [
        { "relation": "variations" }
      ]
    }'
  ```
</RequestExample>

<Tip>
  **Searchable fields:** `name`, `sku`
  **Filterable fields:** `created_at`, `price`, `has_tax`, `categories.id`
  **Sortable fields:** `created_at`
  **Scopes:** `withDiscount`, `withoutDiscount`, `whereDate`
  **Available relations:** `media`, `categories`, `attributes`, `prices`, `variations`, `variations.media`, `variations.productAttributes`, `attributeTypes`, `featureValues`
</Tip>

<Note>
  To export the results to XLSX add `?download` to the URL. The response will be the file instead of JSON.
</Note>
