PDF & HTML Text Extractor for RAG — $0.0005/page avatar

PDF & HTML Text Extractor for RAG — $0.0005/page

Pricing

from $0.50 / 1,000 text rows

Go to Apify Store
PDF & HTML Text Extractor for RAG — $0.0005/page

PDF & HTML Text Extractor for RAG — $0.0005/page

You pay only for pages actually extracted. Nothing extracted, nothing charged. Turn PDF, HTML and text documents into clean plain text, optionally chunked with page numbers for retrieval. Ligatures expanded, hyphenation repaired, markup removed. You supply the URLs.

Pricing

from $0.50 / 1,000 text rows

Rating

0.0

(0)

Developer

Shun Furu

Shun Furu

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Share

PDF & Document Text Extractor — for RAG

Turn PDFs, HTML pages and text files into clean plain text, optionally chunked with page numbers, ready to embed.

Input: ["https://arxiv.org/pdf/1706.03762"]
Output: one row per page — or per chunk — with the page number kept

You supply the URLs. This Actor never decides on its own what to fetch, so it reads only the documents you point it at.

What it fixes

Getting bytes out of a PDF is easy. What ruins a retrieval pipeline is everything that comes with them, and this handles each:

ProblemWhat happens without itHere
Ligaturesfile is one character, not file. Exact search silently misses itExpanded to real letters
HyphenationA word split across two lines becomes re- + trieval, two tokens that mean nothingRejoined
Positioned fragmentsPDFs store text as placed fragments, not lines. Naive extraction joins them with spaces and destroys every paragraphLine and paragraph breaks inferred from vertical position
Invisible charactersSoft hyphens and zero-width spaces break matching in ways nobody can seeRemoved
Smart punctuationCurly quotes and en-dashes stop exact matches workingNormalised
Page numbers lostChunk first and you can no longer cite a pagePage kept on every row and every chunk
Markup in HTMLNav, scripts and styling end up in the textStripped, along with headers, footers and asides

Chunking

Set chunkSize and the text is split on paragraph boundaries with an overlap, so a sentence is never cut in half and each chunk still carries the page it came from.

{
"urls": ["https://arxiv.org/pdf/1706.03762"],
"chunkSize": 1000,
"chunkOverlap": 200
}

Leave chunkSize at 0 and you get one row per page instead — useful when you want to chunk with your own splitter but still want clean text and page numbers.

Input

FieldTypeDefaultWhat it does
urlsarray of stringsone example paperURLs of PDF, HTML or text documents
chunkSizeinteger0Characters per chunk. 0 returns one row per page
chunkOverlapinteger200Characters repeated between consecutive chunks
maxPagesinteger0 (all)Cap pages read per PDF
keywordstringKeep only pages or chunks containing any of these words

Output

FieldTypeDescription
urlstringThe document, after redirects
kindstringpdf | html | text
titlestringPDF metadata title, or the HTML title
authorstringFrom PDF metadata where present
pagenumber | nullPage number for PDFs; null for HTML and text
totalPagesnumber | nullPages in the document
chunknumber | nullChunk index, when chunking is on
textstringThe cleaned text
charactersnumberLength, so you can size embedding batches
fetchedAtstringWhen the row was produced

A SUMMARY record lists every document, what it resolved to, and how many rows it produced.

Pricing

Price
Starting a run$0.00001 — one US cent per 1,000 runs
Each row returned$0.0005 — 50 US cents per 1,000 pages or chunks

A document that cannot be fetched produces no rows, and errors go to the log and SUMMARY rather than the dataset — so a failed document costs nothing.

Typical uses

  • RAG ingestion. Clean, chunked text with page numbers, straight into a vector store.
  • Search indexes. Text that matches what a user actually types, ligatures and all.
  • Analysis. Pull a set of reports or filings and work on the text.
  • AI agents. Flat JSON, no key, sensible defaults that work on the first call.

Notes on data and compliance

  • The caller supplies every URL. This Actor does not crawl, follow links, or discover documents.
  • Nothing behind a login is accessed, and no bot protection is bypassed.
  • Documents over 60 MB are refused rather than silently truncated.

Limitations — stated up front

  • Scanned PDFs return nothing. There is no OCR here; a PDF with no text layer has no text to extract, and the row count will tell you so.
  • Tables lose their column structure. The text is there, the grid is not.
  • DOCX, XLSX and PPTX are not supported yet.
  • HTML extraction is heuristic: it drops nav, headers, footers, asides, scripts and styles, which is right for articles and documentation and less right for pages that are mostly interface.