Labels for a machine
A page shows "₹999" and a human knows it's the price. A machine sees a string. Structured data is a block of labelled facts added to the page — this is a Product, this is its price, this is its currency — so nothing has to be inferred.
The vocabulary is schema.org, shared across search engines. The usual format is JSON-LD: a script tag holding JSON, kept separate from your markup, which is why it's the recommended option — you can change your layout without touching it.
<script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Article", "headline": "What Is an API?", "description": "An API is a defined way for one program to ask another for something.", "datePublished": "2026-06-01", "dateModified": "2026-08-01", "author": { "@type": "Person", "name": "Daksh Bathla", "url": "https://navitallabs.com/learning/instructors/daksh" }, "publisher": { "@type": "Organization", "name": "Navital Labs", "url": "https://navitallabs.com" }}</script>The types most sites need
| Type | Use on | What it can produce |
|---|---|---|
| Organization | Homepage | Knowledge panel details, logo |
| WebSite | Homepage | Sitelinks search box |
| Article | Blog posts, lessons, guides | Author and date shown in results |
| BreadcrumbList | Any nested page | The path shown instead of a bare URL |
| Product / Offer | Product pages | Price and availability in results |
| FAQPage | Pages with real Q&A | Expandable questions in results |
| Person | Author and team pages | Author attribution |
| DefinedTerm | Glossary entries | Term and definition understood as such |
schema.org has hundreds of types. Almost nobody needs more than the eight above, and adding obscure types has no observed benefit — the value is in the ones search engines actually consume.
The one rule
- Every fact in the markup should be findable by a reader on that page
- Dates in the markup must match the dates shown
- The author named must be the actual author, with a real page
- No aggregate ratings without real, visible reviews
- Update the markup when the page changes — stale structured data is wrong structured data
Generating it from your data
Hand-writing JSON-LD per page guarantees drift: the page changes, the markup doesn't. Generate it from the same source the page renders from, and the two can't disagree.
export function articleSchema(lesson: Lesson, author: Instructor) { return { "@context": "https://schema.org", "@type": "Article", headline: lesson.title, description: lesson.description, datePublished: lesson.publishedAt, dateModified: lesson.updatedAt, author: { "@type": "Person", name: author.name, url: `https://navitallabs.com/learning/instructors/${author.slug}`, }, };}One function, one source of truth, and the markup is correct by construction rather than by someone remembering.
Validating before shipping
- Run the page through a rich results testSearch engines publish free validators that report errors and warnings against a live URL or pasted HTML.
- Fix errors; read warnings and decideErrors block the feature. Warnings are usually optional fields worth adding if you genuinely have the data.
- Re-check after a template changeThis is where drift enters — a layout edit that removes a visible date leaves the markup claiming one.
Expect nothing dramatic. Structured data doesn't raise rankings by itself; it makes your result more informative and makes your page easier to understand and cite. Both are worth having, and neither is a shortcut.
Common mistakes
- Marking up facts that aren't on the page
- Fake review or rating markup, which risks rich results site-wide
- Hand-writing JSON-LD per page, guaranteeing it goes stale
- Adding a dozen obscure types nothing consumes
- Expecting a ranking increase rather than a better-presented result
Key takeaways
- Structured data labels page facts for machines, using schema.org, usually as JSON-LD
- Eight types cover almost every site
- It must describe what a reader can see — that rule is enforced
- Generate it from the same data the page renders, then validate
Try it yourself
Run one of your pages through a rich results test. If nothing is detected, add Article or Organization markup generated from data you already have, and re-test. That single addition is usually the largest structured-data gap on a small site.
