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

# List Documents

> List documents for structured extraction.



## OpenAPI

````yaml api-reference/openapi.json get /extract/documents
openapi: 3.1.0
info:
  title: Endpoints
  version: '1.0'
servers:
  - url: https://api.contextual.ai/v1
security:
  - BearerAuth: []
paths:
  /extract/documents:
    get:
      tags:
        - /extract
      summary: List Documents
      description: List documents for structured extraction.
      operationId: list_documents_extract_documents_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DocumentListResponse:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/DocumentInfoResponse'
          type: array
          title: Documents
          description: List of documents
        total_count:
          type: integer
          title: Total Count
          description: Total number of documents
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: >-
            Next cursor to continue pagination. Omitted if there are no more
            documents to retrieve.
        prev_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Prev Cursor
          description: >-
            Previous cursor to go back in pagination. Omitted if this is the
            first page.
      type: object
      required:
        - documents
        - total_count
      title: DocumentListResponse
      description: Response model for document listing.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentInfoResponse:
      properties:
        document_id:
          type: string
          title: Document Id
          description: Unique ID of the document
        file_name:
          type: string
          title: File Name
          description: Original filename
        file_size:
          type: integer
          title: File Size
          description: File size in bytes
        page_count:
          type: integer
          title: Page Count
          description: Number of pages in the document
        uploaded_at:
          type: string
          title: Uploaded At
          description: Timestamp when the document was uploaded
        status:
          type: string
          title: Status
          description: Document status
        signed_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Signed Url
          description: >-
            Presigned download URL for the document (valid for 1 hour). Only
            available for GCS and S3 storage backends.
      type: object
      required:
        - document_id
        - file_name
        - file_size
        - page_count
        - uploaded_at
        - status
      title: DocumentInfoResponse
      description: Response model for document information.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````