Skip to content

Schema.org classes

Alexander Surinov edited this page Nov 27, 2016 · 8 revisions

Basic Schema.org classes that used as domain objects inside the app

Person (Thing > Person)

A person (alive, dead, undead, or fictional).

  • givenName (Text) - Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the name property.
  • familyName (Text) - Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property
  • image (URL) - An image of the item. This can be a URL or a fully described ImageObject.
  • address (Text) - Physical address of the item.

Example (JSON-LD):

{
  "@context": "http://schema.org",
  "@type": "Person",
  "@id": "http://www.xyz.edu/persons/someone",
  "givenName": "Some",
  "familyName": "One",
  "image": "someone.jpg",
  "address": "Los Angeles",
}

SocialMediaPosting (Thing > CreativeWork > Article > SocialMediaPosting)

A post to a social media platform, including blog posts, tweets, Facebook posts, etc.

  • headline (Text) - Headline of the article.
  • about (Text) - The subject matter of the content.
  • author (Person/Organization) - The author of this content or rating.
  • sharedContent (CreativeWork) - A CreativeWork such as an image, video, or audio clip shared as part of this posting.

Example (JSON-LD):

{
  "@context":"http://schema.org",
  "@type":"SocialMediaPosting",
  "@id":"https://www.pinterest.com/pin/201887995769400347/",
  "author":{
    "@type":"Person",
    "@id":"https://www.pinterest.com/ryansammy/",
    "givenName":"Ryan Sammy"
  },
  "headline":"Leaked new BMW 2 series (m235i)",
  "sharedContent":{
    "@type":"ImageObject",
    "contentUrl":"http://www.reddit.com/r/BMW/comments/1oyh6j/leaked_new_bmw_2_series.jpg
  }
}

ItemList (Thing > Intangible > ItemList)

A list of items of any sort—for example, Top 10 Movies About Weathermen, or Top 100 Party Songs.

  • itemListElement (ListItem or Text or Thing ) - For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem. Text values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.
  • itemListOrder (ItemListOrderType or Text) - Type of ordering (e.g. Ascending, Descending, Unordered).
  • numberOfItems (Integer) - The number of items in an ItemList.

Example (JSON-LD):

{
  "@context": "http://schema.org",
  "@type": "ItemList",
  "@id": "http://www.xyz.edu/friends ",
  "numberOfItems": "315",
  "itemListOrder": "http://schema.org/ItemListOrderDescending",
  "itemListElement": [{
    "@type":  "Person",
    "@id": "http://www.xyz.edu/persons/testuser",
    "givenName": "Test",
    "familyName": "User",
    "image": "janedoe.jpg",
  },
  {
    "@type": "Person",
    "@id": "http://www.xyz.edu/persons/testuser2",
    "givenName": "Test2",
    "familyName": "User2",
    "image": "janedoe.jpg",
  }]
}