tabula-py wraps the Java tool Tabula, so it needs a Java runtime, and it only reads PDFs that have a text layer: scanned tables come back empty. This tool runs in the cloud, reads scans with OCR, and returns every table with its page number plus an Excel workbook.
tableDetection: lines or text).from apify_client import ApifyClient # pip install apify-client
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("fguiraud/pdf-table-extractor").call(run_input={
"sources": [
{
"url": "https://raw.githubusercontent.com/jsvine/pdfplumber/stable/examples/pdfs/background-checks.pdf"
}
],
"saveFiles": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
for table in item["tables"]:
print(table["page"], len(table.get("rows", [])), "rows")
No Python? Open the Actor page, paste your input in the form and press Start; results export to JSON, CSV or Excel.
Fields from a real run on 2026-10-01 (long values shortened):
{
"source": "https://raw.githubusercontent.com/jsvine/pdfplumber/stable/examples/pdfs/background-checks.pdf",
"status": "ok",
"tableCount": 1,
"pagesProcessed": 1,
"tables": [
{
"index": 0,
"page": 1,
"header": [
"NICS Firearm Background Checks November - 2015",
"",
"",
"..."
],
"rows": [
[
"State / Territory",
"Permit Handgun Long Gun *Other **Multiple Admin",
"",
"..."
],
[
"",
"",
"",
"..."
],
[
"Alabama",
"18,870",
"23,022",
"..."
],
"..."
],
"csv": "NICS Firearm Background Checks November - 2015,,,,,,,,,,,,,,,,,,,,,,,,\nState / Territory,Permit Handgun Long Gun *Other **Multiple Admin,,,,,,Pre-Pawn,,,Redemption,,,Returned/Disposition,,,Rentals,,Private Sale,,,Return..."
}
],
"files": {
"tables": [
"https://api.apify.com/v2/key-value-stores/yBL90wQZMyIloRpUY/records/001-background-checks-table-1.csv?signature=1lTVlAs5h5Hph1kfJpvAp"
],
"xlsx": "https://api.apify.com/v2/key-value-stores/yBL90wQZMyIloRpUY/records/001-background-checks-tables.xlsx?signature=3uLdDUE8rTuwRNVLcbQm"
}
}
$0.003 per document.
Can I choose pages?
Yes, with pageRange, e.g. "2-4".
Can an AI agent use it?
Yes. It is an MCP server at https://mcp.apify.com/?tools=fguiraud/pdf-table-extractor (listed in the official MCP registry), and there is an agent skill for Claude Code, Codex and Cursor. Field-name guesses such as url or urls are accepted.