Header JSON-LD Examples
Loading

Article using JSON-LD

An article, such as a news article or piece of investigative report. Newspapers and magazines have articles of many different types and this is intended to cover them all.

-Schema.org/Article

Article uses

As you see on the quote this can be used on every Article element. It is the most general one, and if none of the more specified categories below fit, this is perfectly fine to use.

Property Description
articleBody
The actual body of the article.
articleSection
Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc.
pageEnd
The page on which the work ends; for example "138" or "xvi".
pageStart
The page on which the work starts; for example "135" or "xiii".
pagination
Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".
wordCount
The number of words in the text of the Article.

Similar Alternatives

Minimal Code Example

<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "Article",
"author": "Author name",
"datePublished": "2016-1-1",
"headline": "Headline",
"image": {
"@type": "imageObject",
"url": "http://example.com/images/image.png",
"height": "600",
"width": "800"
},
"publisher": {
"@type": "Organization",
"name": "Publisher name",
"logo": {
"@type": "imageObject",
"url": "http://example.com/images/logo.png"
}
}
}</script>
Minimal JSON-LD schema.org/Article markup

Fixing warnings

As you see this minimal example works, but It don't hurt to fix the warnings. dateModified is a no-brainer, but mainEntityOfPage is a bit more tricky. Lets see what schema.org write about it:

Many (but not all) pages have a fairly clear primary topic, some entity or thing that the page describes. For example a restaurant's home page might be primarily about that Restaurant, or an event listing page might represent a single event. The mainEntity and mainEntityOfPage properties allow you to explicitly express the relationship between the page and the primary entity.

Ive seen many different examples on how this is done. All from the boolean value True, to linking to official pages or your domain.com. Many will work, and to be honest I doubt Google or other search engines care so much about where you point it.

So IF you have this Article in a WebPage markup on the same URL, link it to that, if not type in the boolean value true. Its not really any other choices in schema.org/Article.

Advanced Code Example

<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "Article",
"author": "Author name",
"datePublished": "2016-1-1",
"datemodified": "2016-1-2",
"mainEntityOfPage": "True",
"headline": "Headline",
"articleSection": "If you have a section like Sports or Clothes, add this.",
"image": {
"@type": "imageObject",
"url": "http://example.com/images/image.png",
"height": "600",
"width": "800"
},
"publisher": {
"@type": "Organization",
"name": "Publisher name",
"logo": {
"@type": "imageObject",
"url": "http://example.com/images/logo.png"
}
},
"wordCount": "430",
"articleBody": "Copy your entire article here if you want. It can get really, really, really long. All in one single line with spaces and punctuation"
}</script>
Full JSON-LD schema.org/Article markup

And thats it. You successfully told the search engines you made an Article, and not just some random page they have to guess what is. :)

If you liked this, please share!
Disqus comments for JSON-LD - Article markup