Creating Question & Answer (QAPage) Schema Markup

Schema Markup

Question and answer page (Q&A Page) schema markup is a relatively new schema.org type that is used for pages that contain a question and a way for users to submit answers to that question. You can mark up these questions and answers with QAPage schema to have this content eligible for enhanced Google features in search results. Google recommends that your QAPage schema includes a URL for each individual answer to improve user experience.

Learn more about Q&A page structured data in Google’s documentation here.

Q&A Schema Markup: A Timeline

December 2017 – Google released a question and answer rich result card

December 2018 – Google search results now include a “Top Answer” rich result

On December 3rd, 2018, Aaron Bradley pointed out that he saw the new Q&A Page rich result.

“There’s a new Google Rich result in town, “Q&A Page”, powered by #schema.org/QAPage, Question and Answer…”

 

Aaron Bradley Q&A Rich Results

Right away people started asking us how to achieve this new iteration of the question & answer rich result. But first, what does it look like? How will your snippets change by implementing this QAPage schema markup? Here is the example provided by Google:


Q&A Rich Result

Let’s take a second and discuss the type of content this rich result is built for. The documentation for Q&A Page is very clear that this is meant for pages that answer and discuss a single question. Therefore this is excellent for support pages and forum posts, or any page with a single question and multiple answers. This is not intended for a single page with a long list of FAQs. With that out of the way let’s get into how to achieve this stand out rich result!

Q&A Page Schema Markup Requirements

There are 3 schema classes that we will need to use to complete our Q&A Page markup. They are:

  1. QAPage
  2. Question
  3. Answer

Each of these will be connected and nested underneath one another. An example looks like this:

<html>
  <head>
    <title>How many ounces are there in a pound?</title>
    <script type="application/ld+json">
    {
      "@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?",
        "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"
            }
          }
        ]
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>

Let’s have a look at each class, they’re required properties as called out in the Documentation, and what values these properties should be defined by:

QAPage Schema Class for Q&A Markup

https://schema.org/QAPage

Schema Property  Priority Mapping Notes
mainEntity Required We must use the schema.org class Question to define the mainEntity property.

Question Schema Class for Q&A Markup

https://schema.org/Question

Schema Property  Priority Mapping Notes
answerCount Required Yes.
Either acceptedAnswer or suggestedAnswer Required At least one of either acceptedAnswer or suggestedAnswer must be nested underneath the Question. There should only ever be 1 acceptedAnswer, however than can be any number of suggestedAnswer.
name Required This property is defined by text only. The intended content for this property is the short form of the question. Example: “How many teaspoons in a cup?”.
author Recommended This should be defined by either a Person or Organization schema class, with the name property filled in by text.
dateCreated Recommended The date the Question was posted.
text Recommended This property is defined by text only. The intended content is the long form of the question. For example, “I’m cooking, and I need to know how many teaspoons are in a cup. How many teaspoons are in 1 cup?”
upvoteCount Recommended The total number of votes that this question has received. If the page supports upvotes and downvotes, then set the upvoteCount value to a single aggregate value that represents both upvotes and downvotes. For example, if there are 5 upvotes and 2 downvotes, the aggregate value used for upvoteCount is 3. If there are 5 upvotes and downvotes are not supported, then the value for upvoteCount is 5.

Question Schema Markup Properties Explained

  • text – The actual text of the question itself.
  • name – Choose an identifier to name the data item. Using the actual question is a good idea, just to keep things simple.
  • Url – The URL for where the question lives on the page.
  • suggestedAnswer – This property is expecting you to create an Answer data item. Best to use suggestedAnswer when there are many possible answers. The documentation indicates they don’t have to be relevant or accurate answers. Think of answers on a question/answer web page like Yahoo Answers.
  • acceptedAnswer – This property is expecting you to create an Answer data item. It is best to use acceptedAnswer for the best answer to a question. This can be the only answer or it could be one among many other answers. It just needs to be the best answer.  If the question is in a forum, then use the one with the most positive votes. If it is a list of answers, choose the best from the list.
  • publisher – This property is expecting an Organization or Person data item. Usually, it is the organization that owns the domain the question/answer content is found on.  Note, that all types of organization markup can be used here, such as LocalBusinessMedicalOrganization, etc.
  • about – This property is expecting a Thing data item, which describes what the questions are about. If you’re creating markup for a business FAQ page, then they would be about your business.  Use a Wikipedia lookup if the question is about a topic described there. If it is about a service or product you offer, reference the service/product page.
  • isPartOf – This property is expecting a CreativeWork data item and it is our opportunity to tie all our questions together. The property isPartOf indicates that the question is part of some other creative work. In most cases, you will want to use the QAPage class type.
  • description – This property describes the question. If the question has a group heading then this may be an appropriate place to call out what that heading is.
  • upvoteCount – If this question has an upvote count then this would be the property to indicate that. This property is expecting an Integer data item

Answer Schema Class for Q&A Markup

https://schema.org/Answer

Schema Property  Priority Mapping Notes
text Required This property is defined by text only. It is intended to house the full text of the answer.
author Recommended Using either.
dateCreated Recommended The date at which the answer was added to the page, in ISO-8601 format.
downvoteCount Recommended Using an integer, enter the number of downvotes this answer has received.
upvoteCount Recommended Using an integer, enter the number of upvotes this answer has received.
url Recommended A URL that links directly to this answer. For example: https://www.examplesite.com/question#answer1

Accepted Answer & Answer Schema Markup Properties Explained

