Skip to content

About

An API for converting and processing various document formats using Docling

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Docling API

An API for converting and processing various document formats using the Docling library.

Features

  • Convert various document formats (PDF, DOCX, images, etc.) to structured formats
  • Extract tables, figures, and text content
  • Process documents from both file uploads and URLs
  • Export to multiple formats including markdown, JSON, and HTML

Supported Input Formats

  • PDF
  • DOCX, XLSX, PPTX
  • Markdown
  • AsciiDoc
  • HTML, XHTML
  • CSV
  • Images (PNG, JPEG, TIFF, BMP)

API Endpoints

/process/

Basic document processing with minimal options.

POST /process/

/parse/

Advanced document processing with file upload or form-based URL input.

POST /parse/

/parse/url

JSON-based URL document processing.

POST /parse/url

Running with Docker

# Build and start containers
docker-compose up -d

# Stop containers
docker-compose down

Environment Variables

  • MAX_WORKERS: Control the number of worker processes (default: 4)
  • DOCLING_ARTIFACTS_PATH: Custom path for Docling models

Examples

Processing a URL

curl -X POST "http://localhost:8081/parse/url" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/document.pdf",
    "export_figures": true,
    "export_tables": true,
    "export_markdown": true,
    "export_json": true,
    "image_resolution": 2.0
  }'

Uploading a File

curl -X POST "http://localhost:8081/parse/" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@/path/to/document.pdf" \
  -F "export_figures=true" \
  -F "export_tables=true" \
  -F "export_markdown=true" \
  -F "export_json=true" \
  -F "image_resolution=2.0"

License

MIT

About

An API for converting and processing various document formats using Docling

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages