About this endpoint
What it does
Extracts text from every page of an uploaded PDF file and returns the extracted content as a JSON object. The response also includes the total number of pages and per-page text details.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | PDF file upload in binary format. Maximum size: 20 MB. |
Response
Returns a JSON object with text as a string, pages as an integer, and pages_detail as an array of objects. Each item in pages_detail contains a page integer and text string for that page.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | No | Extracted text from the PDF. |
| pages | Integer | No | Total number of pages in the PDF. |
| pages_detail | Object Array | No | Per-page extracted text entries. |
| pages_detail[].page | Integer | No | Page number for the entry. |
| pages_detail[].text | String | No | Text extracted from that page. |