CommentAction
CommentAction is a CommunicateAction subtype for posting a comment. Property: resultComment (Comment). Use ReplyAction when the target is another comment.
Full example of schema.org/CommentAction 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": "CommentAction",
"agent": { "@type": "Person", "name": "Reader" },
"resultComment": { "@type": "Comment", "text": "Great article — saved." }
}
</script>Minimal valid version
The smallest markup that still produces a valid CommentAction 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": "CommentAction",
"resultComment": { "@type": "Comment", "text": "Comment text" }
}
</script>Google rich results this unlocks
CommentAction is a structural type. It does not produce a rich result on its own.
Its value comes from combining it with a primary type whose markup earns a rich result (Article, Product, Event, and so on). CommentAction becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.
Common CommentAction 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
CommentAction on a reply
WrongCommentAction targeting another commentRightReplyAction for replies; CommentAction for top-level commentsUse the more specific ReplyAction when the target is a comment.
Schema properties in this example
Also mentioned in 1 other example
CommentAction also appears in InteractionCounter. See the full CommentAction schema page for every reference.
About the example data
Commenting on a Xoo Code post.
Comments
Loading comments...