Extract tables from PDFs (scanned & Arabic) to JSON avatar

Extract tables from PDFs (scanned & Arabic) to JSON

Pricing

$15.00 / 1,000 page extracteds

Go to Apify Store
Extract tables from PDFs (scanned & Arabic) to JSON

Extract tables from PDFs (scanned & Arabic) to JSON

Returns every table in a PDF as JSON rows and cells, plus per-page Markdown and text. Works on scanned (image) PDFs with Arabic + English OCR and on digital PDFs, with correct right-to-left order. Use for invoices, bank statements, government gazettes, price lists. Not for images or Word files.

Pricing

$15.00 / 1,000 page extracteds

Rating

0.0

(0)

Developer

Fifty50 Labs

Fifty50 Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 days ago

Last modified

Features

Limited permissions

Share

PDF Table Extractor: scanned & Arabic PDFs to JSON

Turn every table in a PDF into JSON rows and cells, with per-page Markdown and text. It works on scanned (image-only) PDFs using Arabic + English OCR, and on normal digital PDFs. Arabic tables come back in correct right-to-left order, with no reversed words and no flattened columns.

Use it for: invoices, bank statements, price lists, tariff schedules, government gazettes, tenders, financial statements, and any Arabic, English or French PDF where you need the table and not just the text. Not for: images (JPG/PNG), Word or Excel files, handwriting, or charts.

Price: $15 per 1,000 pages read ($0.015 a page). Every table on the page is included. Failed downloads and failed pages are free.

Why this exists

Most PDF tools and LLM file readers flatten tables into one stream of text. Merged cells break, columns slide, and Arabic often comes out backwards (for example, ةعبطلا instead of الطبعة). Scanned PDFs have no text at all, so the model guesses. This Actor:

  • finds table grids on scanned pages from their ruling lines, then reads each cell with Tesseract OCR (ara+eng);
  • reads digital PDFs from their text layer and rebuilds each cell's text from glyph positions, which fixes visually stored (reversed) Arabic and keeps the numbers in the right order;
  • returns columns in reading order (rightmost column first for Arabic tables) with a direction flag;
  • converts Arabic-Indic digits (٠١٢٣) to 0-9 so numbers parse (you can turn this off);
  • straightens skewed scans, removes dot leaders (.......), and reads Latin digits with the English model so amounts like 1,89 and 104,5 come out right;
  • flags low-confidence OCR (low_ocr_confidence) instead of guessing.

Input

FieldDefaultWhat it does
pdfUrls(required)Public links to PDFs, up to 60 MB each
pagesall1-based pages, e.g. 1-3,7. Set this to pay only for the pages you need
maxPagesPerPdf20Safety cap per PDF
ocrModeautoauto (OCR only for scanned pages), always, or never
ocrLanguagesara+engAlso ara, eng, fra, ara+eng+fra, eng+fra
normalizeDigitstrueConverts Arabic-Indic digits to 0-9
includePageTexttrueAdds each page's plain text

Example (one scanned Arabic page, which finishes in about 15 s):

{ "pdfUrls": ["https://www.joradp.dz/FTP/jo-arabe/1990/A1990001.pdf"], "pages": "20" }

Output

You get one dataset item per page:

{
"pdfUrl": "https://…/A1990001.pdf",
"status": "ok",
"page": 29,
"method": "ocr",
"direction": "rtl",
"tableCount": 3,
"tables": [
{
"direction": "rtl",
"nRows": 6, "nCols": 2,
"header": ["التعيين", "التعريفة"],
"rows": [["شغل نفق بوصل مجاري", "1,89 دج عن المتر الخطي سنويا"], ["خط جوي", "0,47 دج عن المتر الخطي سنويا"]],
"cells": [["التعيين", "التعريفة"], ["…", "…"]],
"method": "ocr",
"ocrConfidence": 84.0,
"flags": [],
"bbox": [43.6, 107.3, 687.0, 368.3]
}
],
"markdown": "… | التعيين | التعريفة | …",
"text": "…",
"ocrConfidence": 81.7,
"warnings": []
}
  • cells[0] is the header row and rows holds the body. Columns follow reading order.
  • flags can include low_ocr_confidence or single_column_check_layout.
  • method tells you whether the values came from the text layer (exact) or from OCR (check them when ocrConfidence is under about 70).

Use from AI agents (MCP)

The Actor runs with limited permissions, so it works through the Apify MCP server (call-actor). For agent calls:

  1. Pass pdfUrls and a small pages range. One to three scanned pages finish inside the 30-second MCP wait.
  2. Read tables[].cells straight from the dataset; there is no need to parse Markdown.
  3. Set maxTotalChargeUsd on the run to cap spend. The run stops cleanly when the cap is reached.

Accuracy, honestly

  • Digital PDFs: exact text, including Arabic and mixed Arabic/Latin numbers.
  • Scanned PDFs: results depend on scan quality. On our fixed test set (a 1990 Algerian Official Journal scan with 7 Arabic tariff tables), 85% of the expected rows came back with every value correct before release. Bordered tables work best. Borderless scanned tables come back as page text, not cells.
  • Handwriting and stamps are not read.

Privacy

Files are downloaded into the run, processed in memory, and not stored anywhere except your run's own dataset, which follows your Apify data-retention setting. Nothing is sent to third-party AI services.

Keywords

pdf table extractor, scanned pdf to json, arabic pdf ocr, arabic table extraction, extract tables from pdf, pdf to markdown tables, RTL pdf, invoice table extraction, bank statement pdf to json, government pdf arabic, OCR arabic tables, MCP pdf tool, استخراج جداول من PDF, تحويل PDF عربي إلى Excel