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

# Get Catalog Search

> LLM-shape full-text search across the merchant's active catalog.

Same engine as `/api/storefront/search` (tsvector ranked by
`ts_rank_cd`); per-product output is `AgentCatalogProduct` with
`summary_for_llm` baked in so the agent doesn't need a follow-up
call to render candidate cards.

Tenant scope is enforced by `SearchService.full` filtering on the
caller's resolved `merchant_id`. The caller's scope set must
include `catalog:read` (gate via `require_agent_scopes`).



## OpenAPI

````yaml /api-reference/openapi.json get /api/agent/catalog/search
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/agent/catalog/search:
    get:
      tags:
        - Agent
        - Agent Catalog
      summary: Get Catalog Search
      description: |-
        LLM-shape full-text search across the merchant's active catalog.

        Same engine as `/api/storefront/search` (tsvector ranked by
        `ts_rank_cd`); per-product output is `AgentCatalogProduct` with
        `summary_for_llm` baked in so the agent doesn't need a follow-up
        call to render candidate cards.

        Tenant scope is enforced by `SearchService.full` filtering on the
        caller's resolved `merchant_id`. The caller's scope set must
        include `catalog:read` (gate via `require_agent_scopes`).
      operationId: get_catalog_search_api_agent_catalog_search_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 256
            title: Q
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            default: 20
            title: Limit
        - name: X-Site-ID
          in: header
          required: true
          schema:
            type: string
            title: X-Site-Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCatalogSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentCatalogSearchResponse:
      properties:
        query:
          type: string
          title: Query
        products:
          items:
            $ref: '#/components/schemas/AgentCatalogProduct'
          type: array
          title: Products
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        pages:
          type: integer
          title: Pages
      type: object
      required:
        - query
        - products
        - total
        - page
        - limit
        - pages
      title: AgentCatalogSearchResponse
      description: |-
        Response shape for `GET /api/agent/catalog/search`.

        Mirrors `StorefrontSearchResponse` for paginator semantics so any
        Phase 7 SDK can share the underlying client; the per-product
        shape is the LLM-friendly `AgentCatalogProduct`.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentCatalogProduct:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        vendor:
          anyOf:
            - type: string
            - type: 'null'
          title: Vendor
        product_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Type
        tags:
          items:
            type: string
          type: array
          title: Tags
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        price_min_cents:
          type: integer
          title: Price Min Cents
        price_max_cents:
          type: integer
          title: Price Max Cents
        currency:
          type: string
          title: Currency
        in_stock:
          type: boolean
          title: In Stock
        total_inventory:
          type: integer
          title: Total Inventory
        variant_count:
          type: integer
          title: Variant Count
        variants:
          items:
            $ref: '#/components/schemas/AgentCatalogVariant'
          type: array
          title: Variants
        summary_for_llm:
          type: string
          title: Summary For Llm
      type: object
      required:
        - id
        - name
        - slug
        - description
        - vendor
        - product_type
        - tags
        - image_url
        - price_min_cents
        - price_max_cents
        - currency
        - in_stock
        - total_inventory
        - variant_count
        - variants
        - summary_for_llm
      title: AgentCatalogProduct
      description: |-
        LLM-shape product.

        `summary_for_llm` is the single-paragraph natural-language summary
        an LLM can read to decide if this matches a user's intent. The
        structured fields below it are for follow-up calls (cart adds,
        detail renders) and reasoning attribution. Keep this shape FLAT —
        LLMs handle nesting poorly.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AgentCatalogVariant:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        title:
          type: string
          title: Title
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
        price_cents:
          type: integer
          title: Price Cents
        options:
          additionalProperties: true
          type: object
          title: Options
        inventory_quantity:
          type: integer
          title: Inventory Quantity
        in_stock:
          type: boolean
          title: In Stock
      type: object
      required:
        - id
        - title
        - price_cents
        - options
        - inventory_quantity
        - in_stock
      title: AgentCatalogVariant
      description: |-
        LLM-shape product variant. Inventory snapshot included so the
        LLM doesn't hand the customer a candidate that's out of stock.

````