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

# Search documents

> Find all documents that match the specified criteria.



## OpenAPI

````yaml /specs/realtime/openapi.public.json get /v1alpha1/public/knowledge-base/document
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
paths:
  /v1alpha1/public/knowledge-base/document:
    get:
      tags:
        - KBPublicApiDocument
        - Public-Docs
      summary: Search documents
      description: Find all documents that match the specified criteria.
      operationId: KnowledgeBaseDocumentApiPublicHTTPController_getMany
      parameters:
        - name: page
          required: false
          in: query
          schema:
            description: >-
              The page number to retrieve, defaults to 1 (which is the minimum).
              Order is by the date updated, descending.
            type: string
        - name: limit
          required: false
          in: query
          schema:
            description: >-
              The number of documents to return per page. Defaults to 10, range
              is 1-100.
            type: string
        - name: documentType
          required: false
          in: query
          schema:
            description: >-
              Filters the document list by type (url, pdf, text, docx). Defaults
              to all document types.
            type: string
            enum:
              - csv
              - pdf
              - text
              - url
              - docx
              - table
              - xlsx
            x-enumNames:
              - CSV
              - PDF
              - TEXT
              - URL
              - DOCX
              - TABLE
              - XLSX
        - name: projectEnvironmentIDOrAlias
          required: false
          in: query
          schema:
            description: >-
              The alias of the environment to target (ie. `main`). You can find
              this in the environments page of your agent.


              > **💡 Tip:** [Learn more about
              Environments](/documentation/deploy/environments).
            type: string
      responses:
        '200':
          description: Documents matching the specified criteria.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: number
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        documentID:
                          type: string
                        data:
                          oneOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - url
                                name:
                                  type: string
                                url:
                                  type: string
                                refreshRate:
                                  type: string
                                  enum:
                                    - daily
                                    - weekly
                                    - monthly
                                    - never
                                  x-enumNames:
                                    - DAILY
                                    - WEEKLY
                                    - MONTHLY
                                    - NEVER
                                lastSuccessUpdate:
                                  type: string
                                accessTokenID:
                                  type: number
                                integrationExternalID:
                                  type: string
                                source:
                                  type: string
                                  enum:
                                    - zendesk
                                    - shopify
                                  x-enumNames:
                                    - ZENDESK
                                    - SHOPIFY
                              required:
                                - type
                                - name
                                - url
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - docx
                                name:
                                  type: string
                                url:
                                  type: string
                                  nullable: true
                              required:
                                - type
                                - name
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - pdf
                                name:
                                  type: string
                                url:
                                  type: string
                                  nullable: true
                              required:
                                - type
                                - name
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                name:
                                  type: string
                                canEdit:
                                  type: boolean
                                url:
                                  type: string
                                  nullable: true
                              required:
                                - type
                                - name
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - csv
                                name:
                                  type: string
                                rowsCount:
                                  type: number
                                url:
                                  type: string
                                  nullable: true
                              required:
                                - type
                                - name
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - xlsx
                                name:
                                  type: string
                                rowsCount:
                                  type: number
                                url:
                                  type: string
                                  nullable: true
                              required:
                                - type
                                - name
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - table
                                name:
                                  type: string
                                rowsCount:
                                  type: number
                                url:
                                  type: string
                                  nullable: true
                              required:
                                - type
                                - name
                                - rowsCount
                          nullable: true
                        updatedAt:
                          type: string
                          format: date-time
                        status:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - ERROR
                                - PENDING
                                - SUCCESS
                                - INITIALIZED
                              x-enumNames:
                                - ERROR
                                - PENDING
                                - SUCCESS
                                - INITIALIZED
                            data: {}
                          required:
                            - type
                      required:
                        - documentID
                        - data
                        - updatedAt
                        - status
                required:
                  - total
                  - data
      security:
        - auth: []
components:
  securitySchemes:
    auth:
      type: apiKey
      in: header
      name: authorization
      description: Voiceflow API key

````