Schema Frameworks For Google Rich Results

Each page maps one Google rich result type to a JavaScript conditional-logic framework so your implementation can adapt to real content states instead of relying on brittle static JSON templates.

From Manual To Conditional Logic

Most structured data starts as JSON-LD written by hand for one page. That works for a handful of pages and breaks down at scale: every new page is another snippet to write, and every content change is another snippet to update.

Templates solve scale. The CMS fills one JSON-LD template with fields from each content object, so a single template covers every event, product or person. But content objects are rarely complete. When a field is missing, the template still prints the property, now empty, and a variable printed without quotes can break the JSON so that nothing in the block parses.

A conditional-logic framework builds the markup from the data that actually exists. Each property, and each nested object, is added only when the content object has the field that feeds it, and the whole item is skipped when Google's required properties are missing.

1

Manual

Hand-written JSON-LD per page. Accurate on day one, drifts as content changes, and does not scale past a few pages.

2

Templated

One JSON template per content type, filled by the CMS. Scales, but prints empty or broken properties whenever a field is missing.

3

Conditional logic

Code that adds each property and nested object only when its data exists, and checks Google's rules before emitting anything.

A Worked Example

One Person content model, two content objects. Jane Doe has a name only. John Doe has a profile URL and a job with a title and a company.

{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "{{ person.name }}",
  "url": "{{ person.url }}",
  "jobTitle": "{{ person.job.title }}",
  "worksFor": {
    "@type": "Organization",
    "name": "{{ person.job.company }}"
  }
}

The template gives Jane three empty properties (url, jobTitle and the nested company name), which validators flag and search engines ignore at best. The conditional version gives her a clean Person with only her name, and gives John a url, a jobTitle and a nested Organization because his data supports them.

How Every Framework Here Is Built

  • Starts from Google's current documentation for that rich result: required properties, recommended properties, either-or rules, value formats and limits.
  • Checks the page first: no markup on noindex pages, on pages canonicalized elsewhere, or for content that is not visible.
  • Returns nothing when a property Google requires is missing, instead of shipping an item that cannot earn the rich result.
  • Adds recommended properties and nested objects only when the data exists, then strips any empty values.
  • Enforces the feature's own rules in code, such as breadcrumb positions, prices above zero, and ISO 8601 dates and durations.
  • Ships in JavaScript and Python with identical output, and every example output on these pages validates with zero errors.

Features Google has retired, such as HowTo and the sitelinks search box, stay in the library with a dated notice. No rich result appears for them any more, but the markup can still help search engines and AI assistants understand the page.

Framework Library

40 frameworks, one per Google rich result feature, each with JavaScript and Python builders and a validated output example. The 8 features Google has retired are marked on their cards.

Article

Use for editorial pages where the visible content is a complete article with a clear byline and publication timestamps. Schema framework Open

Book Actions

Use when your page helps users read, preview, or purchase books through clearly described actions. Schema framework Open

Breadcrumb

Use on pages that belong to a clear hierarchy and display navigational trail links users can follow. Schema framework Open

Carousel

Use when a page lists multiple related entities in a scannable sequence that can be surfaced as cards. Schema framework Open

Course

Use for educational offerings where curriculum details, provider identity, and delivery context are explicit. Schema framework Open

Dataset

Use for dataset landing pages so datasets are discoverable in Google Dataset Search with license, creator and download details. Schema framework Open

Discussion Forum

Use for forum and community threads where a primary post and subsequent replies are publicly visible. Schema framework Open

Education Q&A

Use for educational question-answer pages where a single canonical answer and supporting context are visible. Schema framework Open

Employer Aggregate Rating

Use on pages that publish employer rating aggregates from a clear and policy-compliant review source. Schema framework Open
Retired Sep 2025

Estimated Salary

Use for compensation insight pages that present transparent salary ranges for specific occupations and locations. Schema framework Open

Event

Use for upcoming events with a real-world or virtual occurrence, schedule, and location context. Schema framework Open
Retired Sep 2025

Fact Check

Use for fact-checking pages that evaluate a specific claim with a transparent rating methodology. Schema framework Open
Retired Jun 2024

Home Activities

Use for virtual classes and activities where participation details and timing are clearly listed. Schema framework Open
Retired Sep 2023

How-To

Use for instructional content that teaches a process through ordered steps and actionable detail. Schema framework Open

Image Metadata

Use on image pages and image hosts that expose ownership and licensing information to search engines. Schema framework Open

Job Posting

Use for active job listings that include role details, hiring entity, and location/salary context. Schema framework Open
Retired Sep 2025

Learning Video

Use for educational videos where the learning objective and pedagogical structure are explicit. Schema framework Open

Local Business

Use for physical businesses serving local customers with publicly verifiable contact and location details. Schema framework Open

Loyalty Program

Use to publish a loyalty program and its tiers once at the organization level, so member prices and member shipping can reference them. Schema framework Open

Math Solvers

Use for pages that solve mathematical expressions and present step-by-step computational guidance. Schema framework Open

Merchant Listing

Use on pages where a product can be bought, with price, availability, shipping and return details. Schema framework Open

Movie

Use for movie detail pages with canonical film information and transparent metadata attribution. Schema framework Open

Organization

Use for official organization pages to clarify brand identity and authoritative entity signals. Schema framework Open
Retired Jan 2026

Practice Problems

Use for educational practice content that presents solvable problems and answer validation structure. Schema framework Open

Product Snippet

Use for product pages where pricing, availability, and product identity are visible to users. Schema framework Open

Product Variants

Use when one product comes in variants such as size or color, grouped with ProductGroup. Schema framework Open

Profile Page

Use for creator or contributor profile pages where identity attributes and ownership are explicit. Schema framework Open

Q&A

Use for pages where users submit questions and community or editorial answers are displayed. Schema framework Open

Recipe

Use for recipe pages with complete ingredients, instructions, and preparation details. Schema framework Open

Return Policy

Use to publish a merchant return policy once at the organization level, with offer-level overrides. Schema framework Open

Review Snippet

Use when a page publishes genuine reviews tied to a clearly identified product, service, or entity. Schema framework Open

Shipping Policy

Use to publish shipping rates, delivery times and destinations once at the organization level. Schema framework Open

Site Name

Use on the home page so Google shows the preferred site name in search results. Schema framework Open
Retired Nov 2024

Sitelinks Search Box

Use on sites with a functioning internal search endpoint that can accept URL query parameters. Schema framework Open

Software App (Beta)

Use for software product pages that describe platform support and application category clearly. Schema framework Open

Speakable

Use for news-style pages where specific text segments are appropriate for text-to-speech playback. Schema framework Open

Subscription And Paywalled Content

Use for pages with restricted sections so Google can distinguish free previews from protected content. Schema framework Open

Vacation Rental

Use for rental property detail pages where booking-relevant amenities and location signals are explicit. Schema framework Open
Retired Sep 2025

Vehicle Listing

Use for inventory pages selling vehicles with standardized listing fields and offer information. Schema framework Open

Video

Use for pages where a primary video is embedded and key media metadata is visible on-page. Schema framework Open

Build Conditional Schema Frameworks At Scale

Implement robust rich result markup using logic-driven frameworks that reflect real page state, not static one-off templates.