# Docling Markdown

> Convert PDFs and Office documents to clean markdown using Docling — 4 credits per call.

Source: http://localhost:3000/docs/endpoints/docling-markdown

## Docling Markdown: `POST /v1/docling-markdown/`

PDF, Office files or rendered pages into structured Markdown. Cost: 4 credits.

```bash
curl -X POST https://api.hushsearch.io/v1/docling-markdown/ \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://arxiv.org/pdf/1706.03762"
}'
```

**POST** `/v1/docling-markdown/` — **4 credits per call**

Download a PDF, DOCX, PPTX, or XLSX from a URL and convert it to clean, structured markdown using [Docling](https://github.com/DS4SD/docling). Tables and headings are preserved.

## Request

```json
{
  "url": "https://example.com/annual-report-2025.pdf"
}
```

## Response

```json
{
  "url": "https://example.com/annual-report-2025.pdf",
  "markdown": "# Annual Report 2025\n\n## Executive Summary\n...",
  "page_count": 42,
  "word_count": 18500,
  "credits_used": 4,
  "credits_remaining": 96,
  "response_time_ms": 3200
}
```

## Notes

- Maximum document size: 25 MB.
- For scanned / image-heavy PDFs, use [Docling OCR](http://localhost:3000/docs/endpoints/docling-ocr).
- Returns 503 if Docling is not installed in the deployment environment.
- SSRF protection applies.
