Jun 18, 2026
Data Extraction Tools for Web Data: How to Choose the Right Stack
Inference Research
Why "Data Extraction Tools" Is Too Broad a Category
You searched for "data extraction tools," got a list of fifteen products, and you are no closer to a decision. That list almost certainly put a proxy network next to a PDF parser next to an ETL connector, as if they were interchangeable. They are not. The roundups feel useless because "data extraction tools" is not one category. It is at least six, and they barely overlap.
The thing that decides which tool you need is not your industry or your budget. It is your source. A tool that is excellent at pulling rows from a warehouse is useless against a messy product page, and vice versa. So this guide does the one thing the listicles skip: it segments data extraction tools by source, gives you a way to evaluate the web HTML segment specifically, and helps you decide whether to build or buy. By the end you will know where a schema-guided extraction model belongs in the stack, and where it does not.
Read time: 10 minutes
Data extraction tools span more than the web
Data extraction tools are software that pulls structured records out of an unstructured or semi-structured source. The catch is that "source" covers very different formats: web pages, PDFs and scanned documents, databases, third-party APIs, spreadsheets, and office documents. Each format makes a different part of the job hard, so the tools that win in one segment rarely win in another.
The hard problem is set by the format. Databases and APIs already hand you structured data, so the work is connection, authentication, and pagination, not extraction in the AI sense. Spreadsheets and office documents are mostly about parsing known layouts. PDFs and scans need optical character recognition and layout reconstruction before any field-level work can begin. Web HTML is its own beast: the markup is inconsistent across sites, sections render dynamically, the same fact appears in three places, and pages can be arbitrarily long.
That is why "what is the best data extraction software" has no answer until you name the source. Ask it about databases and the answer is an ETL connector. Ask it about scanned invoices and the answer is a document-intelligence service. Ask it about turning a thousand inconsistent product pages into a clean feed, and you are in web HTML territory, which is what the rest of this guide is about.
Data extraction tools by source: when each category wins
Before you compare individual products, place your problem in the right segment. The table below maps each source to what makes it hard, the tool category that wins there, and when to reach for it. Notice that AI extraction models are not a universal answer. They earn their place on messy web HTML and on text that has already come out of an OCR step, not on sources that are already structured.
| Source | What's hard | Winning category | Use when |
|---|---|---|---|
| Web HTML | Messy, inconsistent, long markup | Schema-guided extraction model | Turning pages into typed JSON |
| PDFs / scans | Pixels, layout, no text | OCR / document intelligence | Documents and images first |
| Databases | Already structured | ETL connector | Moving rows between systems |
| APIs | Auth, pagination | API client / connector | Pulling from a defined endpoint |
| Spreadsheets / docs | Known layouts | Parser / connector | Files with a fixed structure |
The diagram below shows the same logic as a routing decision. Identify the source, send it down the matching branch, and for the web HTML branch, follow the fetch, clean, extract, and validate pipeline that the rest of this guide details.
Figure 1: Routing an extraction problem by source
A useful sanity check is to ask whether the data is already structured at the source. Rows in a warehouse, fields behind a REST endpoint, and cells in a spreadsheet all arrive with a known shape, so the job is transport, not interpretation. The moment the shape is unknown or unreliable, which is the normal state of a web page, you are doing real extraction and the tooling changes.
The practical takeaway: if your data lives in a database, an API, or a spreadsheet, you probably do not need an extraction model at all. If it lives in PDFs or scans, run OCR or a document-intelligence service first, then normalize the resulting text. The segment where AI data extraction tools change the economics is web HTML, where a purpose-built model turns inconsistent pages into a clean feed.
Web data extraction: what the HTML layer actually requires
Web data extraction is harder than it looks because no two sites agree on structure. The price might be in a <span> on one site and a JSON-LD blob on another. Important fields hide in attributes, duplicate across the page, or only appear after a script runs. And the page you need to read is often long, with the useful 2% buried in navigation, footers, and tracking markup.
Those conditions set the requirements for any web HTML extraction tool. It has to produce output that conforms to a schema you define, not a best-effort guess. It has to stay accurate when the markup is noisy. It has to handle long pages without losing the fields you care about, which is where long-context handling matters. It has to be validated on the way in, so a malformed record fails loudly instead of corrupting your store. And the cost has to scale per page, because you are not extracting one page, you are extracting millions.
Meeting those requirements is a five-step pipeline: fetch or crawl the page, clean the HTML, define the output as a schema, extract typed JSON, then validate and store it. The mistake most teams make is collapsing the first step into the fourth, treating "get the page" and "get the data" as one tool's job. They are two jobs.
Crawl and fetch vs. extract: two jobs, two tools
Retrieval and extraction are separate stages, and the tools that are good at one are usually mediocre at the other. Retrieval is everything involved in getting the bytes: crawling links, rendering JavaScript, rotating proxies, and getting past anti-bot measures. Extraction is the step that turns the resulting messy HTML into typed JSON that matches your schema.
The retrieval layer has strong, mature options, and you should keep using them: Firecrawl, Crawl4AI, Apify, Bright Data, and the do-it-yourself stack of Scrapy or Playwright. Firecrawl even ships its own extraction endpoint that takes a prompt, a schema, or both. So why treat extraction as a distinct choice at all? Because a general crawler with an extraction feature optimizes for retrieval first, while a purpose-built extraction model optimizes for the thing that breaks pipelines at scale: strict schema adherence, reliable handling of long and noisy pages, and a low, predictable cost per extracted page.
If your bottleneck is getting the page, fix it at the retrieval layer. If your bottleneck is that the JSON you get back is inconsistent, missing fields, or occasionally invalid, that is an extraction problem, and it deserves a tool chosen on extraction criteria. We go deeper on this split in our guide to when you need JSON, not markdown, and a head-to-head that compares these layers in detail.
Once you see extraction as its own model choice, the next question is which model. Schematron V2 Turbo is the throughput-and-cost option for this layer.
Try Schematron V2 Turbo
Use Schematron V2 Turbo for high-throughput HTML-to-JSON extraction when cost and latency matter.
An evaluation rubric for schema adherence
The listicles compare tools on feature bullets. Engineering managers should compare them on measurable behavior. Here is the rubric I would use to evaluate any web HTML extraction tool, and the thing each criterion actually measures.
| Criterion | What to measure | Why it matters |
|---|---|---|
| Valid-JSON rate | Parses as JSON | Broken records halt pipelines |
| Schema adherence | Matches your schema | Downstream code depends on shape |
| Field accuracy | Values are correct | Wrong data is worse than none |
| Long-page support | Handles long pages | Useful fields hide in long HTML |
| Throughput | Requests per second | Sets your extraction ceiling |
| Cost per page | Input plus output tokens | Drives the bill at scale |
| Operability | Batch, retries, async | Production needs more than a call |
The criterion that separates serious tools from demos is schema adherence: the rate at which the output is valid JSON that matches the schema you specified, every time, across thousands of pages. Here is what that means in practice. A tool that is right 95% of the time still hands you a broken record every twenty pages, and at a million pages a day that is fifty thousand failures to triage. Strict JSON modes that guarantee schema-compliant output exist precisely because "usually valid" is not good enough for a pipeline.
Running the rubric on your own pages is straightforward. Define the schema you actually need, assemble a labeled sample of the pages you actually scrape, run each candidate tool over the sample, and score two things: did the output parse and conform to the schema, and were the field values correct. The labeled sample is the part teams skip and the part that matters most, because a tool that scores well on a vendor's demo pages can fall apart on the specific markup your sources produce. A few hundred representative pages, scored by hand once, will tell you more than any feature comparison. For benchmark context and how task-specific models score on this, see our writeup of the published quality metrics for extraction models.
Where Schematron fits in the web extraction stack
Schematron is the extraction layer that sits after retrieval. It is a family of long-context models trained to take messy HTML and a schema you define, and return clean, typed JSON that conforms to it. It does not take a prompt. The schema, including the descriptions on each field, is the only instruction it gets, which removes the prompt-drift problem that makes general LLMs hard to operate. Its strict JSON mode is built for 100% schema-compliant output, and it is trained for long, noisy pages.
The proof is in the published numbers. On an LLM-as-a-judge evaluation graded on a 1-to-5 scale, Schematron V2 Small scored 4.060 and V2 Turbo scored 4.039. On the SimpleQA benchmark the two scored 83.10 and 79.42. On an H100 with a 10k-input, 500-output workload, V2 Small ran at 2.47 requests per second and V2 Turbo at 4.14. The two models trade off the same axis: V2 Small for the highest quality on complex schemas and very long pages, V2 Turbo for maximum throughput and lowest cost at scale.
When you reach the point of recommending a tool for the web HTML layer, this is it: Schematron, a schema-guided extraction model, called through the same OpenAI-compatible API you already use.
A runnable web HTML extraction example
Here is the full path for the web HTML branch, end to end: clean the page with lxml, define the schema, call Schematron, get conforming JSON back, and validate it on ingest. The Python version:
import os
import lxml.html as LH
from lxml.html.clean import Cleaner
from pydantic import BaseModel, Field
from openai import OpenAI
# 1) Pre-clean HTML to match how Schematron was trained
HTML_CLEANER = Cleaner(
scripts=True,
javascript=True,
style=True,
inline_style=True,
safe_attrs_only=False,
)
def strip_noise(html: str) -> str:
"""Remove scripts, styles, and JavaScript from HTML using lxml."""
if not html or not html.strip():
return ""
try:
doc = LH.fromstring(html)
cleaned = HTML_CLEANER.clean_html(doc)
return LH.tostring(cleaned, encoding="unicode")
except Exception:
return ""
# 2) Define your schema (nested data and lists are supported)
class Product(BaseModel):
name: str
price: float = Field(
...,
description="Primary price of the product.",
)
specs: dict[str, str] = Field(
default_factory=dict,
description="Specs of the product.",
)
tags: list[str] = Field(
default_factory=list,
description="Tags assigned of the product.",
)
# 3) Messy HTML (could be the full page; trim to the relevant region when possible)
html = """
<div id="item">
<h2 class="title">MacBook Pro M3</h2>
<p>Price: <b>$2,499.99</b> USD</p>
<ul info>
<li>RAM: 16GB</li>
<li>Storage: 512GB SSD</li>
</ul>
<span class="tag">laptop</span>
<span class="tag">professional</span>
<span class="tag">macbook</span>
<span class="tag">apple</span>
</div>
"""
# 4) Client setup
client = OpenAI(
base_url="https://api.inference.net/v1",
api_key=os.environ.get("INFERENCE_API_KEY"),
)
resp = client.beta.chat.completions.parse(
model="inference-net/schematron-v2-small",
messages=[
{"role": "user", "content": strip_noise(html)},
],
response_format=Product,
)
# 5) Validate on ingest: the parsed object is already a Product instance
product = resp.choices[0].message.parsed
print(product.model_dump_json(indent=2))The TypeScript version uses Zod for the same schema and validation:
import OpenAI from "openai";
import { z } from "zod";
import { zodResponseFormat } from "openai/helpers/zod";
const openai = new OpenAI({
baseURL: "https://api.inference.net/v1",
apiKey: process.env.INFERENCE_API_KEY,
});
// 1) Define your schema (nested data and lists are supported)
const Product = z.object({
name: z.string(),
price: z
.number()
.describe(
"Primary price of the product."
),
specs: z
.record(z.string())
.describe(
"Specs of the product."
),
tags: z
.array(z.string())
.describe("Tags assigned of the product."),
});
// 2) Messy HTML (could be the full page; trim to the relevant region when possible)
const html = `
<div id="item">
<h2 class="title">MacBook Pro M3</h2>
<p>Price: <b>$2,499.99</b> USD</p>
<ul info>
<li>RAM: 16GB</li>
<li>Storage: 512GB SSD</li>
</ul>
<span class="tag">laptop</span>
<span class="tag">professional</span>
<span class="tag">macbook</span>
<span class="tag">apple</span>
</div>
`;
// 3) Chat Completions extraction (typed validation)
const resp = await openai.chat.completions.parse({
model: "inference-net/schematron-v2-small",
messages: [{ role: "user", content: html }],
response_format: zodResponseFormat(Product, "product"),
});
console.log(resp.choices[0].message.content);Two details matter. Cleaning with lxml is recommended because Schematron was trained on HTML preprocessed the same way; Readability, Trafilatura, or BeautifulSoup are fine alternatives. And even though the model targets 100% schema-compliant output, you still parse the response with the schema on the way in and handle failures explicitly, because validation is cheap and silent corruption is not. For a deeper walkthrough of the Python pipeline, see AI web scraping in Python.
Cost: Schematron V2 Small vs. Turbo
For high-volume web extraction, the input token rate is the number that drives your bill, because a cleaned page is far larger than the JSON you get back. The chart shows the input rate for both models.

