DoclingDocling for IBM watsonx
This is a preview with content being developed and subject to changes. Rely on theofficial announcement and documentationabout the Docling for IBM watsonx product.
API Reference

Get Results

Retrieve converted documents from completed tasks

Get Results

Retrieve the converted document once a conversion task has completed successfully.

Endpoint

GET /v1/result/{task_id}

Authentication

All requests require authentication using the X-Api-Key header with your API key.

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesThe task ID returned from a conversion request

Request Headers

HeaderRequiredDescription
X-Api-KeyYesYour API key for authentication

Response

Success Response (200 OK)

Returns the converted document with metadata:

{
  "document": {
    "filename": "2311.18481",
    "md_content": "# Document Title\n\nDocument content in Markdown format...",
    "json_content": null,
    "html_content": null,
    "text_content": null,
    "doctags_content": null
  },
  "status": "success",
  "errors": [],
  "processing_time": 2.2357177734375,
  "timings": {}
}
FieldTypeDescription
documentobjectThe converted document (see Document Object)
statusstringAlways "success" when results are available
errorsarrayList of non-fatal errors encountered during conversion
processing_timenumberTotal processing time in seconds
timingsobjectDetailed timing breakdown

Document Object

The document object contains the converted content in various formats:

FieldTypeDescription
filenamestringOriginal filename or derived name
md_contentstringDocument content in Markdown format (if requested)
json_contentobjectDocument content in structured JSON format (if requested)
html_contentstringDocument content in HTML format (if requested)
text_contentstringPlain text content (if requested)
doctags_contentobjectDocument tags and metadata (if requested)

Only the requested output format will be populated. Other format fields will be null. The default format is Markdown (md_content).

Error Responses

To be added.

Examples

Find examples of using the Results endpoint in the Examples section.

Output Format Details

Markdown Format

When output_format is set to "markdown", the md_content field contains:

  • Document structure (headings, paragraphs)
  • Tables in Markdown table format
  • Lists (ordered and unordered)
  • Code blocks
  • Images (embedded or referenced based on image_ref_mode)
  • Mathematical formulas in LaTeX format

Example:

# Document Title

## Section 1

This is a paragraph with **bold** and *italic* text.

| Column 1 | Column 2 |
|----------|----------|
| Data 1   | Data 2   |

$$E = mc^2$$

JSON Format

To be added.

HTML Format

When output_format is set to "html", the html_content field contains:

  • Semantic HTML5 markup
  • Styled tables
  • Preserved document structure
  • Embedded or referenced images

Result Retention

To be added.

Common Issues

To be added.

Best Practices

  1. Check status first - Always verify task status is "success" before retrieving results
  2. Handle errors gracefully - Check the errors array for warnings even on successful conversions
  3. Store results promptly - Download and save results within 24 hours
  4. Use appropriate format - Choose the output format that best suits your use case
  5. Monitor processing time - Use the processing_time field to track performance

Rate Limits

To be added.

On this page