Extract Product JSON-LD price and availability with provenance
Last updated:
A Product extractor should return name, price, currency and availability only when the public page supports them, and show the source of every value. Structured Data to JSON checks declared JSON-LD first, then microdata and visible metadata, returning null plus an explicit absence record instead of inventing a missing price or stock state.
Facts and examples on this page were checked against the Actor source, saved fixtures, and the linked Schema.org and Google documentation on October 4, 2026.
Why parsing one JSON-LD block is not enough
A product page can put the product identity in one place and its Offer in another. It may use JSON-LD, microdata, OpenGraph, or visible HTML, and a page can simply omit a value. Google's Product documentation treats price and availability as offer data and recommends a three-letter priceCurrency; its supported availability values come from Schema.org's ItemAvailability vocabulary (Product structured data, Offer details).
Copying the first script tag loses those distinctions. A grounded extraction needs a fixed output contract and a source record for each field.
Input
{
"urls": ["https://example.com/products/field-lantern"],
"schemaType": "product"
}One run accepts 1–20 public HTML URLs of the same schema type. Version 1 does not render JavaScript, accept cookies, or open logged-in pages.
Output contract
The saved Product fixture contains this Product and nested Offer:
{
"@type": "Product",
"name": "Field Lantern",
"offers": {
"@type": "Offer",
"price": "24.50",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}The tested result is:
{
"schemaType": "product",
"data": {
"name": "Field Lantern",
"price": "24.50",
"currency": "USD",
"availability": "InStock"
},
"evidence": {
"name": {
"method": "json-ld",
"pointer": "$script[0].name",
"snippet": "\"Field Lantern\""
},
"price": {
"method": "json-ld",
"pointer": "$script[0].offers.price",
"snippet": "\"24.50\""
},
"currency": {
"method": "json-ld",
"pointer": "$script[0].offers.priceCurrency",
"snippet": "\"USD\""
},
"availability": {
"method": "json-ld",
"pointer": "$script[0].offers.availability",
"snippet": "\"https://schema.org/InStock\""
}
},
"absentFields": []
}The Actor also records the final URL, response content type, byte count and SHA-256 of the fetched body. Evidence identifies the publisher text or markup that produced a value; it does not prove that the publisher's price or stock claim is true or current.
Deterministic source order
| Field | Checked sources, in order |
|---|---|
name | Product JSON-LD → itemprop="name" → og:title → page heading |
price | offers.price → offers.priceSpecification.price → microdata → visible price selector |
currency | JSON-LD → microdata → currency symbol derived from the grounded price evidence |
availability | JSON-LD → microdata → visible stock text |
The pipeline does not call an LLM. If the product name is not grounded, the page produces no paid item. If the name is grounded but another field is missing, that field is null, its evidence is { "method": "absent", "pointer": null, "snippet": null }, and its name appears in absentFields.
Contact redaction and limits
Version 1 exposes no contact fields. If an email address, a phone-like number, or an obvious personal/profile URL appears inside any copied value or evidence snippet, it is replaced with [redacted contact], and that evidence record gets "redactedContact": true. This applies to business and personal contacts alike; it is not a lead-harvesting endpoint.
The Actor accepts public HTML only, respects robots.txt, blocks private/reserved network destinations and rechecks redirects. Login or challenge pages, invalid pages and empty results are not charged. A successfully validated page costs $0.009, plus Apify's documented platform start event. It supports six documented schemas rather than arbitrary prompts, and Product output is limited to the four fields above.
FAQ
Does it return every property in a Product JSON-LD object?
No. It validates a fixed four-field Product contract: name, price, currency and availability. It does not dump arbitrary JSON-LD properties.
What happens when price or availability is missing?
The field is null, its evidence method is absent, and it appears in absentFields. The Actor does not infer a likely price or stock state.
Does provenance prove that the price is correct?
No. It proves which part of the fetched publisher page produced the value. Independent price verification and freshness monitoring are separate tasks.
Can it extract Product data rendered only by JavaScript?
No. Version 1 reads returned HTML without running JavaScript. Client-only facts remain absent.