Skip to content
ComPDF

Response structure

documentParsing returns a JSON response directly — no secondary download via downloadUrl is needed.

Top-level shape

The API directly returns the parse result JSON:

json
{
  "code": 200,
  "message": "Success",
  "x_request_id": "6512815b16964dc3a04939ebf685d975",
  "file_type": "PDF",
  "result": {
    "pages": [ ... ],
    "detail": [ ... ],
    "catalog": {},
    "markdown": "# Sample PDF ...",
    "valid_page_number": 1,
    "total_page_number": 1,
    "success_count": 1,
    "excel_base64": ""
  },
  "metrics": [ ... ],
  "image_process": []
}

Key fields

FieldMeaning
codeBusiness status code. 200 for success; 06001 for insufficient assets (page quota exhausted)
messageHuman-readable response message
x_request_idRequest trace ID for troubleshooting
file_typeDetected input type, for example PDF
resultMain parse result, including page output and summary counters
metricsPer-page processing metrics for quality and performance analysis
image_processExtra image-processing output; usually empty for standard parse scenarios

The result object

result is the main payload. Common fields include:

FieldMeaning
result.pagesArray of per-page parse results, with structured (blocks) and content (lightweight text)
result.detailFlat paragraph-level view merging all page blocks into one ordered array
result.markdownMerged Markdown output
result.catalogDocument tree / table of contents
result.valid_page_numberNumber of successfully parsed pages
result.total_page_numberTotal pages in the input file
result.success_countCount of successful pages or result units
result.excel_base64Base64-encoded Excel output when export format includes Excel

Asset insufficient error

When your page quota is exhausted, the API returns:

json
{
  "code": "06001",
  "msg": "You have run out of the files which could be processed",
  "data": null
}

How it is usually consumed

  • For a full-text reading view, start with result.markdown
  • For per-page rendering, inspect result.pages
  • For flat paragraph-level processing, inspect result.detail
  • For navigation or hierarchy, inspect result.catalog
  • For quality or performance monitoring, inspect metrics

Reading with other pages