ViewAction
ViewAction is an Action subtype (via ConsumeAction) for viewing static content: reading an article, viewing an image, looking at a product page. It adds no properties of its own. Use it as a potentialAction on a CreativeWork (Article, BlogPosting, Photograph) to provide Google with a direct "view" URL. Google reads this for the "View" button in some knowledge panel cards.
ViewAction is most useful for content behind paywalls or app deep links, where the target URL differs from the page URL. For content freely available at its canonical URL, ViewAction adds little value since Google already knows where to find the page.
Full example of schema.org/ViewAction 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": "BlogPosting",
"headline": "Why We Built XooTee",
"url": "https://xoocode.com/blog/why-we-built-xootee",
"author": { "@type": "Person", "name": "Lena Vasquez" },
"potentialAction": {
"@type": "ViewAction",
"target": "https://xoocode.com/blog/why-we-built-xootee"
}
}
</script>Minimal valid version
The smallest markup that still produces a valid ViewAction 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": "Article",
"headline": "Example article",
"potentialAction": { "@type": "ViewAction", "target": "https://example.com/article" }
}
</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 docsKnowledge panel view button (indirect)
Common ViewAction 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
ViewAction for freely accessible content
WrongViewAction on every public blog post with the same URL as the pageRightOnly use ViewAction when the target URL differs from the canonical URL (paywalls, app deep links)For content at its canonical URL, Google already knows where to find it. ViewAction adds value when the view URL is different: app deep links (myapp://article/123), paywall unlock URLs, or preview pages.
Schema properties in this example
About the example data
A view action on the Lena Vasquez blog post about XooTee, targeting the article page.
Comments
Loading comments...