> ## 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.

# Hourly search funnel: searches, clicks, carts, orders, revenue

> The storefront search funnel per hour, plus exact per-window totals counted in searches. Revenue is attributed by the one Depict rule and converted to `currency`. Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /search-reports/funnel
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:
  /search-reports/funnel:
    get:
      summary: 'Hourly search funnel: searches, clicks, carts, orders, revenue'
      description: >-
        The storefront search funnel per hour, plus exact per-window totals
        counted in searches. Revenue is attributed by the one Depict rule and
        converted to `currency`. Takes the current and previous windows
        (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for
        period-over-period comparison. Read-only.
      operationId: searchReportFunnel
      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: App Bridge session token, when not sent as a bearer header.
          required: false
          description: App Bridge session token, when not sent as a bearer header.
          name: id_token
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
            description: Current window start, inclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          required: true
          description: Current window start, inclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          name: from_ts
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
            description: Current window end, exclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          required: true
          description: Current window end, exclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          name: to_ts
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
            description: Previous window start, inclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          required: true
          description: Previous window start, inclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          name: prev_from_ts
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
            description: Previous window end, exclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          required: true
          description: Previous window end, exclusive ("YYYY-MM-DD HH:MM:SS", UTC)
          name: prev_to_ts
          in: query
        - schema:
            type: string
            pattern: ^[A-Za-z_+\-/0-9]{1,64}$
            description: IANA timezone the pipes bucket hours/days in; UTC when omitted.
          required: false
          description: IANA timezone the pipes bucket hours/days in; UTC when omitted.
          name: tz
          in: query
        - schema:
            type: string
            pattern: ^[A-Z0-9]{2}$
            description: Two-letter country code to narrow to.
          required: false
          description: Two-letter country code to narrow to.
          name: country
          in: query
        - schema:
            type: string
            pattern: ^[A-Z]{3}$
            description: ISO 4217 code the money is converted to; USD when omitted.
          required: false
          description: ISO 4217 code the money is converted to; USD when omitted.
          name: currency
          in: query
      responses:
        '200':
          description: The report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchReportsFunnelResponse'
        '400':
          description: >-
            The query, path or body failed the 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:
    SearchReportsFunnelResponse:
      type: object
      properties:
        current:
          type: array
          items:
            $ref: '#/components/schemas/SearchReportsFunnelRow'
        previous:
          type: array
          items:
            $ref: '#/components/schemas/SearchReportsFunnelRow'
        totals:
          type: object
          properties:
            current:
              $ref: '#/components/schemas/SearchReportsFunnelStageTotals'
            previous:
              $ref: '#/components/schemas/SearchReportsFunnelStageTotals'
          required:
            - current
            - previous
      required:
        - current
        - previous
        - totals
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    SearchReportsFunnelRow:
      type: object
      properties:
        hour:
          type: string
        searches:
          type: number
        no_results:
          type: number
        sessions_with_search:
          type: number
        clicks:
          type: number
        searches_with_click:
          type: number
        add_to_carts:
          type: number
        purchases:
          type: number
        sessions_with_purchase:
          type: number
        searches_with_cart:
          type: number
          description: Searches that led to a cart, one per search.
        searches_with_order:
          type: number
          description: Searches that led to an order, one per search.
        revenue:
          type: number
          description: Attributed revenue in the requested currency.
      required:
        - hour
        - searches
        - no_results
        - sessions_with_search
        - clicks
        - searches_with_click
        - add_to_carts
        - purchases
        - sessions_with_purchase
        - revenue
    SearchReportsFunnelStageTotals:
      type: object
      properties:
        searches:
          type: number
        searches_with_click:
          type: number
        searches_with_cart:
          type:
            - number
            - 'null'
          description: >-
            null = not measured: the runway pipe predates the column and the
            shop has no Lite order feed. Never render as 0.
        searches_with_order:
          type:
            - number
            - 'null'
          description: >-
            null = not measured: the runway pipe predates the column and the
            shop has no Lite order feed. Never render as 0.
      required:
        - searches
        - searches_with_click
        - searches_with_cart
        - searches_with_order
      description: One window's funnel counted in searches, exact over the window.
  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.

````