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

# Raw Search

> Search the Onyx index with no LLM calls and get back document sections.

Runs hybrid retrieval on the query as written, with no query expansion,
filter detection, federated Slack search or LLM document selection. Returns
up to 10 sections in retrieval order, each with up to `context_chunks`
neighboring chunks on each side. Results are always filtered by the calling
user's document permissions.

> [!NOTE]
>
> **Required permission:** Search — Read (`read:search`), which `basic` includes, so any signed-in user has it.
> A limited [Personal Access Token](https://docs.onyx.app/developers/overview.md#personal-access-tokens) needs the Search — Read scope.

> [!NOTE]
>
> This endpoint returns Onyx's retrieval results with no LLM calls,
> for callers that rank or read the results themselves.
> It runs the query as written and returns up to 10 sections in retrieval order.
> For query expansion and LLM document selection, use [Search](https://docs.onyx.app/developers/api_reference/search/search.md) instead.

> [!WARNING]
>
> Results are always filtered by the calling user's document permissions,
> so the same query run by two users can return different documents. A search needs a vector database:
> deployments running with `DISABLE_VECTOR_DB` set (Onyx Lite) answer with `501`.


## OpenAPI

````yaml POST /search/raw
openapi: 3.1.0
info:
  title: Onyx API
  description: Onyx API for AI-powered enterprise search and chat
  version: Development
servers:
  - url: https://cloud.onyx.app/api
security: []
paths:
  /search/raw:
    post:
      tags:
        - public
      summary: Raw Search
      description: >-
        Search the Onyx index with no LLM calls and get back document sections.


        Runs hybrid retrieval on the query as written, with no query expansion,

        filter detection, federated Slack search or LLM document selection.
        Returns

        up to 10 sections in retrieval order, each with up to `context_chunks`

        neighboring chunks on each side. Results are always filtered by the
        calling

        user's document permissions.
      operationId: raw_search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RawSearchRequest'
      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:
        - BearerAuth: []
components:
  schemas:
    RawSearchRequest:
      properties:
        query:
          type: string
          maxLength: 2048
          minLength: 1
          title: Query
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentSource'
              type: array
            - type: 'null'
          title: Sources
        document_sets:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Document Sets
        tags:
          anyOf:
            - items:
                $ref: '#/components/schemas/Tag'
              type: array
            - type: 'null'
          title: Tags
        time_cutoff:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Time Cutoff
        persona_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Persona Id
        context_chunks:
          type: integer
          maximum: 5
          minimum: 0
          title: Context Chunks
          default: 5
      type: object
      required:
        - query
      title: RawSearchRequest
    SearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/SearchResult'
          type: array
          title: Results
      type: object
      required:
        - results
      title: SearchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentSource:
      type: string
      enum:
        - ingestion_api
        - slack
        - web
        - google_drive
        - gmail
        - github
        - gitbook
        - gitlab
        - guru
        - bookstack
        - outline
        - confluence
        - jira
        - slab
        - productboard
        - file
        - coda
        - canvas
        - notion
        - zulip
        - linear
        - hubspot
        - document360
        - gong
        - google_sites
        - zendesk
        - loopio
        - box
        - dropbox
        - sharepoint
        - onedrive
        - teams
        - outlook
        - salesforce
        - discourse
        - axero
        - clickup
        - mediawiki
        - wikipedia
        - asana
        - s3
        - r2
        - google_cloud_storage
        - oci_storage
        - xenforo
        - not_applicable
        - discord
        - freshdesk
        - fireflies
        - zoom
        - egnyte
        - airtable
        - highspot
        - drupal_wiki
        - imap
        - bitbucket
        - testrail
        - braintrust
        - lumapps
        - youtrack
        - azure_datalake
        - mock_connector
        - user_file
        - craft_file
      title: DocumentSource
    Tag:
      properties:
        tag_key:
          type: string
          title: Tag Key
        tag_value:
          type: string
          title: Tag Value
      type: object
      required:
        - tag_key
        - tag_value
      title: Tag
    SearchResult:
      properties:
        citation_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Citation Id
        title:
          type: string
          title: Title
        content:
          type: string
          title: Content
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        source_type:
          type: string
          title: Source Type
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - citation_id
        - title
        - content
        - link
        - source_type
        - updated_at
      title: SearchResult
    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:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authorization header with Bearer token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.