VOOZH about

URL: https://apify.com/awesome_highboy/docforge

⇱ PDF to RAG Markdown Chunks for Embeddings & Vector DBs Β· Apify


πŸ‘ PDF to RAG Markdown Chunks for Embeddings avatar

PDF to RAG Markdown Chunks for Embeddings

Pricing

from $3.00 / 1,000 page parseds

Go to Apify Store

PDF to RAG Markdown Chunks for Embeddings

Convert PDFs into token-bounded Markdown chunks for RAG, embeddings, and vector databases (Pinecone, Chroma, Weaviate, Qdrant). Set maxTokens + overlap; get clean chunks with page number, token count, and SHA-256 content hash for dedup. JSON dataset ready for any LLM pipeline.

Pricing

from $3.00 / 1,000 page parseds

Rating

0.0

(0)

Developer

πŸ‘ Adam

Adam

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

DocForge: PDF β†’ AI-Ready Markdown Chunks for RAG

Turn PDF files you own into clean, deterministic, token-bounded text chunks β€” each tagged with the page it came from β€” ready for RAG pipelines and embeddings.

What it does

DocForge takes a list of PDF URLs that you own or are authorized to process, downloads each file, and extracts its text page by page. Each page's text is cleaned of the artifacts that normally wreck embeddings β€” words split by a hyphen at a line break, ligatures, control characters, and the runs of stray whitespace PDFs emit between columns β€” and then split into sentence-aware, token-bounded chunks. Each chunk is emitted as a structured dataset record carrying its source document, its true originating page number, a chunk index, an estimated token count, and a content hash. A final run summary reports how many pages were parsed and how many chunks were emitted.

The chunker is sentence-aware and overlap-aware: it packs whole sentences up to your target chunk size instead of cutting mid-sentence, carries a configurable overlap between consecutive chunks, and guarantees no chunk exceeds your configured maxTokens. Each chunk's text is emitted in the markdown field as clean extracted text, so it drops straight into a vector store or embedding job β€” and because every chunk knows its page, retrieved passages can cite the exact page they came from.

Before any work begins, DocForge requires an explicit ownership attestation. If that attestation is not set, the run is rejected with zero billing. Pages that contain no extractable text (e.g. scanned images) are skipped rather than emitted as blank chunks, and documents that fail to download or parse are caught, logged, and skipped rather than guessed at, so the dataset only contains content that was actually extracted.

Input

FieldTypeRequiredDescription
pdfUrlsarray of stringsYesURLs of PDFs you own or are authorized to process.
chunkingobjectNoChunking options. Prefilled with maxTokens: 512 and overlapTokens: 64.
ownership_attestationbooleanYesYou confirm you own or are authorized to process these documents. Must be true or the run is rejected before any billing.

The chunking object accepts:

  • maxTokens (default 512) β€” the maximum estimated token size of each chunk; no chunk exceeds this.
  • overlapTokens (default 64) β€” how much each chunk overlaps the previous one, to preserve context across chunk boundaries.

Token counts are word-based estimates (approximately words Γ— 1.3), not exact tokenizer counts.

Output

DocForge writes two record types to the dataset, distinguished by record_type.

chunk β€” one record per emitted text chunk:

FieldTypeDescription
record_typestringAlways chunk.
source_docstringThe source PDF URL the chunk came from.
page_numberintegerThe 1-based page the chunk's text was extracted from. Use it to cite or filter retrieved passages by page.
chunk_indexintegerZero-based index of the chunk within its document (continuous across pages).
markdownstringThe chunk's cleaned text (de-hyphenated, whitespace- and unicode-normalized).
token_countintegerEstimated token count for the chunk (never exceeds maxTokens).
content_hashstringDeterministic sha256:<64 hex> hash of the chunk text.

run_summary β€” one record per run:

FieldTypeDescription
record_typestringAlways run_summary.
pages_parsedintegerTotal document pages parsed in the run.
chunks_emittedintegerTotal chunks emitted in the run.

Pricing

DocForge uses Apify Pay-Per-Event pricing. You are billed only for what a successful, gated run actually does:

EventPrice (USD)When it fires
actor_run_start$0.02Once per run, after the run's gates pass.
page_parsed$0.003Per document page converted to text.
chunk_emitted$0.0005Per RAG chunk emitted.

