TrainStation
TrainStation is a direct CivicStructure subtype for rail stations: intercity rail, commuter rail, high-speed rail. It adds no properties of its own. It is the expected shape for TrainTrip.departureStation and arrivalStation.
Full example of schema.org/TrainStation 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": "TrainStation",
"name": "Dunmore Station",
"address": { "@type": "PostalAddress", "streetAddress": "1 Rail Plaza", "addressLocality": "Dunmore", "addressRegion": "PA", "postalCode": "18512", "addressCountry": "US" },
"geo": { "@type": "GeoCoordinates", "latitude": 41.4275, "longitude": -75.6308 },
"openingHours": "Mo-Su 04:30-00:30",
"telephone": "+1-570-555-0641",
"url": "https://xoocode.com/transit/dunmore-station",
"amenityFeature": [
{ "@type": "LocationFeatureSpecification", "name": "Wheelchair accessible", "value": true },
{ "@type": "LocationFeatureSpecification", "name": "Covered platforms", "value": true },
{ "@type": "LocationFeatureSpecification", "name": "Ticket vending", "value": true }
]
}
</script>Minimal valid version
The smallest markup that still produces a valid TrainStation 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": "TrainStation",
"name": "Dunmore Station",
"geo": { "@type": "GeoCoordinates", "latitude": 41.4275, "longitude": -75.6308 }
}
</script>Google rich results this unlocks
TrainStation 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). TrainStation becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.
Common TrainStation 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
Using TrainStation for a subway stop
WrongTrainStation for a subway platformRightSubwayStation for metro/underground systems; TrainStation for mainline railThe subtypes serve different transit categories; Google Maps transit overlays and trip planners distinguish them.
Schema properties in this example
About the example data
"Dunmore Station", a fictional commuter-rail station on the proposed Dunmore-Scranton line.
Comments
Loading comments...