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

# List documents in collection

> Get all documents in a collection with pagination and sorting options.

This endpoint retrieves a paginated list of documents associated with a specific collection. It supports sorting options to customize the order of returned documents.


## OpenAPI

````yaml /openapi/rag-collections/list-documents-in-collection.json GET /api/r2r/v3/collections/{id}/documents
openapi: 3.1.0
info:
  title: IO Intelligence
  version: '1.0'
servers:
  - url: https://api.intelligence.io.solutions
security:
  - sec0: []
paths:
  /api/r2r/v3/collections/{id}/documents:
    get:
      summary: List documents in collection
      description: Get all documents in a collection with pagination and sorting options.
      operationId: list-documents-in-collection
      parameters:
        - name: id
          in: path
          description: Collection ID
          schema:
            type: string
          required: true
        - name: offset
          in: query
          description: Specifies the number of objects to skip. Defaults to 0. >=0
          schema:
            type: integer
            format: int32
            default: 0
        - name: limit
          in: query
          description: >-
            Specifies a limit on the number of objects to return, ranging
            between 1 and 100. Defaults to 100. >=1 <=1000
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    results:
                      - id: 123e4567-e89b-12d3-a456-426614174000
                        collection_ids:
                          - 123e4567-e89b-12d3-a456-426614174000
                        owner_id: 123e4567-e89b-12d3-a456-426614174000
                        document_type: pdf
                        metadata:
                          title: Sample Document
                        version: '1.0'
                        title: Sample Document
                        size_in_bytes: 123456
                        ingestion_status: pending
                        extraction_status: pending
                        created_at: '2021-01-01T00:00:00Z'
                        updated_at: '2021-01-01T00:00:00Z'
                        ingestion_attempt_number: 0
                        summary: A summary of the document
                        summary_embedding:
                          - 0.1
                          - 0.2
                          - 0.3
                        total_tokens: 1000
                    total_entries: 1
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 123e4567-e89b-12d3-a456-426614174000
                        collection_ids:
                          type: array
                          items:
                            type: string
                            example: 123e4567-e89b-12d3-a456-426614174000
                        owner_id:
                          type: string
                          example: 123e4567-e89b-12d3-a456-426614174000
                        document_type:
                          type: string
                          example: pdf
                        metadata:
                          type: object
                          properties:
                            title:
                              type: string
                              example: Sample Document
                        version:
                          type: string
                          example: '1.0'
                        title:
                          type: string
                          example: Sample Document
                        size_in_bytes:
                          type: integer
                          example: 123456
                          default: 0
                        ingestion_status:
                          type: string
                          example: pending
                        extraction_status:
                          type: string
                          example: pending
                        created_at:
                          type: string
                          example: '2021-01-01T00:00:00Z'
                        updated_at:
                          type: string
                          example: '2021-01-01T00:00:00Z'
                        ingestion_attempt_number:
                          type: integer
                          example: 0
                          default: 0
                        summary:
                          type: string
                          example: A summary of the document
                        summary_embedding:
                          type: array
                          items:
                            type: number
                            example: 0.1
                            default: 0
                        total_tokens:
                          type: integer
                          example: 1000
                          default: 0
                  total_entries:
                    type: integer
                    example: 1
                    default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: oauth2
      flows: {}

````