Put structured data on your page to enable special features in Google Search results, then test it with the Rich Results test.
Run the test
For a URL
Submit the full URL of the page to test. Important: All page resources must be accessible by an anonymous user accessing the code from the internet. Any resources that are behind a firewall or password-protected will not be available to the test. If your page is behind a firewall or hosted on your local machine, you can test it by exposing a tunnel.
For a code snippet
You can test an arbitrary code snippet using this tool. In the tool landing page, choose Code instead of URL for the test, then paste the code to be tested. You can modify the code and rerun the test by clicking Run test as often as you like.
Optionally choose a user agent
You can choose which user agent to use when testing your page: that is, test your page with a smartphone or a desktop computer. Choose a user agent from the list below the URL or code entry textbox.
The default user agent is smartphone, because of Google's mobile-first initiative, which reflects the increased use of mobile devices to access web pages. If your site is mobile-first, we recommend using the smartphone user agent for your testing, unless you have specific reasons to use the desktop user agent. For all sites, we recommend using the mobile user agent because this is how the majority of users browse the web today.
You can see if your site is mobile-first on your property's settings page.
Supported structured data formats
The Rich Results test supports structured data in JSON-LD, RDFa, and Microdata
Review the results
The test shows which rich result types were found on the page, as well as any errors or suggestions for your structured data.
If there are errors or warnings, expand the individual item to see details, and click the description to open the code explorer in the corresponding location. The explorer uses the rendered source code.
The test results cover the following areas:
URL status
The tool can report any the following status values for a tested URL where N depends on the number of items found.
- N valid item(s) detected
- No items detected
- N valid item(s) with warnings detected
- N valid items detected: All have warnings
- N valid items detected: Some have warnings
- N items detected: Some are invalid
- N invalid item(s) detected
- URL cannot be crawled
- Structured data with syntax errors detected
Crawling
This section describes whether Google is permitted to crawl the page. If Google is prevented from crawling the page as part of its regular crawl cycle (for example, is prevented from crawling by a robots.txt rule or noindex directive), the page cannot be tested with this tool.
- Crawled successfully / Crawl failed:
- Crawled as: Shows the type of user agent used for the crawl (smartphone or desktop)
- Crawl allowed? Tests whether a robots.txt rule on the site prevents this page from being crawled.
- Page fetch: Whether the page could be fetched by the test. If crawling failed, this will always fail.
Detected Items / Detected structured data
Whether any structured data items were found on the page. If structured data was found but could not be parsed, that will be indicated here. Any items found, whether good, with warnings or errors, or unparseable, will be listed here, along with a description of the item and any issues.
Errors
If for some reason the tool cannot access the page, it will display one of the following errors:
- DNS server unresponsive: Often this is a transient problem that resolves itself in a few minutes.
- DNS error: Host unknown: Your DNS server did not resolve your URL. This might be a transient problem that resolves itself in a few minutes.
- DNS error: Private IP provided: Your DNS returned an IP that is in a special/private excluded range, such as RFC 1918 private IP (for example, 10.0.0.1)
- Server connection error: Server was unreachable, refused connection or failed to connect. Read more.
- Server invalid response: Server does not support requested protocol the response or headers were truncated; or the response could not be parsed (for example, if the response data was incorrectly compressed). Read more.
- Invalid server SSL certificate: Your site's SSL certificate is invalid. Google won't test an HTTPS URL on the site unless the certificate is valid.
- Robots.txt unreachable: Google won't crawl a website if the robots.txt file is present but not reachable. You can check your robots.txt availability in the Crawl Stats report.
- Hostload exceeded: Your site seems to be at maximum capacity for Google crawling or inspection requests. Google can't run tests until your traffic load (as estimated by Google) drops.
If a test cannot load all the resources used by a page, you will see a warning. Resources are external elements included in the page, such as images, CSS, or script files. This test tries to load only certain types of resources; others that won't affect the test are ignored.
Loading issues can happen for several reasons:
- The resource couldn't be loaded in a reasonable amount of time. In this case, try running the test again. If it continues to happen, consider hosting the resource somewhere else, or else try to discover and fix the reason for slowness or lack of response from the host.
- The resource does not exist in the location listed (404 error). Verify and fix the resource's URL on your page.
- The resource is inaccessible to non-logged-in users. The test accesses the page as an anonymous user; ensure that all resources are accessible to anonymous users.
- The resource is blocked to Googlebot by a robots.txt file. If the resource is important (see below) and it is on your own site, you might want to unblock the resource to Googlebot. If the resource is on another site, you might want to contact the site's webmaster and ask to have it unblocked.
Unblocking important resources
If a blocked resource is important, it could have a big effect on how Google understands the page. For example, a blocked large image could make a page appear to be mobile-friendly when it is not, or a blocked CSS file could result in incorrect font styles being applied (for example, too small for a device). This affects Google's ability to crawl your page, which could affect your results on Google. You should make sure that important resources are not blocked to Googlebot by robots.txt and are generally accessible.
Inconsistent test results/Page loading issues
If you have unloadable resources or other page loading issues, you might see slightly different results every time you run the test. This is because the set of resources that were loaded can vary during each test run. If your page rendering changes each time you run the test, and you have not changed anything, check for a "page loading issues" warning; if present, click for more information to see what might have happened to prevent the page from being rendered consistently and correctly.
Error type | Description |
---|---|
Invalid JSON document | The JSON had a top-level syntax error. |
Incorrect value type | The value specified for a field was of the wrong type. For example, you specified a string when a number or array was expected. See the structured data documentation to learn the required value type for that specific field. |
Parsing error: Missing ':' | Missing a ':' mark between a field and value. |
Parsing error: Missing ',' or '}' | Missing a comma or closing brace. |
Parsing error: Missing '}' or object member name |
Missing a closing brace or object member name. |
Parsing error: Missing ',' or ']' in array declaration | Error parsing an array value: missing a comma or closing bracket in an array declaration. |
Unable to parse token length | For some reason the start and end of a property or value could not be found. |
Invalid number | Property value expected to be a number, but another value type was used. |
Empty escape sequence in string |
A string value include an empty escape sequence character: for example:
rather than
|
Bad escape sequence in string |
An invalid escape sequence used in a string value. For example: "description" : "Some \q unknown sequence" |
Truncated Unicode character | Missing the last 6 characters in a Unicode surrogate pair. |
Invalid Unicode character | Missing a \u token at the start of the second half of a Unicode surrogate pair. |
Invalid Unicode escape sequence: four digits expected | A Unicode escape sequence has a syntax error: it should contain four digits. |
Invalid Unicode escape sequence: hexadecimal digit expected | A Unicode escape sequence has a syntax error: a hexadecimal digit was expected but not provided. |
Duplicate unique property | You provided two definitions for a unique property in your structured data object. For example, two @context values. |
Invalid top level element | A top-level item in your JSON-LD is invalid. |
Reference to nonexistent item | An itemref attribute points to a non-existent identifier. |
Supported rich result types
This test currently supports the following rich result types:
Supported types
- Article
- Breadcrumb
- Carousel
- Course list item
- Course info
- Discussion forum
- Dataset
- Education Q&A
- Employer aggregate rating
- Estimated salary
- Event
- FAQ
- Fact check
- Hotels
- Image metadata
- Job posting
- Learning video
- Local business
- Math solvers
- Movie
- Merchant listings
- Organization
- Paywalled content
- Practice Problems
- Product snippet
- Profile page
- Q&A page
- Recipe
- Review snippet
- Sitelinks searchbox
- Software app
- Special Announcement
- Subscribed Content
- Vacation rental
- Vehicle listing
- Video
Save test history
Search Console saves your code and test state each time you run the test. To save a version history of your code and tests, bookmark the page URL after running a test. Test history is saved for approximately 90 days. These bookmarks are accessible by anyone.
Share test results
You can use the Share button to share the test results browser link with anyone; permissions are not required to view the results. Test result links are valid for approximately 90 days.
See how your page might look in Google Search results
For some rich result types you can preview how the result might appear in Google Search or Google Assistant. If your page is eligible for multiple Search result layouts, this tool will include selectors to let you view the different layouts, including layouts for desktop and mobile searches.
You can experiment with your page by changing the code and rerunning the test to generate new layouts. You can share the URL in your browser with other users to share your rendered results.
Depending on what the tool finds on the page, you can choose a result type to view and select a desktop or mobile version.
Google does not guarantee that your page will appear exactly as shown here, or that any of the views shown will be applied to your page result; Google tries to show the best result for a search request, based on the user's search history, location, and many other variables.
More structured data resources
Here are some more resources about structured data and Google Search result features:
- Structured data gallery shows the search result features supported by Google Search.
- Overview of structured data on Google for web page developers to enable these features.