How to choose a PDF extraction API: nine things to test

Updated

In short

Test a service on your own worst documents, not its samples. Check that text comes back in the right order, how it handles sideways and low-resolution scans, and your languages. Send the same file twice and compare. Send a file it cannot read and see whether it says so. Then ask what counts as a page, whether failed calls are charged, and where your documents go.

Every extraction service demonstrates well on a clean sample. The differences show on your own documents, at their worst. These nine tests take an afternoon and tell you more than any feature list. Each one ends with how 100sands answers it, including where the answer is "no".

1. Your worst files, not your best

Collect twenty real documents and make sure the ugly ones are in: the faxed scan, the photo taken at an angle, the 80-page file, the one with a stamp over the total. Type the correct values for each into a spreadsheet. Everything else is measured against that sheet.

100sands: the Free plan reads 100 documents a month, with no card. It reads PDFs and HTML files that contain text, and nothing else: the faxed scan and the photo will be refused, so if they are a large share of your documents, it is not the service for them.

2. Text PDFs: is the text right and in order?

Send a page of labels and values, a page in two columns, and a page with a table. Read the output as a person would. Are a label and its value together? Are the columns kept apart? Does a table row stay on one line?

100sands: each line of the page comes back as one line, so a label stays with its value and a table row stays together, with a tab between a label and its value and between cells. A two-column page is read straight across, with a tab between the columns on each line. There is no table finder in the text; a document type can have a table field that returns rows with columns.

3. Scans: rotation, resolution, noise

Send the same page at 300 DPI, at 100 DPI, sideways, and as a phone photo. Count the errors; how to measure OCR accuracy has a script.

100sands: it does not do OCR. A scanned PDF is refused with status 422 and the code NO_TEXT_IN_FILE, and an image file with 415, so this test is for the OCR services on your list.

4. Your languages

If you handle anything but English, test it. Right-to-left languages are the hard case: check a line that mixes Hebrew or Arabic with a number and an English name.

100sands: text in every language comes back in reading order with no setting to choose: Hebrew, Arabic, Persian and Urdu with numbers and English names in place, and complex scripts such as Hindi, Bengali, Tamil, Thai, Chinese, Japanese and Korean. One case to check in right-to-left lines: an amount followed by an English word, such as 1,234.56 USD, can come back as USD 1,234.56. That applies to PDFs and HTML files with text; scanned pages are not read in any language.

5. Send the same file twice

Then send it again next week. Do you get the same answer, character for character? Services built on language models may not give one. If your results are stored, audited or compared over time, this test alone can decide.

100sands: yes. AI is used only to set up a document type; after that, documents are read by a fixed extraction, and the same file gives the same output.

6. What happens when it cannot read a file

Send a password-protected PDF, a file of the wrong type, and an empty page. A good service says clearly what is wrong. A bad one returns an empty result that looks like success, or a guess.

100sands: each case is refused with a status code and a reason in JSON: 422 with ENCRYPTED_PDF for a locked file, 415 with UNSUPPORTED_FILE for a file that is not a PDF or HTML, and 422 with NO_TEXT_IN_FILE for a file with no text, such as a scan. One case to know: in a PDF where only some pages have text, the others come back blank. A field whose value is not in the document comes back empty (null), not invented.

7. Limits

Ask for the numbers: largest file, most pages in one call, calls at the same time, and what happens when you pass each.

100sands: files up to 50 MB through the API. Calls running at once: 2 on Free, 5 on Starter and 20 on Pro. A file over the size limit is answered with status 413 and FILE_TOO_LARGE, and a call past the month's allowance with 429 and QUOTA_EXCEEDED; refused calls are not counted.

8. What a page costs, really

Prices per page are only comparable when "page" means the same thing. Ask what counts as a page for a spreadsheet or a Word file, whether a failed call is charged, whether OCR costs more, and what happens when you pass your plan.

100sands: it does not count pages. The unit is a document: one file, whatever its page count, and refused or failed calls are not counted. Free is $0 for 100 documents a month, Starter $20 for 20,000, and Pro $79 for 100,000. Setting up a document type uses AI runs from a monthly allowance (10, 100 or 500); extracting with it afterwards uses none. Past the month's documents, calls are refused with 429 until the next month or an upgrade. The pricing page has every figure.

9. Where your documents go

Ask where files are processed, how long they are kept, who else receives them, and whether they are used to train models.

100sands: files sent to the API are read and not kept; the values extracted from them are kept for 30 days, or 90 on Pro, so you can fetch them again. AI is used only when you set up or edit a document type, on the samples you upload for that; those samples are sent to an AI provider and kept with the document type until you delete them. Documents you extract from are not sent to an AI provider.

Two more, if they apply to you

Positions. If you need to show a user where a value came from, or find values by their place, check that the service returns coordinates. 100sands does not: it returns text and named values, not positions.

Forms and passwords. If you receive fillable PDF forms or locked files, test them. 100sands does not read the values of fillable form fields and does not accept passwords; extracting data from PDF forms and password-protected PDFs show how to handle both before sending.

Scoring

Put the results in one table: a row per test, a column per service, and your typed values as the reference. Weight the tests by what a mistake costs you. For most teams the order is: wrong values that look right, then files silently skipped, then price, then speed.

A free library belongs in that table too. For text PDFs, pypdf or PDFBox may be all you need, and the comparison of Python libraries shows what they do on the same kinds of file. A service earns its price on what the libraries leave to you: scans, for an OCR service; named fields without code; reading order in every language; and not having to run any of it yourself.

Questions

What should I look for in a PDF extraction API?

Correct text in the right order on your own files, honest errors instead of empty results, the same output for the same file, clear limits, a price per page with a clear definition of a page, and a statement of how long documents are kept.

How do I compare OCR APIs?

Run the same set of pages through each, including poor scans, and measure the character and word error rate against text you have checked by hand. Compare the worst pages as well as the average.

What counts as a page in document API pricing?

It varies. A PDF page or an image is usually one page. Ask how spreadsheets and Word files are counted, whether OCR pages cost more, and whether a failed call is charged.

Do I need an API to extract text from PDFs?

Not for PDFs that contain text: a free library such as pypdf or PDFBox reads them well. A service is worth paying for when you need OCR for scans, named fields without writing code, or reading order in languages the libraries get wrong.

Try it on your own documents

A free plan every month, no credit card. See the plans and prices.

Start free