XooCode(){

LegislativeBuilding

LegislativeBuilding is a direct GovernmentBuilding subtype for state capitols, national parliaments, and congressional buildings. It has no unique properties, but legislative buildings attract tourism, civic-engagement visits, and journalism, so structured hours, event sessions, and tourBookingPage-style patterns pay off.

Useful inherited patterns:

  • openingHoursSpecification: separate the building's general hours from the legislative chamber's session schedule.
  • event: legislative session dates as Event entries for "when is parliament in session" queries.
  • amenityFeature: gallery access, guided-tour availability, security policies.
  • containedInPlace: the State or Country the legislature governs.
  • parentOrganization: the legislature itself as a GovernmentOrganization.

Full example of schema.org/LegislativeBuilding json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/LegislativeBuilding
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LegislativeBuilding",
  "@id": "https://parliament.dunmora.example",
  "name": "Dunmora Royal Parliament Building",
  "url": "https://parliament.dunmora.example",
  "description": "Seat of the Dunmora Royal Parliament. Chamber of Commons, Chamber of Lords, committee rooms, visitor galleries, public tour programme.",
  "telephone": "+1-570-555-0900",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1 Parliament Square",
    "addressLocality": "Dunmora City",
    "addressCountry": "DM"
  },
  "publicAccess": true,
  "isAccessibleForFree": true,
  "openingHoursSpecification": [
    { "@type": "OpeningHoursSpecification", "name": "Visitor centre", "dayOfWeek": ["Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "opens": "09:00", "closes": "16:00" }
  ],
  "amenityFeature": [
    { "@type": "LocationFeatureSpecification", "name": "Public viewing gallery (Commons and Lords)", "value": true },
    { "@type": "LocationFeatureSpecification", "name": "Guided tours (hourly, Tuesday-Saturday)", "value": true },
    { "@type": "LocationFeatureSpecification", "name": "Security screening required", "value": true }
  ],
  "containedInPlace": { "@type": "Country", "name": "Kingdom of Dunmora" },
  "parentOrganization": { "@type": "GovernmentOrganization", "name": "Royal Parliament of Dunmora" },
  "event": [
    {
      "@type": "Event",
      "name": "Spring Session, Chamber of Commons",
      "startDate": "2026-04-07T10:00:00-04:00",
      "endDate": "2026-06-26T18:00:00-04:00",
      "eventAttendanceMode": "https://schema.org/MixedEventAttendanceMode",
      "location": { "@type": "Place", "name": "Chamber of Commons" }
    }
  ]
}
</script>

Minimal valid version

The smallest markup that still produces a valid LegislativeBuilding 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.

schema.org/LegislativeBuilding (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LegislativeBuilding",
  "name": "Dunmora Royal Parliament Building",
  "address": { "@type": "PostalAddress", "streetAddress": "1 Parliament Square", "addressLocality": "Dunmora City", "addressCountry": "DM" }
}
</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.

  • Local business / civic structure knowledge panel; visitor-calendar surfacesprimary
    Google docs

Common LegislativeBuilding 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.

  1. 01

    Session schedule in prose

    Wrong
    Session dates as HTML text on the about page
    Right
    event array with typed Event entries per session

    AI assistants answering 'is parliament in session this week' read structured Event entries, not prose.

  2. 02

    Single openingHoursSpecification for building + chamber

    Wrong
    One hours block conflating visitor centre and session hours
    Right
    Separate blocks with distinct name values

    Visitors and journalists target different hours. Name-differentiated blocks let consumers pick the right window.

Also mentioned in 1 other example

LegislativeBuilding also appears in GovernmentBuilding. See the full LegislativeBuilding schema page for every reference.

About the example data

Dunmora Royal Parliament Building, a fictional neoclassical parliament in the Xoo Code universe's small-nation ally.

Comments

Loading comments...

Leave a comment