# Docling OCR

> OCR for scanned PDFs and images using EasyOCR via Docling — 3 credits per call.

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

## Docling OCR: `POST /v1/docling-ocr/`

OCR for scanned documents and images, returned as Markdown. Cost: 3 credits.

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

**POST** `/v1/docling-ocr/` — **3 credits per call**

Run optical character recognition on a scanned PDF or image. Returns clean markdown with an optional confidence score.

## Request

```json
{
  "url": "https://example.com/scanned-contract.pdf",
  "use_gpu": false
}
```

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | Yes | PDF, PNG, JPG, or TIFF URL |
| `use_gpu` | boolean | No | Enable GPU acceleration (default: `false`) |

## Response

```json
{
  "url": "https://example.com/scanned-contract.pdf",
  "markdown": "# Service Agreement\n\nThis agreement is entered into...",
  "page_count": 8,
  "word_count": 2400,
  "ocr_confidence": 0.9312,
  "credits_used": 3,
  "credits_remaining": 97,
  "response_time_ms": 4100
}
```

`ocr_confidence` is the average confidence across OCR cells (0–1), or `null` if unavailable.

## Notes

- Use for scanned documents where [Docling Markdown](http://localhost:3000/docs/endpoints/docling-markdown) returns empty output.
- Maximum document size: 25 MB.
- Returns 503 if Docling/EasyOCR are not installed.
- SSRF protection applies.
