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

# Bible Semantic Search

> Free-form natural-language search across all 17,641 Bible chunks. Each result includes the top-N pre-computed Urantia paragraphs related to that chunk via the existing cross-reference data, so a single query surfaces both the Bible matches and the relevant UB content.

Query is embedded via `text-embedding-3-small` (1536-d) and matched against `bible_chunks.embedding_small` with a pgvector HNSW index. Latency is ~50-100ms on cache miss for the embedding call, ~30ms cached.

Optional filters: `canon` (`ot`, `deuterocanon`, `nt`), `bookCode` (any OSIS/USFM/full-name/alias). `urantiaParallelLimit` controls how many UB paragraphs to attach per result (0-10, default 3). Set to 0 to suppress.



## OpenAPI

````yaml POST /bible/search/semantic
openapi: 3.1.0
info:
  title: Urantia Papers API
  version: 1.0.0
  description: >-
    A developer and AI-agent friendly API for the Urantia Papers. Provides
    full-text search, structured content access, and audio URLs for all 17,000+
    paragraphs across 197 papers.
servers:
  - url: https://api.urantia.dev
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /bible/search/semantic:
    post:
      tags:
        - Bible
      summary: Semantic search across the Bible (with UB paragraphs)
      description: >-
        Free-form natural-language search across all 17,641 Bible chunks. Each
        result includes the top-N pre-computed Urantia paragraphs related to
        that chunk via the existing cross-reference data, so a single query
        surfaces both the Bible matches and the relevant UB content.


        Query is embedded via `text-embedding-3-small` (1536-d) and matched
        against `bible_chunks.embedding_small` with a pgvector HNSW index.
        Latency is ~50-100ms on cache miss for the embedding call, ~30ms cached.


        Optional filters: `canon` (`ot`, `deuterocanon`, `nt`), `bookCode` (any
        OSIS/USFM/full-name/alias). `urantiaParallelLimit` controls how many UB
        paragraphs to attach per result (0-10, default 3). Set to 0 to suppress.
      operationId: bibleSemanticSearch
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                q:
                  type: string
                  minLength: 1
                  maxLength: 2000
                page:
                  type: integer
                  minimum: 0
                  default: 0
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 20
                canon:
                  type: string
                  enum:
                    - ot
                    - deuterocanon
                    - nt
                bookCode:
                  type: string
                  minLength: 1
                urantiaParallelLimit:
                  type: integer
                  minimum: 0
                  maximum: 10
                  default: 3
              required:
                - q
      responses:
        '200':
          description: Bible semantic search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        reference:
                          type: string
                        bookCode:
                          type: string
                        bookName:
                          type: string
                        canon:
                          type: string
                          enum:
                            - ot
                            - deuterocanon
                            - nt
                        chapter:
                          type: integer
                        verseStart:
                          type: integer
                        verseEnd:
                          type: integer
                        text:
                          type: string
                        similarity:
                          type: number
                        urantiaParallels:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              standardReferenceId:
                                type: string
                              paperId:
                                type: string
                              paperTitle:
                                type: string
                              sectionTitle:
                                type: string
                                nullable: true
                              text:
                                type: string
                              similarity:
                                type: number
                              rank:
                                type: integer
                            required:
                              - id
                              - standardReferenceId
                              - paperId
                              - paperTitle
                              - sectionTitle
                              - text
                              - similarity
                              - rank
                      required:
                        - id
                        - reference
                        - bookCode
                        - bookName
                        - canon
                        - chapter
                        - verseStart
                        - verseEnd
                        - text
                        - similarity
                        - urantiaParallels
                  meta:
                    type: object
                    properties:
                      page:
                        type: integer
                      limit:
                        type: integer
                      total:
                        type: integer
                      totalPages:
                        type: integer
                    required:
                      - page
                      - limit
                      - total
                      - totalPages
                required:
                  - data
                  - meta
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                required:
                  - type
                  - title
                  - status
                  - detail
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                required:
                  - type
                  - title
                  - status
                  - detail

````