Your cart is currently empty!
What structured data on a page already gives you
The data is already sitting there
Most people who start scraping jump straight to CSS selectors or XPath. They open dev tools, find the div with the price, write a selector, and move on. That works until the site redesigns its layout and the whole pipeline breaks overnight. There’s a layer of data on a huge number of pages that doesn’t have this problem, because it wasn’t built for humans reading a rendered page. It was built for machines, and it’s usually just sitting in the HTML source in a predictable format: JSON-LD.
If you’ve never gone looking for it, it’s worth understanding what it is, what it typically contains, and where its limits are. It won’t replace a scraping pipeline, but it changes what the first stage of one should look like.
What JSON-LD actually is
JSON-LD stands for JSON for Linked Data. It’s a way of embedding structured, machine-readable data directly into a page using a script tag:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Widget",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD"
}
}
</script>
That block sits in the <head> or <body> of the page, unrendered, invisible to a visitor, and readable by any client that fetches the HTML. No JavaScript execution required, no headless browser needed to see it. It’s just text in the response body.
It uses vocabulary from schema.org, a shared taxonomy that Google, Bing, and other search engines helped standardize so that sites could describe their own content in a consistent way. There are two older formats that do roughly the same job, Microdata (attributes like itemprop scattered through visible HTML elements) and RDFa (similar idea, different attribute names), but JSON-LD is what most modern site generators default to because it’s easier to template and doesn’t clutter the markup.
Why it exists at all
Sites don’t add this for scrapers. They add it so search engines can build rich results: star ratings under a product listing, a recipe’s cook time and calories in the search snippet, breadcrumb trails instead of a raw URL, an FAQ that expands right in the results page. Google’s documentation on structured data is aimed at SEO teams, not at data pipelines. The scraping use case is a side effect of the fact that this data has to be exposed in plain text for a crawler to read it, and any other bot fetching the same page gets the same bytes.
That’s worth sitting with for a second. This is data the site deliberately published for automated consumption, delivered in the same response as the page itself. Extracting it is parsing a script tag.
What you typically find in it
Coverage varies a lot by site and by page type, but the common @type values show up constantly across e-commerce, publishing, and local business sites. Product markup carries name, brand, SKU, images, and nested Offer objects with price, currency, and availability. Article and NewsArticle carry headline, author, publish date, modified date, and often the publisher’s name and logo. BreadcrumbList carries the category hierarchy for a page, handy for reconstructing site structure without crawling every menu. Organization and LocalBusiness carry address, phone number, opening hours, and social profile links. Review and AggregateRating carry rating value, count, and sometimes the review text itself. FAQPage carries question and answer pairs, verbatim.
For a pipeline built around price monitoring or catalog tracking, the Product/Offer pair alone can save an enormous amount of selector-writing, because the fields are labeled by type instead of by whatever class name a frontend developer chose that week.
Where it’s weaker than it looks
None of this makes JSON-LD a source of truth. A few things break it in practice:
Coverage is inconsistent. A site might mark up its product pages fully and skip structured data entirely on category pages, or vice versa. There’s no requirement to implement it, and plenty of sites don’t bother past whatever their CMS ships by default.
It goes stale. The JSON-LD price field is populated at template render time from whatever the backend passed in. If a site caches pages aggressively, or if the marketing team updates a display price without touching the underlying data feed, the JSON-LD can lag behind what a customer actually sees rendered on the page. Treating it as automatically authoritative is a mistake we’ve had to unlearn more than once when a monitored price didn’t match what checkout charged.
It can be inconsistent with the visible page on purpose or by accident. Some sites populate placeholder or template values in the structured data block that don’t match the actual DOM content, especially on pages generated from incomplete data. Cross-checking the JSON-LD value against the rendered price is still worth doing before you trust it for anything downstream like alerting or reporting.
Multiple blocks can appear on one page. A single page can have several <script type="application/ld+json"> tags, one for the product, one for breadcrumbs, one for the organization footer. Parsing needs to walk all of them, not just grab the first match.
Nested structures vary. Offer can be a single object or an array of offers for size/color variants. Some sites nest an AggregateOffer instead. A parser that assumes one fixed shape will silently drop data on the pages that don’t match it.
Where it fits in a pipeline
The practical move is to treat structured data as the first extraction pass, not the only one. In our own pipelines, the sequence looks like this: fetch the page, check for application/ld+json blocks, parse and validate what’s there against expected types, and only fall back to DOM selectors for whatever fields are missing or don’t reconcile. This has a few knock-on benefits beyond convenience.
It’s cheaper on infrastructure. A static HTML fetch through a proxy is far less resource-intensive than spinning up a headless browser to render JavaScript before you can read a price. If the data you need is already in the initial response, there’s no reason to burn a browser session, and by extension no reason to burn the proxy exit node cycling through it, just to read a number that was in the source HTML the whole time.
It’s more stable across redesigns. A site changing its CSS framework doesn’t usually touch its schema.org markup, since that’s driven by SEO requirements that don’t move at the same pace as frontend styling. Selectors tied to class names break on redesign. A JSON-LD parser tied to @type: Product usually keeps working.
It gives you a validation signal. Comparing the JSON-LD price against the rendered DOM price, on a sample of pages, is a decent way to catch when a site’s data feed has drifted from its display layer, which is useful information in its own right for anyone monitoring pricing or availability at scale.
Checking a page yourself
You don’t need any tooling to look. View source on any product or article page (not the rendered DOM, the actual response), search for application/ld+json, and read what’s there. Google’s own Rich Results Test tool will parse and validate it for you if you want a structured view instead of raw JSON. Browser extensions that highlight schema.org markup exist too, though a plain view-source search is usually faster.
What you’ll find ranges from a single thin Organization block to a page with five or six nested types covering everything from breadcrumbs to reviews to the product itself. The variance is the point. There’s no guarantee, and any pipeline that assumes a fixed shape across every domain it touches will need a fallback path regardless.
Structured data is a second data source the site already published, sitting next to the one you’d otherwise scrape by hand, and it’s worth checking before writing a single selector.
If you’re building or debugging a scraping pipeline and want more of this kind of infrastructure-first breakdown, we cover it regularly at Data Research Tools.
Get new guides and videos first — join the Telegram channel.
Leave a Reply