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

# Search or page through a merchant's products

> Finds products whose title, any variant SKU, product id or any tag contains `query` (case-insensitive); an exact product-id match sorts first. A blank `query` pages the whole catalogue, or one collection with `collection_id` (in the collection's order unless `sort` is given), and also returns the scope's `total`. Read-only. Use it to look up products by name/SKU/id before calling the per-product routes.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /products
openapi: 3.1.0
info:
  title: Search & Merchandising API
  version: 1.0.0
  description: >-
    REST API behind Depict: Search & Merchandising, the native Shopify app:
    onboarding, collections, boost & bury, dashboards, A/B testing and
    multi-store management. Endpoints are served under the /api/lite prefix and
    are authenticated with the Shopify session token that App Bridge issues to
    the embedded app.
servers:
  - url: /api/lite
security:
  - ShopifySessionToken: []
paths:
  /products:
    get:
      summary: Search or page through a merchant's products
      description: >-
        Finds products whose title, any variant SKU, product id or any tag
        contains `query` (case-insensitive); an exact product-id match sorts
        first. A blank `query` pages the whole catalogue, or one collection with
        `collection_id` (in the collection's order unless `sort` is given), and
        also returns the scope's `total`. Read-only. Use it to look up products
        by name/SKU/id before calling the per-product routes.
      operationId: productSearch
      parameters:
        - schema:
            type: string
            description: Lite merchant id, e.g. `shopify-<shop id>`.
          required: true
          description: Lite merchant id, e.g. `shopify-<shop id>`.
          name: merchant_id
          in: query
        - schema:
            type: string
            description: Text to match; omit or leave blank to browse.
          required: false
          description: Text to match; omit or leave blank to browse.
          name: query
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          required: false
          name: limit
          in: query
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            default: 0
          required: false
          name: offset
          in: query
        - schema:
            type: string
            description: >-
              Limit to this Shopify collection's products; an empty value means
              no limit.
          required: false
          description: >-
            Limit to this Shopify collection's products; an empty value means no
            limit.
          name: collection_id
          in: query
        - schema:
            type: string
            enum:
              - title
            description: >-
              Order by title. Without it: collection order when scoped, else
              exact-id match then title.
          required: false
          description: >-
            Order by title. Without it: collection order when scoped, else
            exact-id match then title.
          name: sort
          in: query
      responses:
        '200':
          description: One page of products.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductSearchResponse'
        '400':
          description: The query failed its schema; `detail` carries zod's messages.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '401':
          description: Not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '403':
          description: Authenticated, but this identity may not call the API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '404':
          description: Merchant not found for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    ProductSearchResponse:
      type: object
      properties:
        products:
          type: array
          items:
            $ref: '#/components/schemas/LiteProduct'
        total:
          type:
            - integer
            - 'null'
          description: >-
            Size of the scope (the catalogue, or `collection_id`'s products)
            when `query` is blank; null when a text query is given.
      required:
        - products
        - total
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    LiteProduct:
      type: object
      properties:
        main_product_id:
          type: string
          description: Shopify product id (numeric string).
        title:
          type: string
        handle:
          type: string
        images:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyImage'
        tags:
          type: array
          items:
            type: string
        price:
          type:
            - number
            - 'null'
        status:
          $ref: '#/components/schemas/ProductStatus'
        has_online_store_channel:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the Online Store sales channel is enabled; null when
            ingestion has not stamped it.
        in_stock:
          type: boolean
        quantity:
          type: integer
          description: Summed available quantity over variants.
        badges:
          type: array
          items:
            $ref: '#/components/schemas/ProductBadge'
        skus:
          type: array
          items:
            type: string
        created_at:
          type: string
        published_at:
          type:
            - string
            - 'null'
        variants:
          type: array
          items:
            $ref: '#/components/schemas/LiteVariant'
      required:
        - main_product_id
        - title
        - handle
        - images
        - tags
        - price
        - status
        - has_online_store_channel
        - in_stock
        - quantity
        - badges
        - skus
        - created_at
        - published_at
        - variants
    ShopifyImage:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        width:
          type:
            - integer
            - 'null'
        height:
          type:
            - integer
            - 'null'
        alt:
          type:
            - string
            - 'null'
      required:
        - id
        - url
    ProductStatus:
      type: string
      enum:
        - ACTIVE
        - ARCHIVED
        - DRAFT
        - SCHEDULED
        - UNLISTED
    ProductBadge:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - on_sale
            sale_percentage:
              type: number
            markets_on_sale:
              type:
                - array
                - 'null'
              items:
                type: object
                properties:
                  market_id:
                    type: string
                  display_name:
                    type: string
                required:
                  - market_id
                  - display_name
              description: Markets where the product is on sale, when not all are.
            total_markets:
              type:
                - integer
                - 'null'
            market_group_display_name:
              type:
                - string
                - 'null'
          required:
            - type
            - sale_percentage
        - type: object
          properties:
            type:
              type: string
              enum:
                - out_of_stock
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - partially_out_of_stock
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - partially_low_stock
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - new_in
            published_at:
              type: string
            date_source:
              type: string
              enum:
                - published_at
                - created_at
          required:
            - type
            - published_at
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - bestseller
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - bestseller_revenue
            currency:
              type:
                - string
                - 'null'
              description: ISO currency of `value`.
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - slow_mover
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - trending
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - trending_revenue
            currency:
              type:
                - string
                - 'null'
              description: ISO currency of `value`.
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - few_variants_available
            variant_options_available:
              type: array
              items:
                type: object
                additionalProperties:
                  type: string
              description: Option name → value, one entry per variant still available.
            n_variants_total:
              type: integer
          required:
            - type
            - variant_options_available
            - n_variants_total
        - type: object
          properties:
            type:
              type: string
              enum:
                - tag
            tag:
              type: string
          required:
            - type
            - tag
        - type: object
          properties:
            type:
              type: string
              enum:
                - collection
            collection_id:
              type: string
            collection_title:
              type: string
          required:
            - type
            - collection_id
            - collection_title
    LiteVariant:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        sku:
          type:
            - string
            - 'null'
        quantity_available:
          type: integer
        image_url:
          type:
            - string
            - 'null'
        selected_options:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
            required:
              - name
              - value
      required:
        - id
        - title
        - sku
        - quantity_available
        - image_url
        - selected_options
  securitySchemes:
    ShopifySessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Shopify App Bridge session token of the embedded Depict: Search &
        Merchandising app. The shop in the token determines the merchant;
        merchant_id parameters must belong to that shop.

````