Schema: mainEntity
Schema: mainEntity Example Markup
The following are examples of markup written in json+ld that include the correct usage for Schema: mainEntity.
WebPage markup should be the cornerstone of all your markup work. WebPage can and should per definition be used on all webpages without exception. Follow our simple, yet deep WebPage markup example to understand how.
FAQPage JSON-LD example for the Xoo Code Shop Dunmore visitor FAQ. Covers the mainEntity composition pattern, Question and Answer nesting, when to use FAQPage vs QAPage, and the 2023 Google rich result change that redefined when FAQ markup earns a SERP card.
QAPage JSON-LD example for a community Q&A thread about XooStructured validation errors. Covers the QAPage/Question/Answer trio, acceptedAnswer vs suggestedAnswer, answerCount, upvoteCount, and how QAPage differs from FAQPage for community-driven question-and-answer content.
Guide JSON-LD example for a buying guide, product recommendation guide, or ranked list. Pending CreativeWork subtype adding category and reviewAspect.
AboutPage JSON-LD example for a website's About page. Direct WebPage subtype with no unique properties.
ContactPage JSON-LD example for a website's Contact page. Direct WebPage subtype. Pair mainEntity with an Organization carrying contactPoint entries.
ItemPage JSON-LD example for a page focused on a single item (product, article, person). Direct WebPage subtype with no unique properties.
ProfilePage JSON-LD example for a person or organisation profile page. Direct WebPage subtype. Google's Profile Page rich result keys on this type.
SearchResultsPage JSON-LD example for an on-site search-results page. Direct WebPage subtype. Use noindex meta + SearchResultsPage type to signal a results page to crawlers.
CollectionPage JSON-LD example for a listing / category / tag page. Direct WebPage subtype. Parent of ImageGallery and VideoGallery.
ImageGallery JSON-LD example for a photo-gallery page. Direct CollectionPage subtype. Use ItemList + ImageObject for the gallery contents.
VideoGallery JSON-LD example for a video-collection page. Direct CollectionPage subtype. Use ItemList + VideoObject for the collection contents.
MedicalWebPage JSON-LD example for patient-education and clinical-reference pages. WebPage subtype with aspect and medicalAudience.
RealEstateListing JSON-LD example for a property-listing page (sale or rent). WebPage subtype with datePosted and leaseLength.
Question JSON-LD example for Q&A, FAQ, and quiz content. Comment subtype carrying acceptedAnswer, suggestedAnswer, answerCount, eduQuestionType. The node Google reads for Q&A rich results and quiz LearningResource pages.