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

# Search evidence

> Search for evidence across multiple completed runs. Filter by element keys, text query, call types, call owners, and date range. Useful for finding specific quotes or patterns across analyses.

<Tip>Unlike [Get run evidence](/api-reference/slice-runs/get-run-evidence) which returns evidence for a single run, this endpoint searches across all your completed runs — useful for trend analysis or finding recurring themes.</Tip>


## OpenAPI

````yaml /api/openapi.yaml post /api/public/v1/evidence/search
openapi: 3.1.0
info:
  title: OnePerfectSlice API
  version: 1.0.0
  description: |
    Programmatic access to OnePerfectSlice. Authenticate with a team-scoped
    API key (Bearer sk_...) obtained from Org Settings → API Keys.
servers:
  - url: https://app.oneperfectslice.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /api/public/v1/evidence/search:
    post:
      tags:
        - Slice Runs
      summary: Search evidence
      description: >-
        Search for evidence across multiple completed runs. Filter by element
        keys, text query, call types, call owners, and date range. Useful for
        finding specific quotes or patterns across analyses.
      operationId: searchEvidence
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicEvidenceSearchRequest'
            example:
              elementKeys:
                - intent_signal
              query: budget
              limit: 10
      responses:
        '200':
          description: Matching evidence items
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    properties:
                      matches:
                        type: array
                        items:
                          type: object
              example:
                data:
                  matches:
                    - quote: We're aiming to have a vendor selected by end of Q2.
                      source:
                        type: transcript
                        id: file:98123
                        label: Acme Corp — Discovery Call
                        date: '2026-04-12'
                      confidence: 0.91
                      elementKey: intent_signal
                      runId: 12345
        '400':
          description: Invalid request body or filters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          description: Evidence request timed out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    PublicEvidenceSearchRequest:
      type: object
      description: Evidence search filters. At least one element key is required.
      required:
        - elementKeys
      properties:
        elementKeys:
          type: array
          items:
            type: string
          description: >-
            Element keys to search for (e.g., ["intent_signal",
            "budget_confirmation"])
        query:
          type: string
          description: Free-text search across evidence quotes
        callTypes:
          type: array
          items:
            type: string
          maxItems: 100
          description: Filter by call type keys (e.g., ["discovery_call"])
        callOwnerEmails:
          type: array
          items:
            type: string
          description: Filter by call owner emails
        dateFrom:
          type: string
          format: date
          description: Start date (inclusive)
        dateTo:
          type: string
          format: date
          description: End date (inclusive)
        limit:
          type: integer
          minimum: 1
          maximum: 100
          description: Maximum results to return (default varies)
    ApiError:
      type: object
      description: Standard error envelope for all public API error responses
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE error code
              example: INVALID_TOKEN
            message:
              type: string
              description: Human-readable error description
              example: Token is invalid
            details:
              type: object
              description: Optional additional error context
              additionalProperties: true
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingToken:
              value:
                error:
                  code: MISSING_TOKEN
                  message: Authorization header with Bearer token is required
            invalidToken:
              value:
                error:
                  code: INVALID_TOKEN
                  message: Token is invalid
            tokenRevoked:
              value:
                error:
                  code: TOKEN_REVOKED
                  message: Token has been revoked
            tokenExpired:
              value:
                error:
                  code: TOKEN_EXPIRED
                  message: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with sk_ prefix. Create one in Org Settings → API Keys.
      x-default: sk_your_api_key

````