PDF Tables to JSON: Extract Tables, Text and RAG Chunks (OCR)
Pricing
from $2.10 / 1,000 pdf page processeds
PDF Tables to JSON: Extract Tables, Text and RAG Chunks (OCR)
Use to extract tables from a PDF as JSON (rows, page, cell coordinates), convert a PDF to text chunks for a RAG pipeline with page citations, or OCR a scanned PDF and return the text. Input: pdfUrls. $0.003 per page, +$0.01 per OCR page. Not for Word/Excel files or audio.
Pricing
from $2.10 / 1,000 pdf page processeds
Rating
0.0
(0)
Developer
Small Hours
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
19 days ago
Last modified
Categories
Features
Share
A retrieval answer that cites "report.pdf" is not a citation. This Actor returns PDF chunks that cite p. 2, and tables as real cells with the coordinates to prove it.
For AI agents choosing a tool
- Use when: you have PDF URLs and need tables as JSON rows with page numbers and cell coordinates, page text, Markdown, or RAG chunks that cite a page. Scanned PDFs work with
"ocr": "auto".- Do not use when: the file is Word, Excel, PowerPoint, HTML or an image (use
documents-to-json-chunks), audio or video (usetranscribe-to-json-chunks), a password-protected PDF, or behind a login.- Input:
{"pdfUrls": ["https://example.com/report.pdf"]}. Optional:pages(for example"1-5"),ocr(offdefault,autofor scans),outputMode(pagesdefault;documentsfor one item per PDF;rowsfor one flat record per table row, ready for a spreadsheet),chunkSize.- Output: per page (or per PDF):
sourceUrl,documentId,page,pageCount,text,markdown,tables(rows,header,bbox,page,contextwith units, seasonal adjustment, footnotes and header paths),chunks(chunkIndex,page,charStart,charEnd,text,citation,tables,units,seasonalAdjustment),ocrUsed,warnings.- Price per event: $0.003 per page processed (
page-processed; in rows mode only pages that produced rows) plus $0.01 per OCR page (ocr-page); Store discounts apply on Bronze, Silver and Gold. Never charged: password-protected, damaged, not-a-PDF and oversized files, blank pages, and scanned pages when OCR is off.- Agent payments: limited permissions, pay per event only, no Standby mode, so it is eligible for Apify's agentic payments.
Real output. Page 2 of the Federal Reserve H.4.1 release dated 2026-10-22, input {"pdfUrls": ["https://www.federalreserve.gov/releases/h41/20261022/h41.pdf"], "pages": "2"}. That is a fixed, dated public file, so you can run it and get this back. One table, first rows shown, plus one RAG chunk:
{"page": 2, "bbox": [35.0, 173.27, 503.75, 519.23], "rowCount": 33, "columnCount": 4, "rows": [["Federal Reserve Banks", "Oct 21, 2026", "Oct 14, 2026", "Oct 22, 2025"],["Reserve Bank credit", "6,706,861", "- 789", "+ 161,908"],["Securities held outright1", "6,470,860", "+ 492", "+ 187,540"],["U.S. Treasury securities", "4,571,248", "+ 1,337", "+ 374,817"], "..."]}{"chunkIndex": 1, "page": 2, "charStart": 460, "charEnd": 1657,"text": "Oct 14, 2026 Oct 22, 2025\nReserve Bank credit 6,706,861 - 789 + 161,908 6,706,851\n...","units": "Millions of dollars","citation": {"type": "page", "page": 2, "label": "p. 2"}}
Two fields there are the reason to use this instead of a generic extractor. citation.label means a retrieval hit points at page 2, not at a filename. units means the number is known to be millions, even though the words "Millions of dollars" are printed three lines above the table and would otherwise land in a different chunk.
$0.003 per page processed, plus $0.01 per page only where OCR actually ran. Pages that have no text (scanned with OCR off, or blank), password-protected or damaged files and anything that is not a PDF are never charged; you get a plain-English error item instead.
Give this Actor PDF URLs and get structured JSON back. It is a PDF text extractor, PDF to text and PDF to Markdown converter, PDF table extractor and PDF OCR tool for scanned PDFs, with PDF metadata, in one call. Two things set it apart from the usual PDF text extractor:
- Tables as cells with coordinates. Every table comes back as
rows(an array of rows, each row an array of cell strings, already split), with itspagenumber, abbox[x0, top, x1, bottom]in PDF points, a detectedheader, a GitHub Markdown rendering, and, on request, abboxfor every single cell. You can link any value back to the exact spot on the page. - RAG-ready chunks with page references. Page text is split into sentence-aligned chunks of a size you choose, each carrying
page,chunkIndex,charStart,charEndand acitationobject, so citations in a retrieval pipeline point at a page and a character range, not just a file. The chunks use the same schema as the sibling Actor transcribe-to-json-chunks, which returns recordings as chunks with time citations, so one pipeline can ingest PDFs and audio or video the same way.
On top of that you get each page's plain text, a Markdown version (headings by font size, tables in place), PDF metadata, and optional OCR for scanned pages. It is a PDF to JSON converter, a PDF table extraction tool, a PDF parser, a PDF to Markdown converter and a RAG chunker in one call, priced per page.
What it does
- Downloads each PDF from the URL you give (up to 100 per run, 50 MB each by default), checks that it really is a PDF, and parses it page by page. Nothing is stored after the run: the file is deleted as soon as it is parsed.
- Tables: ruled tables are found by their lines; when ruled columns have no row lines the cells are re-read by text rows; tables without any lines are found by text alignment with strict quality filters (at least 3 rows, 2 columns, half the cells filled, some numeric content) so paragraphs do not come back as fake tables. Overlapping detections are merged, tables under 2 rows or 2 columns are dropped. Each table has
tableIndex,page,bbox,rowCount,columnCount,header(array or null),rows,markdown,strategy, and withincludeCellBoxesacellsarray of{row, col, text, bbox}. - Text: reading-order text per page with line breaks. Pages whose generator wrote no space glyphs (common with TeX and some report tools) still come back with proper word spacing.
- Markdown: lines whose font is 20 percent above the page's body text become
##headings, wrapped lines are joined into paragraphs, tables are rendered as Markdown tables where they appear. - Chunks:
chunkSizecharacters (default 1200, about 300 tokens) withchunkOverlap(default 150), cut at sentence ends when possible. Offsets are into that page'stext. Each chunk carriescitation: {"type": "page", "page": 2, "label": "p. 2"}(see Family below). - OCR:
off(default),auto(only pages with fewer than 20 characters of text layer) oralways. Pages are rendered at 200 dpi and read with Tesseract. OCR pages return text, Markdown paragraphs and chunks; withincludeWordBoxesalso word boxes with confidence. About 2 to 3 seconds per page. - Two output shapes:
pages(one dataset item per page, the default, ideal for RAG) ordocuments(one item per PDF withmetadata, all text joined by form feeds, and every table and chunk tagged with its page). - A PDF that cannot be fetched or read never fails the run: it produces one item with
erroranderrorType(http_403,http_404,not_pdf,too_large,timeout,encrypted, ...) and is not charged. The other PDFs still return data.
Who it is for
- AI agents and RAG pipelines that need page-cited chunks and real tables instead of a wall of text. Call it through the Apify MCP server (see below) and index the
chunksarray as is. - Data teams turning recurring PDF reports into rows: statistical releases, price lists, schedules, invoices with a text layer.
- Finance and research analysts pulling tables out of filings, central bank releases and research reports, with coordinates to verify every number against the page.
- Compliance and legal teams that must quote a page and position, not just a document.
- Anyone who needs PDF to Markdown or OCR PDF to text for a handful of pages without installing anything.
Quick start
- Open the Actor in Apify Console and press Start. The default input parses a public Federal Reserve statistical release (12 pages, several tables) in a few seconds.
- Replace the URL with your own PDF link. Use
pageslike"1-5,8"to parse only what you need. To reproduce the sample output above exactly, usehttps://www.federalreserve.gov/releases/h41/20261022/h41.pdfwithpages: "2". - For scanned PDFs set
ocrtoauto(mixed documents) oralways(fully scanned). - For one JSON object per file set
outputModetodocuments. - Read results from the default dataset (JSON, CSV or Excel) or the API:
https://api.apify.com/v2/datasets/<datasetId>/items. TheSUMMARYrecord in the key-value store lists every file's status, pages processed and charged, OCR pages and errors.
Input example
{"pdfUrls": ["https://www.federalreserve.gov/releases/h41/current/h41.pdf"],"pages": "1-3","outputMode": "pages","extractTables": true,"markdown": true,"chunkSize": 1200,"chunkOverlap": 150,"ocr": "off","includeCellBoxes": false}
All fields are optional. A run with no input parses the Federal Reserve release above.
| Field | Type | Default | Meaning |
|---|---|---|---|
pdfUrls | array of strings | one sample PDF | Public http(s) links to PDF files, up to 100 |
pdfUrl | string | empty | Shortcut for a single URL, merged into pdfUrls |
pages | string | all | 1-based pages like "1-5,8" or "3-" |
maxPagesPerPdf | integer 1 to 1000 | 50 | Cap on pages processed and charged per file |
outputMode | pages or documents | pages | One item per page, or one per PDF |
extractTables, extractText, markdown | booleans | true | Turn parts of the output off |
chunkSize | integer | 1200 | Chunk size in characters, 0 disables chunks |
chunkOverlap | integer | 150 | Characters shared by consecutive chunks |
ocr | off, auto, always | off | When to run OCR |
ocrLanguage | string | eng | Tesseract language, only English is installed |
maxFileSizeMb | integer 1 to 200 | 50 | Larger files are skipped with an error item |
includeWordBoxes | boolean | false | Add every word with its box to each page |
includeCellBoxes | boolean | false | Add a box for every table cell |
Output example
One page item from the default run (page 2 of the Federal Reserve H.4.1 release; text, markdown, rows and chunks are shortened here):
{"sourceUrl": "https://www.federalreserve.gov/releases/h41/current/h41.pdf","documentId": "6cb2cd9838d643a55fd6591794268e74e7b0224d","fileName": "h41.pdf","page": 2,"pageCount": 12,"width": 612,"height": 792,"text": "FEDERAL RESERVE statistical release\nH.4.1\nFactors Affecting Reserve Balances of Depository Institutions and\nCondition Statement of Federal Reserve Banks\nOctober 22, 2026\n1. Factors Affecting Reserve Balances of Depository Institutions\nMillions of dollars\n...","markdown": "## FEDERAL RESERVE statistical release\n\nH.4.1\n\n## Factors Affecting Reserve Balances of Depository Institutions and\n\n...\n\n| Averages of daily figures | | |\n| --- | --- | --- |\n| Oct 21, 2026 | Oct 14, 2026 | Oct 22, 2025 |\n| 6,706,861 | - 789 | + 161,908 |\n...","tables": [{"tableIndex": 0,"page": 2,"bbox": [251.75, 173.27, 503.75, 519.23],"rowCount": 33,"columnCount": 3,"header": ["Averages of daily figures", "", ""],"rows": [["Averages of daily figures", "", ""],["", "Change from week ended", ""],["Week ended", "", ""],["Oct 21, 2026", "Oct 14, 2026", "Oct 22, 2025"],["6,706,861", "- 789", "+ 161,908"],["6,470,860", "+ 492", "+ 187,540"]],"markdown": "| Averages of daily figures | | |\n| --- | --- | --- |\n...","strategy": "lines+text"}],"chunks": [{"chunkIndex": 0,"page": 2,"charStart": 0,"charEnd": 608,"text": "FEDERAL RESERVE statistical release\nH.4.1\n...","citation": { "type": "page", "page": 2, "label": "p. 2" }},{"chunkIndex": 1,"page": 2,"charStart": 460,"charEnd": 1659,"text": "...","citation": { "type": "page", "page": 2, "label": "p. 2" }},{"chunkIndex": 2,"page": 2,"charStart": 1509,"charEnd": 2103,"text": "...","citation": { "type": "page", "page": 2, "label": "p. 2" }}],"ocrUsed": false,"charCount": 2103,"warnings": [],"extractedAt": "2026-10-23T05:39:57.921Z"}
With includeCellBoxes: true each table also has "cells": [{"row": 4, "col": 0, "text": "6,706,861", "bbox": [251.75, 208.93, 337.25, 217.95]}, ...].
Coordinates are PDF points (1/72 inch) with the origin at the top-left corner of the page; width and height give the page size in the same unit, so dividing by them yields relative positions for any viewer.
In documents mode the item has pageCount, pagesProcessed, pages, metadata (title, author, creator, producer, creationDate), text (pages joined with \f), markdown, tables (all pages, each with page), chunks (all pages, each with page), ocrPagesUsed, charCount, warnings and extractedAt.
Rows output: one record per table row (spreadsheet-ready)
Set "outputMode": "rows" to get a flat dataset: one record per table row instead of one item per page. Console and the API export it straight to CSV or Excel, so a table in a PDF becomes a spreadsheet without any cleanup code.
Each record has sourceUrl, documentId, fileName, page, table (1-based number of the table on the page) and row (1-based, header rows not counted), then the table's context fields (tableTitle, units, seasonalAdjustment, footnotes, tableNotes, tableWarning, explained in the next section), then one field per table column. The column names are the full header path when the PDF has ruled lines and a recognized header, for example Averages of daily figures > Change from week ended > Oct 14, 2026; otherwise the columns are col_1, col_2 and so on and the first row stays a data row. Blank header cells become col_N, duplicates get _2, and names are cut to 120 characters.
Real output, page 2 of the Federal Reserve H.4.1 release ({"pdfUrls": ["https://www.federalreserve.gov/releases/h41/current/h41.pdf"], "pages": "2", "outputMode": "rows"}), one record (long fields shortened with ...):
{"page": 2,"table": 1,"row": 4,"tableTitle": "1. Factors Affecting Reserve Balances of Depository Institutions","units": "Millions of dollars","seasonalAdjustment": "","footnotes": "2. Face value of the securities.","tableNotes": "Note: Components may not sum to totals because of rounding. ...","tableWarning": "31 numeric values sit to the right of this table ...","Reserve Bank credit, related items, and reserve balances of depository institutions at Federal Reserve Banks": "Bills2","Averages of daily figures > Week ended > Oct 21, 2026": "566,570","Averages of daily figures > Change from week ended > Oct 14, 2026": "+ 1,078","Averages of daily figures > Change from week ended > Oct 22, 2025": "+ 371,077"}
Billing in rows mode: one page-processed event ($0.003) only for a page that produced at least one row. Pages without tables are free, and a PDF with no tables at all returns a free no_tables error item that says what to try instead. Rows mode does not return text, Markdown or chunks, and scanned pages are not supported (OCR text has no table structure); use pages or documents for those. Tables whose columns are only separated by spaces (many county tax sale lists) can come back split into many narrow columns: check a few pages before relying on them.
Units, seasonal adjustment, footnotes and header lineage
Statistical tables mean little without the text around them: "Millions of dollars" vs "Thousands of Units", "seasonally adjusted" vs "not", the footnote that qualifies a row, the header cells above a column. When a page is chunked, that text can end up in a different chunk from the numbers. In every output mode the Actor now keeps it attached, read from the page's own text lines and their positions (no AI, no extra charge):
- Each table in
tables[](pages and documents mode) has acontextobject:title(the caption above it),units,seasonalAdjustment,footnotes,headerRows(how many leading rows are header rows),headerPaths(one string per column, outermost header cell first, joined with>; a header cell merged across columns is repeated for each),warningsandextendedColumns. - Each chunk has
tables(1-based numbers of the page's tables whose area the chunk covers),unitsandseasonalAdjustment(the text in force at the start of the chunk plus anything stated inside it, so a chunk that starts in the middle of a table still says "Millions of dollars"). Together withpagethis lets you trace a chunk to the table whosecontextyou can inspect. - Each row in rows mode has
page,table,row,tableTitle,units,seasonalAdjustment,footnotes(the numbered footnotes whose number is attached to the row label, such asBills2orTotal¹),tableNotes(the unnumbered Note and Source lines) andtableWarning, and the full header path as the column name.
What it does not do: it finds units and seasonal-adjustment text by pattern (millions, thousands, billions, "seasonally adjusted" and variants), so unusual wording is missed and the field is empty. Numbered footnotes stay with the table they sit under; for a table that continues over several pages the footnotes printed on the following page are used. Columns printed just outside the ruled area (the Federal Reserve H.4.1 "Wednesday level" column is one) are recovered when they are clearly part of the table: a column of numeric values (numbers, percentages, parentheses, ± or minus signs) no more than 36 points to the right of the table, with a value on at least 80 percent of the table's body rows (every row under the header counts, also rows without numbers), lined up with those rows and with no other text between it and the table. Up to 6 such columns are added to rows, markdown and columnCount, their header comes from the words printed above them, and context.extendedColumns says how many were added (cell boxes of added columns are approximate). Nothing is added across a clear gap or beside a text column. If numbers are still left outside, warnings says how many numeric values sit to the right of the table, and the page text still has them. A lined-up column that is filled on fewer than 80 percent of the rows is not added (a mostly empty column is worse than none); the warning then also says how many values it had and on how many rows, for example "a column of 7 values on 7 of 27 rows was found but is too incomplete to add". Rows with no value in a recovered column keep an empty cell. Scanned (OCR) pages have no table or position context.
Family: the same chunks for PDFs and recordings
This Actor has a sibling, transcribe-to-json-chunks, which turns audio and video (MP3, WAV, M4A, MP4, MOV, WebM and more) into the exact same chunk schema with time citations instead of page citations. Both emit:
{ "chunkIndex": 0, "text": "...", "charStart": 0, "charEnd": 1187, "citation": { "type": "page", "page": 3, "label": "p. 3" } }{ "chunkIndex": 0, "text": "...", "charStart": 0, "charEnd": 1187, "citation": { "type": "time", "startMs": 723000, "endMs": 768000, "label": "00:12:03-00:12:48" } }
So one ingestion pipeline can index chunks[].text with citation.label as the display reference, whether the source was a 40-page report or a 40-minute meeting recording. The chunker is the same code in both Actors (sentence-aligned, character-sized, with overlap), so chunk boundaries behave the same way too.
Recipes: PDF tables and text for RAG, LangChain, pandas and spreadsheets
Copy-paste starting points. Replace <APIFY_TOKEN> with your own token and the link with your PDF. The Python recipes are executed by tests/recipes_test.py against real output items of this Actor.
1. PDF to LangChain documents with page numbers (pip install apify-client langchain-core)
from apify_client import ApifyClientfrom langchain_core.documents import Documentclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("landoz/pdf-to-json-tables").call(run_input={"pdfUrls": ["https://example.com/annual-report.pdf"], "pages": "1-10"})items = client.dataset(run["defaultDatasetId"]).list_items().itemsdocs = [Document(page_content=chunk["text"],metadata={"source": item["sourceUrl"], "page": chunk["page"], "label": chunk["citation"]["label"]},)for item in itemsfor chunk in item.get("chunks", []) # a PDF that failed is an item with "error" and no chunks]
2. PDF tables to a pandas table, one row per table row (pip install apify-client pandas). Rows mode works best on ruled tables with a header, such as statistical releases.
import pandas as pdfrom apify_client import ApifyClientclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("landoz/pdf-to-json-tables").call(run_input={"pdfUrls": ["https://example.com/statistical-release.pdf"], "pages": "2-3", "outputMode": "rows"})rows = client.dataset(run["defaultDatasetId"]).list_items().itemsdf = pd.DataFrame([r for r in rows if "row" in r]) # skips error items
3. One call from the command line (curl). Replace $APIFY_TOKEN with your own token (Apify Console, Settings, API and Integrations). The call returns the dataset items directly; runs started this way are billed to your account exactly like runs started in Console.
curl -s -X POST "https://api.apify.com/v2/acts/landoz~pdf-to-json-tables/run-sync-get-dataset-items" \-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \-d '{"pdfUrls": ["https://example.com/annual-report.pdf"], "pages": "1-3"}'
To run it every week or on a schedule, use Apify Schedules; to send results onward, use a webhook or an Apify integration.
Why this one
Most PDF extractors work on the clean sample and then lose a day on a real file. Two specific failures, and what this does about them.
A column that sits outside the table's ruled area. On H.4.1 page 2 the "Wednesday level" column falls outside the ruled box, so rows kept their labels and lost those numbers. Build 0.1.21 recovers it: 29 of 29 values in that column, measured on platform runs against the 2026-10-22 release. The Census "West, 1 unit" column recovers 33 of 33 the same way. Where recovery is not safe the output warns instead of silently dropping values.
Chunks that forget the units. A developer building retrieval over Census and Fed releases pointed out that once a table is chunked, the units, the column dates, the footnotes and the words "seasonally adjusted" are gone, so a number can be indexed with no way to tell thousands from millions. They were right. Before the fix, 1 of 3 chunks on H.4.1 page 2 said "Millions of dollars", 1 of 5 on Census page 3 said "Thousands of Units", and the three Census chunks holding a "Not seasonally adjusted" table never said so. Build 0.1.20, released the same day it was reported, attaches that context to the table, to every chunk and to every row. After: units on 3 of 3 H.4.1 chunks and 5 of 5 Census chunks, and all three of those Census chunks now say "Not seasonally adjusted". A fixture with two tables of identical numbers, one in thousands seasonally adjusted and one in millions not, keeps them apart under ten checks. No price change, nothing extra charged.
Chunk boundaries. No chunk starts or ends on half a word. The chunker cuts at the last space when no sentence break is in reach, every Actor in this family carries a byte-identical copy of it, and the build fails if a copy drifts.
Tested every night against the current Federal Reserve H.4.1 release, pages 1 to 3.
Pricing in plain words
Pay per page, nothing else: $0.003 per page processed (the page-processed event), plus $0.01 per page only when OCR actually ran on it (the ocr-page event), plus Apify's standard tiny Actor start fee. Paid Apify plans get Store discounts automatically: $0.0027, $0.0024 and $0.0021 per page, and $0.009, $0.008 and $0.007 per OCR page, on Bronze, Silver and Gold. A 30-page report costs 9 cents; fully OCR'd it costs 39 cents. Both output modes charge per processed page. Failed downloads and unreadable PDFs are never charged. You set the maximum you are willing to spend per run; when the limit is reached the Actor stops parsing and still finishes successfully, and the SUMMARY record says so. Platform compute is included in the price.
A real run, at list price. The 48-page NIST AI RMF 1.0: 152 chunks, 48 pages charged, $0.144. A 30-page report is 9 cents, and 39 cents if every page is OCR'd.
Tips for best results
- Start with
pages(for example"1-3") to see the output and the cost before running a whole document; you pay per page processed. - Use
"outputMode": "rows"for ruled tables with a header row; use the defaultpagesmode when you need text, Markdown and RAG chunks as well. - Leave
ocron"auto"for mixed documents: only pages with no text layer are read with OCR, and only those cost the extra $0.01. - Pass
includeCellBoxesorincludeWordBoxesonly when you need coordinates; they make the output larger. - Link to the PDF file itself. If a site returns HTTP 403, download the file and upload it to an Apify key-value store, then use that record's link.
Limits
- File size: 50 MB per PDF by default (
maxFileSizeMb, up to 200). Up to 100 URLs per run. - Pages: 50 per PDF by default (
maxPagesPerPdf, up to 1000).pageCountalways shows the true total. - Text-layer PDFs only unless you turn OCR on. A scanned PDF returns empty text with
ocr: "off"; useautooralways. OCR takes about 2 to 3 seconds per page and is English only (eng) in this build. - Encrypted or password-protected PDFs are not supported and return an
encryptederror item. - Table detection is heuristic. Ruled tables are reliable. Tables drawn only with whitespace are found when they look like data (mostly numbers, dense); text-only tables without lines may be missed, and caption lines directly above an unruled table can be absorbed as a first row. Where a ruled table has sub-columns without lines, those values stay together in one cell. Check
strategyandbboxwhen quality matters. - Reading order follows the PDF's own layout; multi-column articles are read left to right by line, as most parsers do.
- URLs must be public. Pages behind a login (HTTP 401) or a bot wall (HTTP 403) return an error item; upload such files to storage you control (for example an Apify key-value store) and pass that URL.
- Runs are stateless. PDFs are fetched from the URLs you provide, parsed in memory and on the run's disk, and deleted when the run ends. Only the JSON you see in the dataset is kept.
Use it from an AI agent (Apify MCP server)
Connect your agent to https://mcp.apify.com (see the Apify MCP docs for Claude, Cursor, VS Code and others). Then:
- Search for the tool:
search-actorswith the query "pdf to json" or "pdf table extraction". - Read the schema:
fetch-actor-detailsfor this Actor returns the input fields above and the dataset schema. - Call it:
call-actorwith{"pdfUrls": ["https://example.com/report.pdf"]}, or{"pdfUrls": ["..."], "pages": "1-10", "outputMode": "documents"}for one object per file, or{"pdfUrls": ["..."], "ocr": "auto"}when some pages may be scanned. - Read results with
get-dataset-items. Indexchunks[].textwithpage,charStartandcharEndas metadata; feedtables[].rowsstraight into a dataframe.
The Actor runs with limited permissions and charges only pay-per-event events, so it works with Apify's agentic payments.
Worked example: what an AI agent sends
Recorded against the live Actor on 2026-10-25 through Apify's MCP server (https://mcp.apify.com, sign in with OAuth or send Authorization: Bearer <APIFY_TOKEN>). The tool names and arguments are the server's own.
- Find the Actor.
search-actorsreturns 5 Actors by default and works best with 1 to 3 terms naming the data type. This query put this Actor first:
{ "tool": "search-actors", "arguments": { "keywords": "PDF tables JSON", "limit": 5 } }
- Read the input schema and the price:
{ "tool": "fetch-actor-details", "arguments": { "actor": "landoz/pdf-to-json-tables" } }
- Run it with a spending cap:
{"tool": "call-actor","arguments": {"actor": "landoz/pdf-to-json-tables","input": {"pdfUrls": ["https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf"],"outputMode": "documents","chunkSize": 1000},"callOptions": { "maxTotalChargeUsd": 0.5 }}}
- Read the chunks. The call returns a
datasetId, not the items:
{ "tool": "get-dataset-items", "arguments": { "datasetId": "<datasetId from step 3>", "fields": "chunks", "limit": 1 } }
That run parsed all 48 pages into 152 chunks in about 9 seconds, $0.144 at list price. One of the chunks:
{"chunkIndex": 12,"page": 7,"charStart": 0,"charEnd": 972,"text": "NIST AI 100-1 AI RMF 1.0 Social responsibility can refer to the organization’s responsibility “for the impacts of its decisions and activities on soci...","citation": { "type": "page", "page": 7, "label": "p. 7" }}
The agent can now answer "...according to the NIST AI RMF, p. 7" instead of citing the whole file.
Skip the search: connect with the Actor preloaded as its own tool, https://mcp.apify.com?tools=actors,landoz/pdf-to-json-tables. The tool is named landoz--pdf-to-json-tables and takes this Actor's input directly.
Open-source credits and licenses
Everything inside is permissively licensed. No copyleft components are used or bundled.
| Component | Role | License |
|---|---|---|
| pdfplumber | Text, words, characters and table detection | MIT |
| pdfminer.six | PDF parsing engine under pdfplumber | MIT |
| pypdfium2 (PDFium) | Page rendering for OCR | BSD-3-Clause or Apache-2.0 |
| Pillow | Image handling for OCR | MIT-CMU (HPND) |
| pytesseract | Python bridge to Tesseract | Apache-2.0 |
Tesseract OCR with the eng model | OCR engine | Apache-2.0 |
| Apify SDK for JavaScript, got-scraping | Actor runtime and downloads | Apache-2.0 / MIT |
Base image apify/actor-node:22 (Node.js on Alpine Linux) | Runtime | MIT / various permissive |
Python dependencies pulled in transitively (cffi, pycparser, cryptography, charset-normalizer, packaging) are MIT, BSD or Apache licensed. The Actor's own code is Apache-2.0.
FAQ
Does it work on scanned PDFs? Yes, set ocr to auto (mixed documents) or always (fully scanned). OCR pages cost $0.01 extra each. Only English OCR is installed today.
Why did a table come back with the row labels missing? When a PDF draws ruled boxes around the numbers but prints the labels outside the box, the label column is not part of the ruled table. The labels are still in text and markdown, and the table's bbox tells you where it sits on the page.
Can I get the position of every cell? Yes, set includeCellBoxes: true. Each table then carries cells: [{row, col, text, bbox}].
One item per page or one per document? outputMode: "pages" (default) gives one dataset item per page, which is the natural unit for RAG. outputMode: "documents" gives one item per PDF with every table and chunk tagged with its page.
Are my PDFs stored? No. Each file is downloaded from the URL you give, parsed, and deleted when the run ends. Results live in your own dataset.
What does it cost? $0.003 per page processed, plus $0.01 per page only when OCR runs, less on paid Apify plans. A 30-page report with a text layer costs 9 cents.
Where do recordings fit? The sibling Actor transcribe-to-json-chunks returns the same chunk schema with time citations. Working pipelines for both are in the rag-ingestion-examples repository.
Can I run it on a schedule? Yes. Create a schedule in Apify Console with the input you want (a fixed PDF link such as a monthly statistical release works well) and add a webhook or an integration to send each run's dataset onward.
How do I call it from Python, Node.js or curl? See the Recipes section above. Any call that works with the Apify API works here; the input fields are listed in the input example.
Can it read password-protected PDFs? No. They return a free error that says so, and nothing is charged.
Related Actors
- Word, Excel, PowerPoint & HTML to RAG Chunks: the same chunk format for Office files, HTML and images (OCR), so one pipeline ingests reports, recordings and Office files.
- Audio & Video Transcription to JSON
Support
Open an issue on the Actor's Issues tab in Apify Console. Include the run id, the PDF URL (if you can share it) and the input you used.