XooCode(){

Role

Role is a wrapper that lets you attach extra context to an otherwise plain property. Classic uses: a Person who is a member of a SportsTeam but only from 2019 to 2023, or a MusicGroup member who is specifically the lead guitarist, or an author of a specific chapter in a book.

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

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

Highlight legend:Required by GoogleRecommendedOptional
schema.org/Role
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "SportsTeam",
  "name": "Dunmore Dragons",
  "member": [
    {
      "@type": "Role",
      "roleName": "Captain",
      "startDate": "2021-09-01",
      "endDate": "2024-06-30",
      "member": {
        "@type": "Person",
        "name": "Lucy Voss"
      }
    },
    {
      "@type": "Role",
      "roleName": "Captain",
      "startDate": "2024-09-01",
      "member": {
        "@type": "Person",
        "name": "Adelaide Voss"
      }
    },
    {
      "@type": "Role",
      "roleName": "Shooting Guard",
      "namedPosition": "#23",
      "startDate": "2023-09-01",
      "member": {
        "@type": "Person",
        "name": "Roman Halliwell"
      }
    }
  ]
}
</script>

Direct properties (4)

  • roleName: the role label (Text or URL) — "Lead Guitarist", "Captain", "Editor in Chief".
  • namedPosition: organisational position (Text or URL) — "Chief Technology Officer".
  • startDate / endDate: ISO 8601 bounds when the role is / was held.

How Role attaches

Role wraps a property value by co-locating the property name on the Role node itself. The pattern:

"member": {
  "@type": "Role",
  "member": { "@type": "Person", "name": "…" },
  "roleName": "…",
  "startDate": "…"
}

Note the repeated property name. This is how schema.org attaches metadata to the relationship, not the entities on either end. Google and most consumers understand the pattern for member, author, actor, and employee.

Minimal valid version

The smallest markup that still produces a valid Role 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/Role (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Role",
  "roleName": "Captain",
  "startDate": "2024-09-01"
}
</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.

  • No dedicated rich result (feeds knowledge-panel relationship data)
    Google docs

Common Role 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

    Role without the repeated property name

    Wrong
    Role with roleName but no inner member / author / actor
    Right
    Role needs the original property repeated inside to attach the Person

    Without the inner repeat, consumers can't tell which entity the role-scoped metadata attaches to.

  2. 02

    Role on a property that doesn't accept it

    Wrong
    Role wrapping a scalar like price or startDate itself
    Right
    Role is for entity-valued properties (member, author, actor, employee)

    Scalars don't need a Role wrapper; dates and numbers live as direct values.

  3. 03

    endDate in the past on current roles

    Wrong
    Leaving a stale endDate on a role still held
    Right
    Omit endDate while the role is current

    Stale endDates signal the role has ended; consumers drop the relationship from current-team views.

Also mentioned in 3 other examples

Role also appears in EmployeeRole, OrganizationRole, and PerformanceRole. See the full Role schema page for every reference.

About the example data

The Dunmore Dragons basketball team — Lucy Voss captained the team from 2021 to 2024 before retiring; Adelaide Voss is the current captain.

Comments

Loading comments...

Leave a comment