Skip to content

Use Cases

Pull structured fields out of PDFs, reports, and filings without building a parser. process_document reads the file, extract_with_llm returns typed JSON.
Estimated cost: ~5 credits per document

01Quick Answer

Point process_document (2 credits) at a PDF URL or file to get text, sections, and metadata, then pass that text to extract_with_llm (3 credits) with a JSON schema to get typed fields back. About 5 credits per document, and extraction defaults to a local Ollama model so contents stay on your machine.

02The brief

The Problem

Critical numbers live in PDFs: annual reports, price lists, regulatory filings, research papers. Copying them out by hand does not scale, and generic PDF libraries return a wall of text with no structure you can query.

The Solution

CrawlForge process_document extracts text, sections, and metadata from a PDF URL or file, and extract_with_llm turns that text into the exact JSON shape you asked for -- running against local Ollama by default, so document contents never leave your machine.

03In code

Code Example

pdf-document-extraction.js
// Pull structured fields out of a PDF reportconst doc = await mcp.process_document({  source: "https://example.com/2026-annual-report.pdf",  sourceType: "pdf_url",  options: { extractText: true, extractMetadata: true },}); // Ask for exactly the fields you need, as JSONconst fields = await mcp.extract_with_llm({  content: doc.text,  prompt: "Extract fiscal year, revenue, operating margin, and headcount.",  schema: {    type: "object",    properties: {      fiscalYear: { type: "string" },      revenue: { type: "string" },      operatingMargin: { type: "string" },      headcount: { type: "number" },    },  },}); console.log(doc.metadata.pageCount);console.log(fields.data);

04The pipeline

Tools Used

5◆ credits
Estimated cost: ~5 credits per document
  1. https://…
  2. 01process_document 2 credits
  3. 02extract_with_llm 3 credits
  4. JSON · markdown

05Questions

Frequently Asked Questions

01How do I extract data from a PDF automatically?

Point process_document at the PDF URL or file to get text, sections, and metadata, then send that text to extract_with_llm with a JSON schema describing the fields you want. You get typed JSON back instead of a wall of text.

02Does the PDF have to be online?

No. process_document accepts a URL or a local file path via sourceType — url, pdf_url, file, or pdf_file — and options such as pageRange and maxPages let you process only the pages you care about.

03Which model does the extraction use?

extract_with_llm defaults to a local Ollama model, so document contents never leave your machine. Pass provider openai or anthropic with the matching API key when you want a cloud model instead.

04What does document extraction cost?

About 5 credits per document: 2 for process_document and 3 for extract_with_llm. The free 1,000-credit tier covers roughly 200 documents, enough to validate the pipeline against a real archive before upgrading.

Start forging

Ready to Get Started?

Every new account gets 1,000 free credits. No credit card required.