The full picture, including output rates, is in the table below. V2 Small costs $0.05 per million input tokens and $0.25 per million output tokens; V2 Turbo costs $0.03 and $0.15. Pick Turbo when throughput and cost dominate and your schemas are not exotic; pick Small when you need the top accuracy on complex schemas or your pages are very long.
| Model | Best for | Input $/M | Output $/M |
|---|---|---|---|
| V2 Small | Top quality, long pages | $0.05 | $0.25 |
| V2 Turbo | Throughput, low cost | $0.03 | $0.15 |
Build vs. buy for web HTML extraction
The real decision for the web HTML layer is not which vendor; it is whether to build the extraction logic yourself. Building means writing per-site CSS or XPath selectors, or wiring up your own LLM prompts. It is cheap to start and expensive to keep. Selectors rot every time a site ships a redesign. Prompts drift as you tweak them. And you end up owning the validation and retry plumbing that a managed model gives you for free.
Buying means calling a schema-guided model: you maintain schemas, not selectors, and you get strict JSON without writing parsing code per site. The break-even tilts toward buying as two variables grow: the number of distinct sites you extract from, and your volume. A handful of stable sites at low volume can justify hand-written parsers. Hundreds of sites, or millions of pages, almost never can. At that scale the async Batch API handles the throughput, and dedicated capacity handles predictable cost. We treat this tradeoff in full in our build vs. buy writeup.
If you are sizing a high-volume pipeline and want to talk through throughput, schema design, and dedicated capacity, that conversation is worth having early.
Scale structured web extraction
Planning a high-volume extraction pipeline? Talk through throughput, schema design, and dedicated capacity for Schematron with an Inference engineer.
When Schematron is not the right layer
Being clear about the boundaries is what makes the recommendation credible. Schematron is not the right tool in several cases.
It is not a crawler or a fetcher. It does not retrieve pages, render JavaScript, rotate proxies, or solve CAPTCHAs. Pair it with one of the retrieval tools above; it handles the extract step, not the get step.
It is not the first step for PDFs or scanned documents. Those need OCR or a document-intelligence service to turn pixels into text; Schematron can normalize that text into typed JSON afterward, but it is not where you start.
It is unnecessary for sources that are already structured. If your data is in a database, behind an API, or in a spreadsheet, you have a connector problem, not an extraction problem, and a model adds cost without adding value.
And there is a hard limit on page size. The context window is large but finite, so very large pages have to be chunked or truncated before extraction.
Conclusion
Choosing among data extraction tools gets easier once you stop treating it as one decision. Segment by source first. For the web HTML segment, evaluate tools on schema adherence and the rest of the rubric, not on feature lists. Keep retrieval and extraction as separate tools chosen on separate criteria. And for the extraction step itself, a schema-guided model takes the per-site maintenance that sinks DIY pipelines off your plate.
If you have HTML and a schema and you want typed JSON back, the fastest way to see whether this fits your pages is to run one through it.
Extract typed JSON from messy HTML
Send HTML and a Pydantic, Zod, or JSON Schema definition to Schematron and get structured JSON back without writing selectors or prompts.
Related Reading
- HTML-to-JSON Extraction API — the deepest how-to for turning web pages into typed JSON.
- Data Extraction SDKs and APIs: Build vs Buy — the full build-vs-buy treatment for platform teams.
- Crawl4AI vs Firecrawl vs Schematron — how the crawl, markdown, and extraction layers compare.
- Automated Data Extraction from Websites: Architecture, Schema Design, and Validation — the architecture, schema, and validation layer in depth.
- Web Scraping with ChatGPT vs Schematron — when a general chat model is enough and when a task-specific extractor wins.
- ScrapeGraphAI Alternatives: Schema-First Extraction — schema-first extraction options compared.
Meet with our research team
Schedule a call with our research team to learn more about how Specialized Language Models can cut costs and improve performance.