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

# Get Document by ID

> Get a document's metadata and temporary links to its files: the original (`originalFileUrl`), its LLM-ready Markdown version (`markdownFileUrl`) and, for documents processed by Captide's OCR pipeline, its layout as JSON (`layoutJsonFileUrl`), with each page's text, tables and figures and where they sit on the page.

    Use the `id` returned by `/documents/list`, chunks, agent sources or webhooks. The links expire one hour after the request; request the document again for fresh ones instead of storing them.



## OpenAPI

````yaml GET /api/v2/documents/{id}
openapi: 3.1.0
info:
  title: Captide REST API
  description: >-
    API for accessing financial disclosures and AI-powered financial document
    analysis.
  version: 0.3.14
servers:
  - url: https://rest-api.captide.co
    description: Prod server
security: []
paths:
  /api/v2/documents/{id}:
    get:
      tags:
        - Documents
      summary: Get document by ID
      description: >-
        Get a document's metadata and temporary links to its files: the original
        (`originalFileUrl`), its LLM-ready Markdown version (`markdownFileUrl`)
        and, for documents processed by Captide's OCR pipeline, its layout as
        JSON (`layoutJsonFileUrl`), with each page's text, tables and figures
        and where they sit on the page.

            Use the `id` returned by `/documents/list`, chunks, agent sources or webhooks. The links expire one hour after the request; request the document again for fresh ones instead of storing them.
      operationId: get_document_by_id_api_v2_documents__id__get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              Document ID, as returned by `/documents/list`, chunks, agent
              sources and webhooks
            examples:
              - a586df65-76d8-4b04-864c-ceed76592f4d
            title: Id
          description: >-
            Document ID, as returned by `/documents/list`, chunks, agent sources
            and webhooks
      responses:
        '200':
          description: The document, with temporary links to its files
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResponseV2'
              example:
                id: 97ac0c55-7349-46ec-8670-92f8524f5294
                documentCategory: interim-financial-report
                title: Third Quarter Report
                description: >-
                  Santos Limited third quarter report for the period ending 30
                  September 2026, summarising record quarterly production and
                  free cash flow, operational performance across assets
                  (including Barossa, Pikka and PNG LNG), sales and pricing,
                  updated 2026 guidance and project developments.
                date: '2026-10-22'
                fiscalQuarter: 3
                fiscalYear: 2026
                fiscalPeriod: quarter
                language: en
                companyId: 77848abe-a215-41b7-8950-86e89ea1fadc
                companyName: Santos Ltd.
                companyTickers:
                  - STO.AX
                originalFileUrl: >-
                  https://files.captide.co/original-docs/77848abe-a215-41b7-8950-86e89ea1fadc/97ac0c55-7349-46ec-8670-92f8524f5294.pdf?se=2026-11-03T18%3A15%3A55Z&sp=r&sv=2025-07-05&sr=b&sig=…
                markdownFileUrl: >-
                  https://files.captide.co/markdown-docs/77848abe-a215-41b7-8950-86e89ea1fadc/97ac0c55-7349-46ec-8670-92f8524f5294.md?se=2026-11-03T18%3A15%3A55Z&sp=r&sv=2025-07-05&sr=b&sig=…
                layoutJsonFileUrl: >-
                  https://files.captide.co/original-docs/77848abe-a215-41b7-8950-86e89ea1fadc/97ac0c55-7349-46ec-8670-92f8524f5294.json?se=2026-11-03T18%3A15%3A55Z&sp=r&sv=2025-07-05&sr=b&sig=…
                metadata: {}
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              examples:
                missing_key:
                  summary: Missing API key
                  value:
                    detail: Missing API key
                invalid_key:
                  summary: Invalid or expired API key
                  value:
                    detail: Invalid or expired API key
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Your organization doesn't have access to this endpoint
          content:
            application/json:
              examples:
                forbidden:
                  summary: Access to this endpoint is not allowed for your organization
                  value:
                    detail: >-
                      Access to this endpoint is not allowed for your
                      organization
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              examples:
                not_found:
                  summary: Document not found
                  value:
                    detail: Document not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Validation error: a parameter or body field is missing, has the
            wrong type or is out of range
          content:
            application/json:
              example:
                detail:
                  - type: uuid_parsing
                    loc:
                      - path
                      - id
                    msg: >-
                      Input should be a valid UUID, invalid length: expected
                      length 32 for simple format, found 3
                    input: abc
                    ctx:
                      error: >-
                        invalid length: expected length 32 for simple format,
                        found 3
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              examples:
                rate_limited:
                  summary: 'Rate limit exceeded: 100 requests per minute'
                  value:
                    detail: 'Rate limit exceeded: 100 requests per minute'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                database_error:
                  summary: Database error occurred
                  value:
                    detail: Database error occurred
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    DocumentResponseV2:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Document ID. Use it with `GET /api/v2/documents/{id}`; chunks, agent
            sources and webhooks return the same ID.
        documentCategory:
          type: string
          title: Documentcategory
          description: >-
            Document category code as stored in the database. For detailed
            category descriptions, please refer to [this page](/coverage).
        secFormType:
          anyOf:
            - type: string
            - type: 'null'
          title: Secformtype
          description: >-
            Document SEC form type (only applicable if the document is an SEC
            filing)
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Captide-generated document title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Captide-generated document description
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
          description: >-
            Date of the document: the EDGAR filing date for SEC filings,
            otherwise the date the document was issued or published. When the
            document has no date of its own, the date it was published online.
        fiscalQuarter:
          anyOf:
            - type: integer
            - type: 'null'
          title: Fiscalquarter
          description: Fiscal quarter the document relates to (from 1 to 4)
        fiscalYear:
          anyOf:
            - type: integer
            - type: 'null'
          title: Fiscalyear
          description: Fiscal year the document relates to (e.g., 2024)
        fiscalPeriod:
          anyOf:
            - type: string
            - type: 'null'
          title: Fiscalperiod
          description: >-
            Fiscal period the document relates to. Valid values: `year`,
            `multi-year`, `month`, `half-year`, `quarter`, or null
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: Language of the document in ISO 639-1 code
        companyId:
          type: string
          title: Companyid
          description: Unique ID of the company filing the document
        companyName:
          anyOf:
            - type: string
            - type: 'null'
          title: Companyname
          description: Name of the company filing the document
        companyTickers:
          items:
            type: string
          type: array
          title: Companytickers
          description: Tickers of the company filing the document
        originalFileUrl:
          type: string
          title: Originalfileurl
          description: >-
            Secure and temporary URL providing access to the original document
            file
        markdownFileUrl:
          type: string
          title: Markdownfileurl
          description: >-
            Secure and temporary URL providing access to the pre-processed,
            machine-readable document file
        layoutJsonFileUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Layoutjsonfileurl
          description: >-
            Secure and temporary URL to the document's OCR layout as JSON: each
            page's blocks (text, section headers, tables, pictures, footnotes
            and lists) with their type, position on the page (`bbox`,
            `polygon`), HTML content and section hierarchy. `null` when the
            document wasn't processed by Captide's OCR pipeline.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: >-
            Additional document metadata: `accessionNumber` and `8kItems` for
            SEC filings, and `sourceUrl`, the document's original address, for
            SEC filings and investor-relations documents
      type: object
      required:
        - id
        - documentCategory
        - companyId
        - originalFileUrl
        - markdownFileUrl
      title: DocumentResponseV2
      description: >-
        V2 response model for document retrieval by ID. Uses database category
        codes directly.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Standard error response model for all API endpoints.
    ValidationErrorResponse:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
          type: array
          title: Detail
      type: object
      required:
        - detail
      title: ValidationErrorResponse
      description: '422 body: every invalid field of the request.'
    ValidationErrorItem:
      properties:
        type:
          type: string
          title: Type
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Loc
        msg:
          type: string
          title: Msg
        input:
          anyOf:
            - {}
            - type: 'null'
          title: Input
        ctx:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Ctx
      type: object
      required:
        - type
        - loc
        - msg
      title: ValidationErrorItem
      description: One invalid field, as FastAPI reports it.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.