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

# Search products

> Search products by name, SKU, or a substring.



## OpenAPI

````yaml /openapi-public.yml get /api/v1/search/products
openapi: 3.0.3
info:
  title: Blend API
  version: 1.0.0
  description: API for Blend
servers:
  - url: https://api.byblend.com
    description: Blend production server
security:
  - bearerAuth: []
tags:
  - name: Orders
    description: Order management endpoints
  - name: Patients
    description: Patient management endpoints
  - name: Reports
    description: Reporting endpoints
  - name: Products and Materials
    description: Product catalog and inventory endpoints
  - name: Electronic Prescriptions
    description: Electronic prescription management endpoints
  - name: Prescriptions
    description: Prescription management endpoints
  - name: Authentication
    description: Authentication endpoints
  - name: Notifications
    description: User management endpoints
  - name: Prescribers
paths:
  /api/v1/search/products:
    get:
      tags:
        - Search
      summary: Search products
      description: Search products by name, SKU, or a substring.
      parameters:
        - name: q
          in: query
          required: true
          description: Search query
          schema:
            type: string
            example: rapamycin
        - name: limit
          in: query
          required: false
          description: >-
            Optional limit on the number of results to return. Max is 100,
            default is 50.
          schema:
            type: integer
            example: 10
      responses:
        '200':
          description: Successful response with array of products
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      anyOf:
                        - title: Prescription product
                          type: object
                          allOf:
                            - $ref: '#/components/schemas/SearchRank'
                            - type: object
                              properties:
                                result_type:
                                  type: string
                                  enum:
                                    - prescription
                            - $ref: '#/components/schemas/ProductPrescriptionFull'
                        - title: Non-prescription product
                          type: object
                          allOf:
                            - $ref: '#/components/schemas/SearchRank'
                            - type: object
                              properties:
                                result_type:
                                  type: string
                                  enum:
                                    - non_prescription
                            - $ref: '#/components/schemas/ProductNonPrescriptionFull'
                        - title: Order material
                          type: object
                          allOf:
                            - $ref: '#/components/schemas/SearchRank'
                            - type: object
                              properties:
                                result_type:
                                  type: string
                                  enum:
                                    - order_material
                            - $ref: '#/components/schemas/ProductOrderMaterialFull'
components:
  schemas:
    SearchRank:
      type: object
      properties:
        rank:
          type: number
          example: 0.7
          description: >-
            Ranking score of the search result, from 0 to 1, indicating
            relevance to the search query
    ProductPrescriptionFull:
      allOf:
        - $ref: '#/components/schemas/ProductBase'
        - $ref: '#/components/schemas/ProductPrescription'
    ProductNonPrescriptionFull:
      allOf:
        - $ref: '#/components/schemas/ProductBase'
        - $ref: '#/components/schemas/ProductNonPrescription'
    ProductOrderMaterialFull:
      allOf:
        - $ref: '#/components/schemas/ProductBase'
        - $ref: '#/components/schemas/ProductOrderMaterial'
    ProductBase:
      allOf:
        - $ref: '#/components/schemas/ID'
        - $ref: '#/components/schemas/Timestamps'
        - type: object
          properties:
            sku:
              type: string
              example: '1234567890'
              description: Unique inventory identifier for the product
    ProductPrescription:
      type: object
      properties:
        name:
          type: string
          example: Mupirocin
        description:
          type: string
          example: A topical cream that is used to treat skin infections.
        product_code:
          type: string
          example: SUPERSPRAY15
          description: >-
            Customer reference for the product for use in electronic
            prescriptions.
        form:
          type: string
          example: cream
          description: Optional form of the product for customer use, if desired.
        is_active:
          type: boolean
          example: true
          description: Whether the product is currently active for purchase or prescription
        label_orientation:
          type: string
          example: portrait
          description: >-
            Orientation of the printed product label, either `portrait` or
            `landscape`.
        strength:
          type: string
          example: 1%
          description: Optional strength of the product for customer use, if desired.
    ProductNonPrescription:
      type: object
      properties:
        name:
          type: string
          example: Krill Farms Fish Oil
        description:
          type: string
          example: A fish oil supplement complementary to prescribed products.
        form:
          type: string
          example: liquid
          description: Optional form of the product for customer use, if desired.
        is_active:
          type: boolean
          example: true
          description: Whether the product is currently active for purchase
    ProductOrderMaterial:
      type: object
      properties:
        name:
          type: string
          example: Referral Brochure
        description:
          type: string
          example: Customer brochure included in every shipment.
        category:
          type: string
          example: marketing
        current_stock:
          type: integer
          example: 927
        reorder_threshold:
          type: integer
          example: 100
        has_inventory:
          type: boolean
          example: true
          description: Whether the product has any inventory associated with it
        is_global:
          type: boolean
          example: false
          description: >-
            Whether the material is customer-specific or Blend-wide (e.g.
            regulatory inserts)
    ID:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
          example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
    Timestamps:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: Date and time of creation
          example: '2025-03-15T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: Date and time of last update
          example: '2025-03-15T12:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````