TravelAction
TravelAction is a MoveAction subtype for travel. Property: distance (Distance).
Full example of schema.org/TravelAction 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": "TravelAction",
"agent": { "@type": "Person", "name": "Sam Xoo" },
"fromLocation": { "@type": "Place", "name": "Copenhagen" },
"toLocation": { "@type": "Place", "name": "Basel" },
"distance": { "@type": "Distance", "name": "1250 km" }
}
</script>Minimal valid version
The smallest markup that still produces a valid TravelAction 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": "TravelAction",
"fromLocation": { "@type": "Place", "name": "Origin" },
"toLocation": { "@type": "Place", "name": "Destination" }
}
</script>Google rich results this unlocks
TravelAction 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). TravelAction becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.
Common TravelAction 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
TravelAction where Trip fits
WrongTravelAction on an itinerary pageRightTrip / Flight / TrainTrip for itinerariesTrip carries structured itinerary; TravelAction is for activity-stream records.
Schema properties in this example
Also mentioned in 1 other example
TravelAction also appears in MoveAction. See the full TravelAction schema page for every reference.
About the example data
Sam Xoo's Copenhagen-to-Basel rail trip.
Comments
Loading comments...