Send a PDF, get back every word's text and exact position as JSON. A real text layer is read exactly, character for character; outlined (CAD/P&ID) or scanned text is recognized, with a confidence score and source on every word — nothing is ever reported as certain unless it is.
See the Extract Text with Coordinates tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.
POST /webhooks/trigger — same endpoint and fields as every tool, with tool="extract-text" set explicitly (it's not the default).
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@drawing.pdf" \ -F "fileId=document-001" \ -F "referenceId=reference-001" \ -F "tool=extract-text"
An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged — a bad value is rejected with 400, not charged and not queued. Every word always carries a conf (0 to 1) and a source (text-layer, vector-ocr, or raster-ocr) — text-layer words that pass the checks are conf 1.0, OCR never reports 1.0.
| pages | string, optional | Default "all", or a 1-based list like "1-5,8". A page outside the document is invalid_options. |
| engine | string, optional | "auto" (default, picks per page), "text-layer" (fails on pages without a text layer), or "ocr" (ignores the text layer). |
| granularity | string, optional | What the words array holds: "word" (default), "line", or "char" (text-layer pages only — invalid_options on an OCR page). Lines and blocks are always included regardless. |
| minConfidence | number, optional | 0 to 1, default 0. Words below it move to a page's lowConfidence list — never silently deleted. |
| tagPatterns | string[], optional | Up to 20 regex patterns, 200 characters each. Used only to add a normalized suggestion and an ambiguous flag for characters OCR commonly confuses (I/1, O/0, V/v); the raw text is never changed. |
| coordinateSpace | string, optional | "displayed" (default, points as the page is shown), "normalized" (0 to 1 of the displayed page), or "user" (PDF user space, bottom-left origin). |
| includeText | boolean, optional | Default true — include each page's full text in reading order. |
| password | string, optional | Tried only if the empty password fails. |
The webhook delivers a .json file (not a PDF): every page's class, quality summary, full text, and a words array with each word's text, bounding box, confidence, and source. A page with results below about 50 MB is delivered as plain JSON; larger results are gzip-compressed and delivered as .json.gz.
Billed per page, not per document — 1 credit for every 10 pages, rounded up (a 45-page PDF costs 5 credits).
Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.
| invalid_options | A bad option, a page out of range, or an unsafe regex. |
| encrypted_file | The PDF is password protected and the given password (if any) didn't open it. |
| no_extractable_text | No word was found on any selected page by any engine, or engine: "text-layer" hit a page with no text layer. |
| invalid_file | The file could not be read, or was not the format this tool expects. |
| render_failed | Something failed during conversion that wasn’t a problem with the input itself. |
| timeout | The job did not finish within its time budget. |
| internal_error | An unexpected error on our side. |