Nepali PDF API
Convert Nepali PDFs to Word, plain text or Markdown from your own code. The same engine as the website, over plain HTTP. No sign-up and no API key.
Overview
| Base URL | https://nepalipdf.com |
|---|---|
| Upload | multipart/form-data, the PDF in a field named file |
| Limits | 20 MB and 50 pages per PDF; see limits |
| Errors | JSON: {"error": "…"} with a 4xx or 5xx status |
| Privacy | Nothing is kept: files are deleted as soon as the response is sent |
Requests are processed one at a time; if the service is busy, your request waits its turn. Allow a generous timeout (a few minutes) for long documents.
PDF to Word
POST /api/v1/pdf-to-word
Returns the Word document (.docx) as the response body.
| Field | Required | Description |
|---|---|---|
file | yes | The PDF. |
ascii_digits | no | true to write Nepali digits (०१२३) as 0123. Default false. |
tables | no | How tables are found: auto (default, from ruling lines), text (from text alignment, for tables without lines) or none. |
curl -X POST https://nepalipdf.com/api/v1/pdf-to-word \
-F "file=@notice.pdf" \
-o notice.docx
PDF to text or Markdown
POST /api/v1/pdf-to-text
Returns UTF-8 text as the response body: text/plain or text/markdown.
| Field | Required | Description |
|---|---|---|
file | yes | The PDF. |
format | no | text (default) or markdown. Plain text separates table columns with tabs; Markdown keeps headings and writes tables as pipe tables. |
ascii_digits | no | As above. |
tables | no | As above. |
curl -X POST https://nepalipdf.com/api/v1/pdf-to-text \
-F "file=@notice.pdf" \
-F "format=markdown" \
-o notice.md
Response headers
Both endpoints add a short summary of the conversion:
X-Pages | Number of pages in the PDF. |
|---|---|
X-Flags | How many things are worth checking by eye. 0 means every character was identified exactly; anything else means some text may be wrong, for example because the PDF uses a font the service has not seen before. |
X-Elapsed-Seconds | Time spent converting. |
Python example
import requests
with open("notice.pdf", "rb") as pdf:
response = requests.post(
"https://nepalipdf.com/api/v1/pdf-to-text",
files={"file": pdf},
data={"format": "text"},
timeout=300,
)
response.raise_for_status()
print(response.text)
print("flags:", response.headers["X-Flags"])
Errors
| Status | Meaning |
|---|---|
400 | Missing file or an invalid field value. |
413 | The file is larger than 20 MB, or has more than 50 pages. |
415 | The file is not a PDF. |
422 | The PDF took longer than 120 seconds to convert and was stopped. |
429 | Too many conversions from your address, or your previous conversion is still in progress. Wait for the number of seconds in the Retry-After header. |
500 | The PDF could not be converted. |
503 | The service is busy. Try again after the Retry-After header's delay. |
Limits and fair use
The API is free and has no key, so it has limits that keep it available for everyone:
| Per PDF | 20 MB, 50 pages, 120 seconds of conversion time |
|---|---|
| Per address | 20 conversions per 10 minutes and 100 per day, shared with the website |
| At once | 1 conversion in progress per address; send the next file when the previous response arrives |
Send files one after another, not in parallel. Scanned PDFs (images with no text inside) are not supported.