Note, that the accepted answer above is a link. That’s because we are linking to a new data item, or entity, that details out the Answer.  The schema.org class type Answer is very similar properties to Question.  It has the same two required properties, text and name. There are no recommended properties for Answer, but we will still want to use many of the same properties that we did for Question. Again, not all the properties are necessary. Use them when they are applicable.

  • text – The actual text of the answer itself.
  • name – Choose an identifier to name the data item. Using the actual answer text is a good idea, just to keep things simple.
  • Url – The URL for where the answer lives on the page.
  • about – This property is expecting a Thing data item, which describes what the answers are about. If you’re creating markup for a business FAQ page, then they would be about your business. Use a Wikipedia lookup if the question is about a topic described there. If it is about a service or product you offer, reference the service/product page.
  • publisher – This property is expecting an Organization or Person data item. Usually it is the organization that owns the domain the content is found on, like an FAQ answer. Sometimes it is a person who is writing on your page, like a response in a forum or a guest blogger.
  • isPartOf – This property is expecting a CreativeWork data item and it is our opportunity to tie all our answers together. The property isPartOf indicates that the answer is part of some other creative work. In most cases you will want to use the QAPage class type.
  • description – This property describes the answer. If the answer is from a group that has a heading then this may be an appropriate place to call out what that heading is.
  • upvoteCount – If this answer has an upvote count then this would be the place to indicate that. This property is expecting an Integer data item.

How to Create Q&A Schema Markup

To start let’s have a look at the schema.org class type: Question. The only required properties for questions are text and name. There are 5 recommended properties: URL, suggested answer, accepted answer, publisher, and about.  About is a great property, because you can use a Wikipedia reference to define the topic explicitly.

Finally, there are 3 useful other properties that I will highlight: is part of, description, and upvote count. Please note that you do not have to use every property listed in Schema App (we show all the properties possible in the schema.org vocabulary for the Question class).

Step One: Add the required properties for QAPage structured data

Add the required schema.org properties for QAPage structured data markup using our reference above. We recommend our own tools, the Schema App Editor and Schema App Highlighter, but there are many different options out there.

Step Two: Review your markup to ensure it follows Google’s Structured Data Guidelines

Check that your markup follows Google’s structured data guidelines

Step Three: Deploy your Schema Markup to the relevant pages

Deploy your markup. Google recommends using JSON-LD, which is also our favorite format for deployment!

Step Four: Validate your Schema Markup to make sure it is working

Test that your schema markup is working using Google’s Rich Results Testing Tool and the Schema Markup Validator, which has officially replaced Google’s Structured Data Testing Tool. Read more about this change in our news post here.

In order to understand how to create the markup in practice,  watch this short video, where Martha van Berkel steps you through Question and Answer Schema Markup in Schema App.

Learn how to create Q&A schema markup using the Schema App Editor with our how-to tutorial here.

Tools Test QAPage Schema Markup

Schema Markup Validator

The Schema Markup Validator (SMV) was modeled after and has officially replaced Google’s Structured Data Testing Tool (SDTT). Many SEOs still prefer the SDTT, as the SMV only validates your schema.org syntax and does not show your eligibility for rich results.

Schema Markup Validator Screenshot

Rich Results Testing Tool

Google’s Rich Results Testing Tool helps you to see which rich results can be generated by the structured data it contains.

Rich Result Test

Benefits of QAPage Structured Data

The benefits of structured data extend beyond achieving Questions and Answer rich results in search. You’re taking control of the data on your web pages, instead of hoping search engines will be intuitive enough to understand the content on your site and show the best information in search. Through schema markup, you can define objects in your content as distinct entities with their own properties and relationships to other entities. Once defined, you can connect these entities to a search engine’s knowledge graph, streamlining Google’s ability to contextualize your content.

QAPage structured data is great for forums or online message boards where users can ask a question, and the community can submit their answers to that question. Q&A schema is not intended for pages that have multiple questions and answers—that’s what FAQPage schema markup is for! Q&A structured data also goes very well with speakable schema markup, as these types of answers feed well into voice search with smart devices.

Frequently Asked Questions about QAPage Schema Markup

How do I use Question and Answer (Q&A) schema markup?

This type of schema markup should be applied only on page that have one question as the main focus of that page, as opposed to a page with multiple questions and their respective answers. Make sure you include the URL that links directly to each individual answer to improve the user experience of your Q&A structured data markup!

QAPage vs FAQPage Schema Markup?

If users are not able to submit answers to the question being asked on the page, then FAQPage schema markup should be used. Learn more about frequently asked questions (FAQPage) schema markup here.

Q&A schema is a relatively new schema type, and an interesting one. It’s used for pages that contain an question and a way for multiple users to submit answers to that question. Obviously, this type of content doesn’t fit for every website, but it is a great opportunity to engage with users right on the search engine results page. This is another example of how rich result opportunities can inform your content strategy. If questions and answers seem like a good fit for your online business goals, or a new opportunity to engage with users in search, don’t hesitate to get in touch! We can help you get started.

We help you go beyond the fundamentals of search engine optimization, leveraging structured data to showcase your unique value in search. In a rapidly changing SEO environment, we introduce agility to your digital team, saving you time and resources for managing other aspects of your business portfolio. We deliver to your online business goals using our structured data expertise and advanced technology.

Set up a strategy call with our technical experts today.

 

Martha van Berkel is the co-founder and CEO of Schema App, an end-to-end Semantic Schema Markup solution provider based in Ontario, Canada. She focuses on helping SEO teams globally understand the value of Schema Markup and how they can leverage Schema Markup to grow search performance and develop a reusable content knowledge graph that drives innovation. Before starting Schema App, Martha was a Senior Manager responsible for online support tools at Cisco. She is a Mom of two energetic kids, loves to row, and drinks bulletproof coffee.

Menu