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 URLhttps://nepalipdf.com
Uploadmultipart/form-data, the PDF in a field named file
Limits20 MB and 50 pages per PDF; see limits
ErrorsJSON: {"error": "…"} with a 4xx or 5xx status
PrivacyNothing 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.

FieldRequiredDescription
fileyesThe PDF.
ascii_digitsnotrue to write Nepali digits (०१२३) as 0123. Default false.
tablesnoHow 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.

FieldRequiredDescription
fileyesThe PDF.
formatnotext (default) or markdown. Plain text separates table columns with tabs; Markdown keeps headings and writes tables as pipe tables.
ascii_digitsnoAs above.
tablesnoAs 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-PagesNumber of pages in the PDF.
X-FlagsHow 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-SecondsTime 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

StatusMeaning
400Missing file or an invalid field value.
413The file is larger than 20 MB, or has more than 50 pages.
415The file is not a PDF.
422The PDF took longer than 120 seconds to convert and was stopped.
429Too many conversions from your address, or your previous conversion is still in progress. Wait for the number of seconds in the Retry-After header.
500The PDF could not be converted.
503The 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 PDF20 MB, 50 pages, 120 seconds of conversion time
Per address20 conversions per 10 minutes and 100 per day, shared with the website
At once1 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.