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

# Get Run Output

> Read a Flow run structured output as JSON

## Behavior

* Returns the run's structured output as the JSON response body. There is no separate download step.
* Every object key in the output is `snake_case`, the same convention as the rest of the API. Values (names, comments, ids, URLs) are returned exactly as the Flow produced them.
* The fields depend on the Flow. A Name Screening remediation Flow, for example, returns `status`, `alert_id`, `hits_processed`, `per_hit` (one entry per hit with `verdict`, `reason`, `basis`, `rule_resolution`, `hit_facts`, `hit_sources` and `comment`), `needs_human_review` and `synced`.
* Only call this once [Get Run](/api-reference/flows/get-run) shows `output_ref` set on the run.
* Returns `404` with code `RUN_NOT_FOUND` if `runId` does not exist, or belongs to a different customer.
* Returns `404` with code `OUTPUT_NOT_AVAILABLE` if the run has not captured structured output — for example if it has not completed yet, or if the Flow doesn't produce structured output.
* Returns `413` with code `OUTPUT_TOO_LARGE` if the output is too large to return in one response. Contact your Diligent representative if you see this.


## OpenAPI

````yaml GET /flow-runs/{runId}/output
openapi: 3.0.1
info:
  version: 1.0.0
  title: Diligent Flows
  description: Trigger a Flow run and retrieve its result.
servers:
  - url: https://api.godiligent.ai
    description: Production
  - url: https://api.sandbox.godiligent.ai
    description: Sandbox
security:
  - xApiKey: []
tags:
  - name: Flows
    description: Trigger a Flow run and retrieve its result
paths:
  /flow-runs/{runId}/output:
    get:
      tags:
        - Flows
      summary: Get Run Output
      description: >-
        Returns the run's structured output as JSON. Only available once the run
        has captured structured output. Every object key in the output is
        snake_case.
      operationId: getFlowRunOutput
      parameters:
        - name: runId
          in: path
          description: The run's id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunOutput'
              example:
                status: PARTIALLY_RESOLVED
                alert_id: 2b7c1f4e-9d3a-4e8b-a6c5-1f0e9d8c7b6a
                hits_processed: 2
                per_hit:
                  - hit_reference: HIT-0001
                    verdict: FALSE_POSITIVE
                    reason: full-resolution
                    basis: >-
                      Rule "Strong conflict: Strong name conflict" determined
                      FALSE_POSITIVE.
                    rule_resolution:
                      action: COMMENT_FALSE_POSITIVE
                      applied_rule:
                        name: 'Strong conflict: Strong name conflict'
                        action: COMMENT_FALSE_POSITIVE
                      matching_rules:
                        - name: 'Strong conflict: Strong name conflict'
                          action: COMMENT_FALSE_POSITIVE
                      primary_name_evidence:
                        types:
                          - NAME_GIVEN_NAME_CONFLICT
                          - NAME_MAIN
                        profile_fact_id: f1a2b3c4-0000-4000-8000-000000000001
                        hit_fact_id: f1a2b3c4-0000-4000-8000-000000000002
                        description: >-
                          "Jane Doe" vs. "John Doe". Given names are different.
                          Family name identical.
                        similarity_score: 0.62
                        candidate_name: John Doe
                      other_name_evidences: []
                      other_evidences: []
                      matching_segments: []
                    hit_facts:
                      - id: f1a2b3c4-0000-4000-8000-000000000002
                        source_id: HIT
                        snippet: 'Name: John Doe'
                        predicate: has_name
                        value: John Doe
                    hit_sources:
                      - id: f1a2b3c4-0000-4000-8000-000000000003
                        type: ARTICLE
                        url: https://example.org/sanctions-list
                    comment: >-
                      False positive. 1) name - "Jane Doe" vs. "John Doe". Given
                      names are different.
                  - hit_reference: HIT-0002
                    verdict: UNRESOLVED
                    reason: left-for-analyst
                    basis: >-
                      No rule matched — evidence insufficient to settle;
                      requires analyst review.
                    comment: Potential match. No significant mismatch is present.
                needs_human_review: 1
                synced: true
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Run not found, or no structured output captured for this run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                run_not_found:
                  value:
                    code: RUN_NOT_FOUND
                    message: 'Run not found: 8f14e45f-ceea-4c6b-a1b2-3c4d5e6f7890'
                output_not_available:
                  value:
                    code: OUTPUT_NOT_AVAILABLE
                    message: No structured output captured for this run
        '413':
          description: The output is larger than the API can return in one response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: OUTPUT_TOO_LARGE
                message: Run output exceeds the maximum response size
        '500':
          description: Internal Server Error
      security:
        - xApiKey: []
components:
  schemas:
    RunOutput:
      description: >-
        The structured output of the run. Its fields depend on the Flow; every
        object key is snake_case.
      oneOf:
        - type: object
          additionalProperties: true
        - type: array
          items: {}
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code, e.g. FLOW_NOT_FOUND, RUN_NOT_FOUND,
            VALIDATION_ERROR.
        message:
          type: string
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  securitySchemes:
    xApiKey:
      type: apiKey
      name: X-API-KEY
      in: header

````

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