Q&A (QAPage
) structured data

Q&A pages are web pages that contain data in a question and answer format, which is one question
followed by its answers. For content that represents a question and its
answers, you can mark up your data with the
schema.org QAPage
, Question
, and Answer
types.
Properly marked up pages are eligible to have a rich result displayed on the search results page. This rich treatment helps your site reach the right users on Search. For example, you might see a rich result for the user query "How do I remove a cable that is stuck in a USB port?" if the page has been marked up with answers to that question.
In addition to enabling your content for the rich result treatment, marking up your Q&A page helps Google generate a better snippet for your page. The content from the answers may appear in the basic result if the rich result is not shown.
How to add structured data
Structured data is a standardized format for providing information about a page and classifying the page content. If you're new to structured data, you can learn more about how structured data works.
Here's an overview of how to build, test, and release structured data.
- Add the required properties. Based on the format you're using, learn where to insert structured data on the page.
- Follow the guidelines.
- Validate your code using the Rich Results Test and fix any critical errors. Consider also fixing any non-critical issues that may be flagged in the tool, as they can help improve the quality of your structured data (however, this isn't necessary to be eligible for rich results).
- Deploy a few pages that include your structured data and use the URL Inspection tool to test how Google sees the page. Be sure that your page is
accessible to Google and not blocked by a robots.txt file, the
noindex
tag, or login requirements. If the page looks okay, you can ask Google to recrawl your URLs. - To keep Google informed of future changes, we recommend that you submit a sitemap. You can automate this with the Search Console Sitemap API.
Examples
The following markup example includes the QAPage
, Question
,
and Answer
type definitions in JSON-LD:
<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, "datePublished": "2024-02-14T15:34-05:00", "author": { "@type": "Person", "name": "Mary Stone", "url": "https://example.com/profiles/mary-stone" }, "acceptedAnswer": { "@type": "Answer", "text": "1 pound (lb) is equal to 16 ounces (oz).", "image": "https://example.com/images/conversion-chart.jpg", "upvoteCount": 1337, "url": "https://example.com/question1#acceptedAnswer", "datePublished": "2024-02-14T16:34-05:00", "author": { "@type": "Person", "name": "Julius Fernandez", "url": "https://example.com/profiles/julius-fernandez" } }, "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.", "upvoteCount": 42, "url": "https://example.com/question1#suggestedAnswer1", "datePublished": "2024-02-14T15:39-05:00", "author": { "@type": "Person", "name": "Kara Weber", "url": "https://example.com/profiles/kara-weber" }, "comment": { "@type": "Comment", "text": "I'm looking for ounces, not fluid ounces.", "datePublished": "2024-02-14T15:40-05:00", "author": { "@type": "Person", "name": "Mary Stone", "url": "https://example.com/profiles/mary-stone" } } }, { "@type": "Answer", "text": " I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that.", "upvoteCount": 0, "url": "https://example.com/question1#suggestedAnswer2", "datePublished": "2024-02-14T16:02-05:00", "author": { "@type": "Person", "name": "Joe Cobb", "url": "https://example.com/profiles/joe-cobb" } } ] } } </script> </head> <body> </body> </html>
<html> <body itemscope itemtype="https://schema.org/QAPage"> <div itemprop="mainEntity" itemscope itemtype="https://schema.org/Question"> <h2 itemprop="name">How many ounces are there in a pound?</h2> <div itemprop="upvoteCount">52</div> <div itemprop="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?</div> <div> <div><span itemprop="answerCount">3</span> answers</div> <div><span itemprop="upvoteCount">26</span> votes</div> <div itemprop="acceptedAnswer" itemscope itemtype="https://schema.org/Answer"> <div itemprop="upvoteCount">1337</div> <div itemprop="text"> 1 pound (lb) is equal to 16 ounces (oz). </div> <a itemprop="url" href="https://example.com/question1#acceptedAnswer">Answer Link</a> </div> <div itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer"> <div itemprop="upvoteCount">42</div> <div itemprop="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. </div> <a itemprop="url" href="https://example.com/question1#suggestedAnswer1">Answer Link</a> </div> <div itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer"> <div itemprop="upvoteCount">0</div> <div itemprop="text"> I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that. </div> <a itemprop="url" href="https://example.com/question1#suggestedAnswer2">Answer Link</a> </div> </div> </div> </body> </html>
Guidelines
For your Q&A page to be eligible for this rich treatment, you must follow these guidelines:
Content guidelines
- Only use the
QAPage
markup if your page has information in a question and answer format, which is one question followed by its answers. - Users must be able to submit answers to the question. Don't use
QAPage
markup for content that has only one answer for a given question with no way for users to add alternative answers; instead, useFAQPage
. Here are some examples:Valid use cases:
- A forum page where users can submit answers to a single question
- A product support page where users can submit answers to a single question
Invalid use cases:
- An FAQ page written by the site itself with no way for users to submit alternative answers
- A product page where users can submit multiple questions and answers on a single page
- A how-to guide that answers a question
- A blog post that answers a question
- An essay that answers a question
- Don't apply
QAPage
markup to all pages on a site or forum if not all the content is eligible. For example, a forum may have lots of questions posted, which are individually eligible for the markup. However, if the forum also has pages that are not questions, those pages are not eligible. - Don't use
QAPage
markup for FAQ pages or pages where there are multiple questions per page.QAPage
markup is for pages where the focus of the page is a single question and its answers. - Don't use
QAPage
markup for advertising purposes. - Make sure each
Question
includes the entire text of the question and make sure eachAnswer
includes the entire text of the answer. Answer
markup is for answers to the question, not for comments on the question or comments on other answers. Instead, use thecomment
property andComment
type for this type of content.- Question and answer content may not be displayed as a rich result if it contains any of the following types of content: obscene, profane, sexually explicit, graphically violent, promotion of dangerous or illegal activities, or hateful or harassing language.
- Education-related Q&A pages,
where the primary focus is to provide a correct answer
to a user-submitted homework question, may be eligible for a Q&A carousel experience.
These pages may only have a single answer that's provided or selected by in-house experts
(instead of users).
Example: An education page where a user submitted a single question, and a top answer is selected by experts.
Structured data type definitions
This section describes the structured data types related to QAPage
.
You must include the required properties for your content to be eligible for display as a rich result. You can also include the recommended properties to add more information to your structured data, which could provide a better user experience.
You can use Google's Rich Results Test to validate and preview your structured data.
QAPage
The QAPage
type indicates that the
page is focused on a specific question and its answer(s). We will only use Question
structured data from pages with QAPage
markup. There must only be one
QAPage
type definition per page.
The full definition of QAPage
is available at
https://schema.org/QAPage.
The following table describes the properties of the QAPage
type that are used by Google Search.
Required properties | |
---|---|
|
Question
The |
Question
The Question
type defines the question that this page answers, and includes
the answers, if any, to that question. Exactly one Question
type is expected on the
page, nested under the mainEntity
property of the schema.org/QAPage
. There
must only be one Question
type definition per page.
The full definition of Question
is available at https://schema.org/Question. The Google-supported properties are the
following:
Required properties | |||||
---|---|---|---|---|---|
|
Integer
The total number of answers to the question. For example, if there are 15 answers, but only the first 10 are marked up due to pagination, this value would be 15. This may also be 0 for questions with no answers. |
||||
Either acceptedAnswer or suggestedAnswer |
Answer
To be eligible for the rich result, a question must have at least one answer – either an
|
||||
|
Text
The full text of the short form of the question. For example, "How many teaspoons in a cup?". |
Recommended properties | |
---|---|
|
Person or Organization
Information about the author of the question. To help Google best understand authors across various features, we recommend following the author markup best practices. Include as many properties that make sense for the author, using the supported properties from article and profile page structured data as a guide. |
|
A link to a web page that uniquely identifies the author of the question, most likely a profile page of the Q&A website. We recommend marking up that page using profile page structured data. |
comment |
A comment pertaining to the question, if present. Ideally, this content isn't an answer: it's usually a clarification or discussion about the question. |
dateModified |
The date and time the answer was edited, if applicable, in ISO 8601 format. |
datePublished |
The date and time the question was posted in ISO 8601 format. |
image |
Any inline images within the question, if applicable. |
|
Text
The full text of 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?" |
|
Integer
The total number of votes that this question has received. If the page supports upvotes and
downvotes, then set the |
video |
Any inline videos within the question, if applicable. |
Answer
The Answer
type defines the suggested and accepted answers to the
Question
on this page. Define Answers
inside the Question
,
as values for the suggestedAnswer
and acceptedAnswer
properties.
The following table describes the properties of the Answer
type that is used within a
Question
.
The full definition of Answer
is available at
https://schema.org/Answer.
Required properties | |
---|---|
|
Text
The full text of the answer. If only a portion is marked up, your content may not be shown and Google cannot determine the best text to display. |
Recommended properties | |
---|---|
|
Person or Organization
Information about the author of the answer. To help Google best understand authors across various features, we recommend following the author markup best practices. Include as many properties that makes sense for the author, using the supported properties from article and profile page structured data as a guide. |
|
A link to a web page that uniquely identifies the author of the answer, most likely a profile page of the Q&A website. We recommend marking up that page using profile page structured data. |
comment |
A comment pertaining to the answer, usually a clarification or discussion about the answer, if applicable. |
dateModified |
The date and time the answer was edited in ISO 8601 format, if applicable. |
datePublished |
The date and time the question was answered in ISO 8601 format. |
image |
Any inline images within the question, if applicable. |
|
Integer
The total number of votes that this answer has received, if applicable. If the page supports upvotes and
downvotes, then set the |
|
URL
A URL that links directly to this answer. For example: |
video |
Any inline videos within the answer, if applicable. |
Comment
The Comment
type can optionally be used to describe clarifications or discussions
about the question or answer which are neither question nor answer. Define Comments
inside the Question
or Answer
, as values for the comment
property.
The full definition of Comment
is available at
https://schema.org/Comment.
Required properties | |
---|---|
|
Text
The full text of the comment. If only a portion is marked up, Google might not be able to determine the best text to display. |
Recommended properties | |
---|---|
|
Person or
Organization
Information about the author of the comment. To help Google best understand authors across various features, we recommend following the author markup best practices. Include as many properties that make sense for the author, using the supported properties from article and profile page structured data as a guide. |
|
A link to a web page that uniquely identifies the author of the comment, most likely a profile page of the Q&A website. We recommend marking up that page using profile page structured data. |
comment |
A nested, threaded comment replying to the comment, if applicable. |
dateModified |
The date and time the comment was edited in ISO 8601 format, if applicable. |
datePublished |
The date and time the comment was written in ISO 8601 format. |
image |
Any inline images within the comment, if applicable. |
video |
Any inline videos within the comment, if applicable. |
Monitor rich results with Search Console
Search Console is a tool that helps you monitor how your pages perform in Google Search. You don't have to sign up for Search Console to be included in Google Search results, but it can help you understand and improve how Google sees your site. We recommend checking Search Console in the following cases:
- After deploying structured data for the first time
- After releasing new templates or updating your code
- Analyzing traffic periodically
After deploying structured data for the first time
After Google has indexed your pages, look for issues using the relevant Rich result status report. Ideally, there will be an increase of valid items, and no increase in invalid items. If you find issues in your structured data:
- Fix the invalid items.
- Inspect a live URL to check if the issue persists.
- Request validation using the status report.
After releasing new templates or updating your code
When you make significant changes to your website, monitor for increases in structured data invalid items.- If you see an increase in invalid items, perhaps you rolled out a new template that doesn't work, or your site interacts with the existing template in a new and bad way.
- If you see a decrease in valid items (not matched by an increase in invalid items), perhaps you are no longer embedding structured data in your pages. Use the URL Inspection tool to learn what is causing the issue.
Analyzing traffic periodically
Analyze your Google Search traffic using the Performance Report. The data will show you how often your page appears as a rich result in Search, how often users click on it and what is the average position you appear on search results. You can also automatically pull these results with the Search Console API.问题排查
如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。
- 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
- Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南。
- 您的结构化数据可能存在错误。请查看结构化数据错误列表和“无法解析的结构化数据”报告。
- 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告。
- 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
- 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查。
- 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答。
- 在 Google 搜索中心论坛中发帖提问。