Structured vs Unstructured Data

Structured vs unstructured data, measured on one real web page: what a schema buys you, why the famous 90% stat is folklore, and how to query each.

MMotherlode Lab8 min read
Magpie title card: Structured vs Unstructured Data

Structured vs unstructured data comes down to one question: does the container promise anything about the content? Today I pulled Wikipedia’s Coffee article and took the question apart byte by byte. The page is 1,071,800 bytes of HTML. Inside it, a 782-byte JSON-LD record describes the article in 12 typed fields, an infobox carries 7 label-value pairs like Origin: Yemen, and the other 14,912 words of prose answer to nothing but grammar. Those three layers are the whole distinction, and this page walks through what each one buys you, what breaks in each, and which famous statistics about them you should distrust.

Structured vs unstructured data at a glance

Semi-structured data sits between the two camps, so the honest table has three columns.

Structured Semi-structured Unstructured
Shape Rows and columns, fixed schema Tags and keys, flexible per record Free text, images, audio, video
Examples SQL tables, CSV, API responses JSON, XML, HTML, email headers, JSON-LD Articles, PDFs, photos, meeting recordings, chat logs
Schema set Before writing, enforced on write At read time, per source Never; meaning lives in the content
Query with SQL, exact and fast jq and JSONPath for JSON, XPath and CSS for markup Search, NLP, LLM extraction
Stored in Relational DB, warehouse Document store, object store Object storage, file shares
Failure mode Schema violation, rejected write Parse error on malformed input False positives: matches that aren’t answers

The failure-mode row is the one vendor comparisons skip, and it matters most in practice. Structured systems refuse bad data loudly. Unstructured systems hand you confident nonsense quietly, and you find out when a customer does.

Structured data: the schema comes first

Structured data is data stored against a schema that existed before the first record was written. Every row has the same fields, every field has a type, and the database enforces both. A price column is a number everywhere or the insert fails.

The GitHub API is a clean live example. One curl to api.github.com/repos/golang/go returns a 6,116-byte JSON object with 86 top-level keys and 135 fields counting nested objects, all stable across every repository on the platform. The payload is JSON, semi-structured by syntax; what makes it structured data is the promise, the same 86 keys in the same shapes on every repo:

$ jq '.license.spdx_id, .stargazers_count' go-repo.json
"BSD-3-Clause"
139733

One expression, exact answer, no reading involved. That is the entire value proposition: because the shape is promised, retrieval becomes arithmetic. The cost is rigidity. Want a field the schema never anticipated? Migrations, backfills, and a queue of complaints.

Unstructured data: meaning lives in the content

Unstructured data has no schema, so nothing about its arrangement tells a machine what anything means. A novel, a scanned invoice, a podcast, a Slack thread: the information is all there, and none of it is addressable by field name.

Here is the same Coffee page’s prose, attacked with the laziest possible structure-hunting regex, \b(1[5-9]\d\d|20[0-2]\d)\b:

import re
text = open("coffee-prose.txt", encoding="utf-8").read()
years = re.findall(r"\b(1[5-9]\d\d|20[0-2]\d)\b", text)

It fires 543 times across 502 sentences. Every match is a number; none is labeled. Which year is the founding of Yemen’s coffee trade? Which is a citation’s journal date? The regex cannot say, and neither can any pattern matcher, because the prose has no slots, only sentences.

The kicker: the page actually answers “when was coffee introduced?” in its infobox, and the value is 15th century. Four-digit-year regexes are structurally incapable of finding that answer. Structure decides which questions are answerable at all; convenience is downstream of that.

This is also the category where LLMs changed the economics. Reading those 14,912 unstructured words and returning {origin: "Yemen", introduced: "15th century"} used to be a science project; now it’s a function call with a schema, which is precisely what LLM-based extraction with JSON schemas industrializes. The words stay unstructured. The answers come out structured.

Semi-structured data: the middle child doing the work

Semi-structured data has syntax without a fixed schema. JSON, XML, and email fall here: parseable by any machine, but every record can carry different fields. That flexibility is why every modern API speaks JSON and why no two job postings describe salary the same way.