Example run cost. Processing a single 40-page PDF that yields 120 chunks:

  • 1 Γ— actor_run_start = $0.02
  • 40 Γ— page_parsed = $0.12
  • 120 Γ— chunk_emitted = $0.06
  • Total β‰ˆ $0.20

If the ownership attestation is missing, the run is rejected with zero billing.

Why this Actor

  • Page-accurate citations. Every chunk carries the real page it was extracted from, so retrieved passages can point back to the exact page β€” not a placeholder. (On a 14-page sample paper, that's 14 distinct page numbers across the chunks instead of one.)
  • Clean text, not PDF soup. De-hyphenation reconnects words broken across line wraps (β‰ˆ150 fixes on a typical research PDF), ligatures and full-width characters are unicode-normalized, control characters are stripped, and runs of whitespace are collapsed β€” so your embeddings see real words, not inter- national.
  • Sentence-aware chunking. Chunks are packed from whole sentences up to your maxTokens instead of being cut mid-sentence, with configurable overlap to preserve context across boundaries. No chunk ever exceeds maxTokens.
  • Deterministic, idempotent output. Every chunk carries a sha256: content hash computed directly from its text, so identical input produces identical hashes β€” ideal for deduplication, change detection, and re-run safety.
  • Ownership-gated by design. A required attestation must be true before any processing or billing happens. DocForge runs on PDFs you provide and are authorized to use; it does not crawl or scrape third-party sites.
  • No invented content. Text is extracted deterministically with no LLM in the loop. Empty/scanned pages and documents that fail to fetch or parse are caught, logged, and skipped β€” they are not hallucinated or padded. The run summary reflects only what was genuinely parsed and emitted.

About this Actor

This Actor is AI-authored and operated under the publisher's LLC. It uses Actor.charge() strictly to bill the customer for the Pay-Per-Event units above; the Actor contains no payout or money-out capability. All claims here reflect behavior present in the Actor's code.

You might also like

RAG Web Crawler: Clean Markdown + Token-Sized Chunks

commonelements/rag-ready-crawler

Turn any website into embeddings-ready chunks for RAG and vector databases. Structure-aware token-sized chunking, clean LLM-ready markdown, per-chunk citations and metadata, dedup, and junk filtering. Pay per result, no surprise compute bills.

πŸ‘ User avatar

Harry Schoeller

2

Website to Text & Markdown β€” AI / RAG Content Crawler

inexhaustible_glass/rag-website-crawler

Scrape any website into clean text & Markdown with RAG-ready chunks and token counts for LLMs, vector databases (Pinecone, Qdrant) and AI chatbots. Also extracts linked PDF/Word/Excel. Anti-block, robots.txt-aware. Website-to-text for beginners, full RAG pipeline for pros. CPU only, no API key.

7

RAG Pipeline

labrat011/rag-pipeline

One-click RAG pipeline: chunks text, generates embeddings, and stores vectors in Pinecone or Qdrant. Provide your content and API keys -- the orchestrator handles the rest.

Rag Content Chunker

labrat011/rag-content-chunker

Turn raw text, Markdown, or Apify datasets into token-perfect RAG chunks with deterministic IDs, source metadata, and a billing-ready summaryβ€”ready for embeddings or vector DBs without extra glue code.

Website Content Pipeline for AI: Markdown, Tokens, RAG Chunks

scrapemint/website-content-crawler

Crawl any website and ship clean Markdown, plain text, and HTML for AI, LLM, and RAG pipelines. Each row carries token estimates, JSON LD metadata, link graph, and optional auto chunk splitting for vector databases. Pay per page.

Docs to Markdown + AI Embeddings β†’ Vector DB Crawler

badruddeen/docs-to-markdown-ai-embeddings---vector-db-crawler

Turn any documentation site into clean Markdown, intelligently chunked content with embeddings (Azure/OpenAI), and directly upsert into MongoDB Atlas, Pinecone, Weaviate, Qdrant, or Milvus β€” ready for RAG, AI assistants, and semantic search in minutes.

πŸ‘ User avatar

Badruddeen Naseem

8

5.0