PDF to text API Turn any text PDF into clean text with one call

POST a PDF or HTML file to /v1/text and get its text back as JSON: lines in reading order, table cells separated by tabs, and pages separated by a form feed. There is nothing to install, and the same file always gives the same text.

POST /v1/text
curl https://api.100sands.com/v1/text \
  -H "Authorization: Bearer $SANDS_API_KEY" \
  -F [email protected]

{
  "pages": 3,
  "text": "COMPANY EXTRACT\nCompany name\tHarbor Lane Logistics Ltd\nCompany number\t51-482913-6\nStatus\tActive\n..."
}

What you get

  • Lines in reading order

    Each line of the page comes back as one line of text, top to bottom, in the order people read it.

  • Table cells stay apart

    Cells on the same line are separated by tabs, so a table pastes straight into a spreadsheet or splits with one line of code.

  • Every language

    Hebrew, Arabic, Persian and Urdu come back in reading order. Hindi, Bengali, Tamil, Thai, Chinese, Japanese and Korean come back as written.

  • PDF and HTML

    The same call reads HTML pages and files. Send the file itself, or a link to it with fileUrl.

  • Fast and repeatable

    Text is read in milliseconds a page, with no AI involved, so the same file always gives the same text.

  • Clear refusals

    A scanned PDF has no text to read, so it is refused with 422 NO_TEXT_IN_FILE and isn't counted.

Your first PDF in three steps

  1. Create a free account. No credit card.
  2. In the app, open API keys and create a key. Copy it: it is shown only once.
  3. Send the PDF as a file field in multipart/form-data, with the key as Authorization: Bearer.

Limits

  • Files up to 50 MB
  • PDF and HTML files that contain text; scans, photos and images are not read
  • Password-protected PDFs are refused with 422 ENCRYPTED_PDF
  • In a PDF where only some pages have text, the other pages come back blank
  • One document per file, whatever its page count; refused files aren't counted

Price

Free: 100 documents a month. Starter: $20 a month for 20,000. Pro: $79 a month for 100,000. A document is one file, however many pages it has.

Compare the plans

Questions

How do I convert a PDF to text with an API?

Create a free account and an API key, then POST the PDF to /v1/text as multipart/form-data with the key in the Authorization header. The JSON response holds the page count and the document's whole text.

Does it keep tables?

It keeps table cells apart: cells on the same line are separated by tabs, and each row is its own line. To get a table as rows and columns in JSON, set up a document type with a table field.

Can it read scanned PDFs?

No. 100sands reads PDF and HTML files that contain text. A scanned PDF, which holds pictures of text, is refused with 422 NO_TEXT_IN_FILE and isn't counted.

Is the output the same every time?

Yes. The text is read from the file by fixed rules, with no AI involved, so the same file always gives the same text.

Which languages does it read?

Every language. Right-to-left text such as Hebrew and Arabic comes back in reading order, and complex scripts such as Hindi, Thai and Japanese come back as written, with no setting to choose.

Blog

Try it on your own documents

100 documents a month free. No credit card.

Start free