Comment
Comment is a CreativeWork subtype for user comments on blog posts, articles, forum threads, product reviews, and any content that accepts replies. It has 4 properties of its own: upvoteCount and downvoteCount (vote tallies), parentItem (the comment or post being replied to), and sharedContent (content shared in the comment). Comments are typically nested inside other types via the comment property on CreativeWork.
The type hierarchy is Thing → CreativeWork → Comment. Google reads Comment data for the discussion forum rich result and for displaying comment counts on article cards. The parentItem property builds the reply tree: a reply to a reply points to its parent comment, which points to the original post.
Full example of schema.org/Comment json-ld markup
The markup is verified as valid with Rich Results Test from Google.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Comment",
"@id": "https://xoocode.com/blog/why-we-built-xootee#comment-1",
"text": "Great writeup. Would love to see a follow-up on how the schema markup for the product page was built.",
"author": { "@type": "Person", "name": "dev_sarah" },
"datePublished": "2026-04-02T11:30:00-04:00",
"upvoteCount": 12,
"downvoteCount": 0,
"parentItem": {
"@type": "BlogPosting",
"headline": "Why We Built XooTee",
"@id": "https://xoocode.com/blog/why-we-built-xootee#post"
},
"comment": {
"@type": "Comment",
"@id": "https://xoocode.com/blog/why-we-built-xootee#comment-1-reply-1",
"text": "Seconded. Especially the ProductGroup variant pattern.",
"author": { "@type": "Person", "name": "markup_mike" },
"datePublished": "2026-04-02T14:15:00-04:00",
"upvoteCount": 5,
"parentItem": { "@id": "https://xoocode.com/blog/why-we-built-xootee#comment-1" }
}
}
</script>upvoteCount and downvoteCount
Integer counts of votes. Reddit, Stack Overflow, and similar platforms use these. Google may show vote counts in forum and Q&A results. If your platform only has likes (no downvotes), use upvoteCount alone and omit downvoteCount.
parentItem
parentItem links a reply to the thing it is replying to: a Comment (for nested replies) or a CreativeWork (for top-level comments on a post). This builds the conversation tree. A reply to a reply has parentItem pointing to the parent comment's @id.
Minimal valid version
The smallest markup that still produces a valid Comment entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Comment",
"text": "Great writeup on the XooTee product schema.",
"author": { "@type": "Person", "name": "dev_sarah" },
"datePublished": "2026-04-02T11:30:00-04:00"
}
</script>Google rich results this unlocks
Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.
- Google docsDiscussion/forum rich result (indirect)
Common Comment mistakes
Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.
- 01
Comments without parentItem
WrongComment with text and author but no parentItemRight"parentItem": { "@type": "BlogPosting", "@id": "...#post" }parentItem connects the comment to the post it replies to. Without it, the comment is an orphaned entity with no context. Google needs parentItem to build the conversation thread in forum results.
- 02
Using plain text for comment counts instead of structured Comment objects
Wrong"commentCount": 42 on an Article with no actual Comment objectsRightUse the comment property with Comment objects that have author, datePublished, and textA commentCount number tells Google how many comments exist but provides no content. Structured Comment objects let Google show actual comment excerpts and author names in search results.
Schema properties in this example
About the example data
A comment on the Lena Vasquez blog post about XooTee, with a nested reply showing the parentItem pattern.
Comments
Loading comments...