The web is semi-structured in a particularly lopsided way. That 1,071,800-byte Coffee page contains exactly one schema’d machine-readable statement about itself: the JSON-LD block, 782 bytes, 0.07% of the page, 12 fields of @type: Article metadata. The rest is presentation markup and human prose. Sites that want to be understood add more of these fragments, and JSON-LD is the format search engines agreed on.

HTML deserves its own sentence: it is structured about presentation and unstructured about content. A <td> tells you this cell is a cell; nothing tells you it’s the price. Turning markup soup into typed records is the job data parsing covers, and it’s why web scraping exists as a discipline at all.

The 90% stat is folklore with a direction

Search “unstructured data” and you will meet the number. IDC is credited with 90% of data being unstructured. Gartner gets credited with 80%, or 80 to 90% “of new enterprise data”, or 70 to 90%, depending which vendor blog you land on. I checked a stack of these citations for this page: every one attributes the figure, none links a primary study. The closest thing to a source is IDC’s 2018 Data Age 2025 white paper, which forecast the world generating 175 zettabytes by 2025 with most of the growth in unstructured formats.

The direction is right. Video, documents, chat, and images dominate storage growth, and your own drive proves it. But when a vendor quotes “90%” at you, they’re reciting a number that has been quoted without a source for a decade. Treat it as a shape of the world, not a measurement.

One more honesty note: the stat counts bytes, and bytes are not value. The structured minority is still where payroll, inventory, and revenue live. Unstructured data’s promise is the decisions nobody automated yet, which is why the AI-ready data conversation is mostly about taming this category. Nearly every other entry in the scraping glossary lives on the same boundary: DOM, CSS selectors, XPath are all machines for pulling structure out of markup.

Choosing by the question you need to ask

The taxonomy is not really about file types. It’s about what you can promise at write time.

If you can name every column today, go structured and enjoy exact queries forever. Records that will vary in shape want semi-structured storage; you pay for that flexibility with read-time interpretation. If the content is meaning itself, prose, pixels, speech, accept that every question costs a reading pass: search, NLP, or an LLM, and budget for wrong answers, not just slow ones.

Most real projects are a pipeline across all three. You fetch unstructured sources, parse the semi-structured markup, and emit structured records. Tools in this space just pick different points on that arc: a scraper that outputs clean Markdown plus a JSON-LD sidecar (as Magpie’s fetch-clean-extract pipeline does) is explicitly handing you the unstructured view and the semi-structured one side by side. The extraction step, unstructured text to typed records, is where every hard tradeoff hides, and document data extraction shows it end to end on real PDFs.

FAQ

Is JSON structured or unstructured data?

Neither, properly: JSON is semi-structured. Its syntax is strict (parsers reject a misplaced comma), but there is no schema guaranteeing that every object has the same keys. A collection of JSON records with identical keys behaves like structured data in practice.

Is email structured or unstructured?

Both, in one message. Headers (From, To, Date, Message-ID) are structured fields defined by RFC 5322, queryable like database columns. The body is unstructured prose. This split, envelope versus content, is the cleanest everyday illustration of the whole distinction.

Is HTML structured data?

Semi-structured only. HTML has strict syntax and a defined tree, but its vocabulary describes presentation, not meaning. A <td> says “table cell”, never “monthly price”. Pages that want to expose meaning embed JSON-LD or microformats rather than relying on HTML itself.

What tools query unstructured data?

Full-text search engines, vector databases for semantic similarity, and NLP pipelines or LLMs for extraction into fields. Each answers different questions: search finds documents, vector search finds similar passages, extraction returns typed values. None gives SQL’s exactness, so verify what they return.

Can unstructured data be converted to structured?

Yes, and that conversion is an entire industry: data parsing, LLM extraction with JSON schemas, OCR for scans. The conversion always adds interpretation, so it can add errors. Spot-check extracted records against sources before anything downstream trusts them.

Try it on your own files

Pick any document you own and ask three questions: can you name the fields, does every record have them, can a machine find a value without reading. The first yes ends the argument. And if you want the failure mode seared in, run a year regex against your own sent-mail folder and count the matches that answer nothing, 543 in one article here, most of them decoys.

Stop renting credits.

One flat price, your machine, your keys.

Download free for Windows, macOS and Linux

Windows · macOS · Linux $49/mo flat, cancel anytime