CleanedWeb

Glossary

Structured data (JSON-LD and schema.org)

Structured data is information on a web page that is written for machines as well as people. The most common form is JSON-LD: a block of JSON inside a script tag that uses the schema.org vocabulary to say what the page is about, such as a product, a job posting or an article.

What it looks like

A fictional product page might carry this block. The values mirror what a shopper sees on the page.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Desk lamp, matte black",
  "sku": "LAMP-0420",
  "offers": {
    "@type": "Offer",
    "price": "49.00",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock"
  }
}
</script>

JSON-LD is one syntax. Microdata and RDFa put the same vocabulary into HTML attributes. Many sites also embed the data their own front end uses as JSON in the page, which is not schema.org but often holds the same values.

Good source, with limits

When a page has complete, correct JSON-LD it is the cleanest way to read it: typed fields and no HTML parsing. It rarely tells the whole story:

In CleanedWeb

A site does not need to publish JSON-LD for CleanedWeb to build an API from it. Inspection reads the collection page and proposes the fields it finds, you review and keep the ones you need, and the saved output schema defines their names and types. The website data checker shows what a site already publishes for machines (JSON-LD, embedded JSON, feeds, sitemap and robots.txt rules) before you decide how to get the data.

Tools and docs

Related terms

All glossary entries

Build an API from a website

CleanedWeb turns a website into a maintained REST API that returns structured records, with a versioned schema and repairs when the site changes.