<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>47</id><slug>extracting-json-ld-from-product-pages-part-3-47</slug><title>Extracting JSON-LD from product pages, part 3</title><excerpt>Part 3 looks at what changes when the same technique has to run every day in production. Many product pages already contain a clean, structured description of themselves in a script tag meant for…</excerpt><seriesName>Extracting JSON-LD from product pages</seriesName><seriesPart>3</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>Part 3 looks at what changes when the same technique has to run every day in production. Many product pages already contain a clean, structured description of themselves in a script tag meant for search engines. Reading it is often more reliable than parsing the visible HTML.</item></paragraphs></item><item><heading>What to watch for</heading><paragraphs><item>Pagination comes in several shapes: numbered pages, next links, offsets and opaque cursors. Each has trade-offs, and a robust scraper should detect the end of the result set rather than assuming a fixed number of pages.</item><item>Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.</item></paragraphs></item><item><heading>Step by step</heading><paragraphs><item>Deduplicate as you go. The same item often appears on several listing pages, and a stable identifier such as a SKU or ID makes duplicates easy to spot.</item><item>Always identify your client honestly with a descriptive User-Agent, and keep your request rate modest. A crawler that behaves like a considerate visitor is far less likely to cause problems for the site operator.</item></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>Select script[type='application/ld+json'], parse every block, and pick the one whose @type matches what you need. Fall back to HTML only for missing fields.</item></paragraphs></item></sections><authorId>8</authorId><authorName>Hannah Novak</authorName><authorSlug>hannah-novak</authorSlug><category>Data Engineering</category><tags><item>json</item><item>testing</item></tags><publishedAt>2023-12-22T00:00:00.000Z</publishedAt><wordCount>185</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
