- HTTP request
- Request body
- Response body
- TestStatus
- TestStatusEnum
- MobileFriendlyTestResult
- MobileFriendlyIssue
- MobileFriendlyRule
- ResourceIssue
- BlockedResource
- Image
- Try it!
Runs Mobile-Friendly Test for a given URL.
HTTP request
POST https://searchconsole.googleapis.com/v1/urlTestingTools/mobileFriendlyTest:run
(This URI uses URI Template syntax.)
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{ "url": string, "requestScreenshot": boolean, } |
Fields | |
---|---|
url |
URL for inspection. |
requestScreenshot |
Whether or not screenshot is requested. Default is false. |
Response body
If successful, the response body contains data with the following structure:
Mobile-friendly test response, including mobile-friendly issues and resource issues.
JSON representation | |
---|---|
{ "testStatus": { object( |
Fields | |
---|---|
testStatus |
Final state of the test, can be either complete or an error. |
mobileFriendliness |
Test verdict, whether the page is mobile friendly or not. |
mobileFriendlyIssues[] |
List of mobile-usability issues. |
resourceIssues[] |
Information about embedded resources issues. |
screenshot |
Screenshot of the requested URL. |
TestStatus
Final state of the test, including error details if necessary.
JSON representation | |
---|---|
{
"status": enum( |
Fields | |
---|---|
status |
Status of the test. |
details |
Error details if applicable. |
TestStatusEnum
Status enum of the test.
Enums | |
---|---|
TEST_STATUS_UNSPECIFIED |
Internal error when running this test. Please try running the test again. |
COMPLETE |
Inspection has completed without errors. |
INTERNAL_ERROR |
Inspection terminated in an error state. This indicates a problem in Google's infrastructure, not a user error. Please try again later. |
PAGE_UNREACHABLE |
Google cannot access the URL because of a user error such as a robots.txt blockage, a 403 or 500 code etc. Please make sure that the URL provided is accessible by Googlebot and is not password protected. |
MobileFriendlyTestResult
Mobile-friendliness test result.
Enums | |
---|---|
MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED |
Internal error when running this test. Please try running the test again. |
MOBILE_FRIENDLY |
The page is mobile friendly. |
NOT_MOBILE_FRIENDLY |
The page is not mobile friendly. |
MobileFriendlyIssue
Mobile-friendly issue.
JSON representation | |
---|---|
{
"rule": enum( |
Fields | |
---|---|
rule |
Rule violated. |
MobileFriendlyRule
Supported mobile-usability rules.
Enums | |
---|---|
MOBILE_FRIENDLY_RULE_UNSPECIFIED |
Unknown rule. Sorry, we don't have any description for the rule that was broken. |
USES_INCOMPATIBLE_PLUGINS |
Plugins incompatible with mobile devices are being used. Learn more. |
CONFIGURE_VIEWPORT |
Viewport is not specified using the meta viewport tag. Learn more. |
FIXED_WIDTH_VIEWPORT |
Viewport defined to a fixed width. Learn more. |
SIZE_CONTENT_TO_VIEWPORT |
Content not sized to viewport. Learn more. |
USE_LEGIBLE_FONT_SIZES |
Font size is too small for easy reading on a small screen. Learn More. |
TAP_TARGETS_TOO_CLOSE |
Touch elements are too close to each other. Learn more. |
ResourceIssue
Information about a resource with an issue.
JSON representation | |
---|---|
{
"blockedResource": {
object( |
Fields | |
---|---|
blockedResource |
Describes a blocked resource issue. |
BlockedResource
Blocked resource.
JSON representation | |
---|---|
{ "url": string, } |
Fields | |
---|---|
url |
URL of the blocked resource. |
Image
Describe image data.
JSON representation | |
---|---|
{ "data": string, "mimeType": string, } |
Fields | |
---|---|
data |
Image data in format determined by the MIME type. Currently, the format will always be "image/png", but this might change in the future. A base64-encoded string. |
mimeType |
The MIME type of the image data. |