> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiI3MTYyM2ExZC00MmVhLTRjNDYtYjljZC05MDM0YjY2ZGNmMjIiLCJleHAiOjE3NzgyOTEwNzEsImlhdCI6MTc3ODI5MDc3MX0.2vXhfMwRqFJwL0hEGvaQXM0pOShuJOOAqICo-Co_t0o
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# Get Documents

GET https://fai.buildwithfern.com/document/{domain}

Reference: https://buildwithfern.com/learn/docs/ai-features/ask-fern/api-reference/document/get-documents

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: fai
  version: 1.0.0
paths:
  /document/{domain}:
    get:
      operationId: get-documents
      summary: Get Documents
      tags:
        - subpackage_document
      parameters:
        - name: domain
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: The page number for pagination
          required: false
          schema:
            type:
              - integer
              - 'null'
        - name: limit
          in: query
          description: The number of documents per page
          required: false
          schema:
            type:
              - integer
              - 'null'
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDocumentsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: https://fai.buildwithfern.com
  - url: https://fai-dev.buildwithfern.com
  - url: http://localhost:8080
components:
  schemas:
    Document:
      type: object
      properties:
        document_id:
          type: string
        domain:
          type: string
        chunk:
          type: string
        document:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type:
            - string
            - 'null'
        version:
          type:
            - string
            - 'null'
        product:
          type:
            - string
            - 'null'
        keywords:
          type:
            - array
            - 'null'
          items:
            type: string
        authed:
          type:
            - boolean
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - document_id
        - domain
        - chunk
        - document
        - created_at
        - updated_at
      title: Document
    PaginationResponse:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
      required:
        - total
        - page
        - limit
      title: PaginationResponse
    GetDocumentsResponse:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/Document'
          description: List of documents for the domain
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
          description: Pagination information for the document list
      required:
        - documents
        - pagination
      title: GetDocumentsResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```