Search code examples
schema.orgjson-ldgoogle-rich-snippets

Schema.org 'specialty' property failing with Q&A type: "The property specialty is not recognised by Google for an object of type Question."


I'm trying to add the specialty property, following the Schema.org docs using JSON-LD. According to the QAPage docs, specialty is indeed a valid value for this schema type.

The problem is when I validate with Google's Structured Data Testing Tool, it spits out this error:

(The property specialty is not recognised by Google for an object of type Question.)

Now, Schema.org is partly ran by Google, so I don't feel it's an error on their end. Pretty sure it may be JSON-LD syntax but I've been trying different things all morning. Could anybody shed any light on the issue?

{
"@context": "https://schema.org",
"@type": "QAPage",
"mainEntity": {
  "@type": "Question",
  "name": "How many ounces are there in a pound?",
  "text": "I have taken up a new interest in baking and keep running across directions in ounces and pounds. I have to translate between them and was wondering how many ounces are in a pound?",
  "specialty": "SEO",   //ISSUE LINE 
  "answerCount": 3,
  "upvoteCount": 26,
  "dateCreated": "2016-07-23T21:11Z",
  "author": {
    "@type": "Person",
    "name": "New Baking User"
  },
  "acceptedAnswer": {
    "@type": "Answer",
    "text": "1 pound (lb) is equal to 16 ounces (oz).",
    "dateCreated": "2016-11-02T21:11Z",
    "upvoteCount": 1337,
    "url": "https://example.com/question1#acceptedAnswer",
    "author": {
      "@type": "Person",
      "name": "SomeUser"
    }
  },
  "suggestedAnswer": [
    {
      "@type": "Answer",
      "text": "Are you looking for ounces or fluid ounces? If you are looking for fluid ounces there are 15.34 fluid ounces in a pound of water.",
      "dateCreated": "2016-11-02T21:11Z",
      "upvoteCount": 42,
      "url": "https://example.com/question1#suggestedAnswer1",
      "author": {
        "@type": "Person",
        "name": "AnotherUser"
      }
    }, {
      "@type": "Answer",
      "text": " I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that.",
      "dateCreated": "2016-11-06T21:11Z",
      "upvoteCount": 0,
      "url": "https://example.com/question1#suggestedAnswer2",
      "author": {
        "@type": "Person",
        "name": "ConfusedUser"
      }
    }
  ]
}
}

Solution

  • The specialty property needs to be added to WebPage (or one of its sub-types, like QAPage).

    You added it to Question (where it’s not listed).