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

# Search Documents

> Search by semantic query, exact document attributes, or both.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/documents/search
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/documents/search:
    post:
      tags:
        - Documents
      summary: Search Documents
      description: Search by semantic query, exact document attributes, or both.
      operationId: core_api_v1_controllers_documents_search_documents
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentSearchIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentSearchOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    DocumentSearchIn:
      additionalProperties: false
      properties:
        query:
          anyOf:
            - maxLength: 8000
              type: string
            - type: 'null'
          description: Semantic search query. Omit for exact filters only.
          title: Query
        filters:
          allOf:
            - $ref: '#/components/schemas/DocumentSearchFilters'
        limit:
          default: 5
          maximum: 100
          minimum: 1
          title: Limit
          type: integer
        include_content:
          default: false
          title: Include Content
          type: boolean
      title: DocumentSearchIn
      type: object
    DocumentSearchOut:
      properties:
        object:
          default: search_result
          title: Object
          type: string
        mode:
          enum:
            - semantic
            - exact
          title: Mode
          type: string
        data:
          items:
            $ref: '#/components/schemas/DocumentSearchHit'
          title: Data
          type: array
        has_more:
          title: Has More
          type: boolean
      required:
        - mode
        - data
        - has_more
      title: DocumentSearchOut
      type: object
    DocumentSearchFilters:
      additionalProperties: false
      properties:
        document_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Document Id
        source_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Source Id
        page_id:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Page Id
        title:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Title
        status:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Status
        default_language:
          anyOf:
            - maxLength: 20
              minLength: 1
              type: string
            - type: 'null'
          title: Default Language
        doc_type_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Doc Type Id
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          description: >-
            Exact equality on each top-level metadata key (AND). Strings are
            case-sensitive; arrays and objects must match in full. Keys are
            literal, not lookup operators.
          maxProperties: 50
          title: Metadata
          type: object
      title: DocumentSearchFilters
      type: object
    DocumentSearchHit:
      properties:
        object:
          default: document
          title: Object
          type: string
        id:
          title: Id
          type: string
        title:
          title: Title
          type: string
        page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Id
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        public_display:
          default: true
          title: Public Display
          type: boolean
        default_language:
          default: en
          title: Default Language
          type: string
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        source_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Name
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        position:
          default: 0
          title: Position
          type: integer
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        metadata:
          allOf:
            - $ref: '#/components/schemas/JsonValue'
        doc_type_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Type Id
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        is_internal:
          title: Is Internal
          type: boolean
        excerpt:
          title: Excerpt
          type: string
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
      required:
        - id
        - title
        - is_internal
        - excerpt
      title: DocumentSearchHit
      type: object
    JsonValue: {}
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````