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

# Search

> Unified search across web and internal knowledge.



## OpenAPI

````yaml /openapi.json post /v1/search
openapi: 3.1.0
info:
  title: Ontora API
  description: >-
    Ontora's public API. Covers interview campaigns, transcripts, synthesis
    reports, graph queries, webhooks, and workspace management. 


    **Authentication**: endpoints accept either a Clerk JWT (`Authorization:
    Bearer <token>`) or a workspace API key (`X-API-Key: ont_...`). Workspace
    keys are managed via `/v1/api-keys`.
  version: 0.1.0
servers: []
security:
  - ClerkJWT: []
  - WorkspaceApiKey: []
tags:
  - name: interviews
    description: Campaign CRUD, lifecycle, contacts, question sets.
  - name: campaign-insights
    description: Synthesis outputs — cartography, roadmap, personas, conversations.
  - name: interview-query
    description: Graph RAG query over campaign data.
  - name: interview-export
    description: Markdown / ZIP exports of transcripts and reports.
  - name: api-keys
    description: Manage workspace-scoped API keys for programmatic access.
  - name: webhook-endpoints
    description: Outbound webhook endpoints for automation.
  - name: booking
    description: Public self-scheduling endpoints for interview participants.
  - name: workspaces
    description: Workspace and membership management.
  - name: vaults
    description: Context vault management.
paths:
  /v1/search:
    post:
      tags:
        - search
      summary: Search
      description: Unified search across web and internal knowledge.
      operationId: search_v1_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SearchRequest:
      properties:
        query:
          type: string
          maxLength: 1000
          minLength: 1
          title: Query
        modes:
          items:
            type: string
          type: array
          title: Modes
          description: 'Search modes: web, context, meeting'
          default:
            - context
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
        vault_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Vault Ids
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        top_k:
          type: integer
          maximum: 20
          minimum: 1
          title: Top K
          default: 5
        generate_answer:
          type: boolean
          title: Generate Answer
          default: true
      type: object
      required:
        - query
        - workspace_id
      title: SearchRequest
    SearchResponse:
      properties:
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
        web_results:
          items:
            $ref: '#/components/schemas/WebResult'
          type: array
          title: Web Results
          default: []
        context_chunks:
          items:
            $ref: '#/components/schemas/ContextChunk'
          type: array
          title: Context Chunks
          default: []
        sources:
          items:
            $ref: '#/components/schemas/SourceItem'
          type: array
          title: Sources
          default: []
        modes_used:
          items:
            type: string
          type: array
          title: Modes Used
          default: []
      type: object
      title: SearchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebResult:
      properties:
        title:
          type: string
          title: Title
        url:
          type: string
          title: Url
        snippet:
          type: string
          title: Snippet
        position:
          type: integer
          title: Position
      type: object
      required:
        - title
        - url
        - snippet
        - position
      title: WebResult
    ContextChunk:
      properties:
        text:
          type: string
          title: Text
        doc_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Title
        doc_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Url
        source_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Type
        score:
          type: number
          title: Score
          default: 0
      type: object
      required:
        - text
      title: ContextChunk
    SourceItem:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        source_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Type
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
      type: object
      title: SourceItem
    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
  securitySchemes:
    ClerkJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk-issued RS256 JWT.
    WorkspaceApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key (prefix: `ont_`).'
    HTTPBearer:
      type: http
      scheme: bearer

````