---
updatedAt: 2026-04-24T18:36:38.000Z
agentTools:
  projectIndex: https://docs.docupipe.ai/llms.txt
---

# Retrieve a Processed Document

Access the analysis results of your submitted document using this endpoint. The `status` field indicates the document's current processing stage, and the `result` field provides the extracted plain text for AI comprehension, as well as more granular structured information such as bounding boxes for detected tables and text blocks.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "DocuPipe",
    "version": "1.0"
  },
  "paths": {
    "/document/{document_id}": {
      "get": {
        "summary": "Retrieve a Processed Document",
        "operationId": "get_document",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Access the analysis results of your submitted document using this endpoint. The `status` field indicates the document's current processing stage, and the `result` field provides the extracted plain text for AI comprehension, as well as more granular structured information such as bounding boxes for detected tables and text blocks.",
        "tags": [
          "Document"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AnalyzedPage": {
        "properties": {
          "sections": {
            "items": {
              "$ref": "#/components/schemas/Section"
            },
            "type": "array",
            "title": "Sections",
            "description": "A list of parsed sections in the page.",
            "default": []
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text",
            "description": "The text content of the page - a concatenation of the text in all sections."
          },
          "pageNum": {
            "type": "integer",
            "title": "Page Number",
            "description": "The number of this page in document (zero indexed).",
            "default": 0
          },
          "orientation": {
            "$ref": "#/components/schemas/Orientation",
            "description": "Orientation of the page.",
            "default": "normal"
          }
        },
        "type": "object",
        "title": "AnalyzedPage",
        "description": "Public-facing representation of DocuPipeAnalyzedPage."
      },
      "Document": {
        "properties": {
          "documentId": {
            "type": "string",
            "title": "Document ID",
            "description": "Unique identifier of the document."
          },
          "dataset": {
            "type": "string",
            "title": "Dataset",
            "description": "Name of the dataset to which the document belongs."
          },
          "classified": {
            "type": "boolean",
            "title": "Classified",
            "description": "Whether the document has been classified.",
            "default": false
          },
          "classIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Class IDs",
            "description": "List of class IDs assigned to the document. If classified is False, this will be None."
          },
          "filename": {
            "type": "string",
            "title": "Document filename",
            "description": "Name of the document file."
          },
          "fileType": {
            "$ref": "#/components/schemas/FileType",
            "title": "File Type",
            "description": "Type of the document file."
          },
          "fileExtension": {
            "$ref": "#/components/schemas/FileExtension",
            "title": "File Extension",
            "description": "Extension of the document file."
          },
          "originalFileExtension": {
            "$ref": "#/components/schemas/FileExtension",
            "title": "Original File Extension",
            "description": "extension of the originally uploaded file, before any conversion (e.g. html, docx). none if no conversion occurred."
          },
          "fileSizeMb": {
            "type": "number",
            "title": "File Size",
            "description": "Size of the stored document file in MB."
          },
          "result": {
            "$ref": "#/components/schemas/ParsingResults",
            "title": "Analysis Result",
            "description": "Result of the document analysis if completed."
          },
          "numPages": {
            "type": "integer",
            "title": "Number of Pages",
            "description": "Number of pages in the document."
          },
          "language": {
            "type": "string",
            "title": "Language",
            "description": "Dominant language of the document."
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata",
            "description": "Metadata associated with the document. This is a user-defined dictionary that can have any properties."
          },
          "status": {
            "$ref": "#/components/schemas/ProcessingStatus",
            "title": "Processing Status",
            "description": "Current status of the document processing (deprecated, will be removed in future versions)."
          },
          "parentDocumentId": {
            "type": "string",
            "title": "Parent Document ID",
            "description": "Unique identifier of the parent document, if this document was created by splitting another document."
          },
          "parentDocumentPages": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Parent Document Pages",
            "description": "List of page numbers from the parent document that make up this document (zero indexed)."
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "Timestamp of the document creation."
          },
          "standardizationCount": {
            "type": "integer",
            "title": "Standardization Count",
            "description": "Number of completed standardizations of this document. Returned in document lists; null when fetching a single document."
          },
          "transformedData": {
            "title": "Transformed Data",
            "description": "Output of the transformation chain applied to this structured document (csv, xlsx, xls, json or xml), if any. Returned when fetching a single document; null in document lists."
          },
          "transformationIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Transformation IDs",
            "description": "Ordered transformations that produced transformedData."
          },
          "transformationReceipt": {
            "additionalProperties": true,
            "type": "object",
            "title": "Transformation Receipt",
            "description": "Hashes identifying the input, code, context and output of the applied transformation chain."
          }
        },
        "type": "object",
        "required": [
          "documentId"
        ],
        "title": "Document",
        "description": "Public-facing representation of DocuPipeDocument."
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail",
            "description": "Details about the error"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorResponse"
      },
      "FileExtension": {
        "type": "string",
        "enum": [
          "pdf",
          "png",
          "jpeg",
          "webp",
          "tiff",
          "jp2",
          "txt",
          "json",
          "xml",
          "html",
          "doc",
          "docx",
          "csv",
          "xlsx",
          "xls",
          "eml"
        ],
        "title": "FileExtension"
      },
      "FileType": {
        "type": "string",
        "enum": [
          "pdf",
          "image",
          "text",
          "json",
          "html",
          "word",
          "table"
        ],
        "title": "FileType"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HeaderType": {
        "type": "string",
        "enum": [
          "paragraph",
          "h1",
          "h2",
          "h3",
          "h4",
          "h5",
          "h6"
        ],
        "title": "HeaderType"
      },
      "Orientation": {
        "type": "string",
        "enum": [
          "normal",
          "clockwise",
          "counter_clockwise",
          "upside_down"
        ],
        "title": "Orientation"
      },
      "ParsingResults": {
        "properties": {
          "pages": {
            "items": {
              "$ref": "#/components/schemas/AnalyzedPage"
            },
            "type": "array",
            "title": "Pages",
            "description": "A list of parsed pages in the document.",
            "default": []
          },
          "numPages": {
            "type": "integer",
            "title": "Number of Pages",
            "description": "The number of pages in the document.",
            "default": 0
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text",
            "description": "The text content of the document."
          },
          "language": {
            "type": "string",
            "title": "Language",
            "description": "The dominant language of the document."
          }
        },
        "type": "object",
        "title": "ParsingResults"
      },
      "ProcessingStatus": {
        "type": "string",
        "enum": [
          "processing",
          "completed",
          "error"
        ],
        "title": "ProcessingStatus"
      },
      "Section": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/SectionType",
            "title": "Type",
            "description": "The type of the section (text, table, image)"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "The text content of the section"
          },
          "bbox": {
            "items": {
              "type": "number"
            },
            "type": "array",
            "title": "Bounding Box",
            "description": "Bounding box of the section in the format [x1, y1, x2, y2], in percentage units [0, 1] within the page"
          },
          "header": {
            "$ref": "#/components/schemas/HeaderType",
            "title": "Header Type",
            "description": "For text sections, the type of header: paragraph (default), h1 - h6"
          },
          "tableList": {
            "items": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "array",
            "title": "Table List",
            "description": "For table sections, a list of lists representing the table. The outer list represents rows, the inner lists represent column values in those rows. The first row is the header.If there is no header, the first row is a list of empty strings."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text",
          "bbox"
        ],
        "title": "Section"
      },
      "SectionType": {
        "type": "string",
        "enum": [
          "text",
          "table",
          "image"
        ],
        "title": "SectionType"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://app.docupipe.ai"
    }
  ]
}
```