Google Search Console API
  1. urlTestingTools
Google Search Console API
  • urlInspection
    • /v1/urlInspection/index:inspect
      POST
  • urlTestingTools
    • /v1/urlTestingTools/mobileFriendlyTest:run
      POST
  • sites
    • /webmasters/v3/sites
      GET
    • /sites
      GET
    • /webmasters/v3/sites/{siteUrl}
      DELETE
    • /sites/{siteUrl}
      DELETE
    • /webmasters/v3/sites/{siteUrl}
      GET
    • /sites/{siteUrl}
      GET
    • /webmasters/v3/sites/{siteUrl}
      PUT
    • /sites/{siteUrl}
      PUT
  • searchanalytics
    • /webmasters/v3/sites/{siteUrl}/searchAnalytics/query
      POST
    • /sites/{siteUrl}/searchAnalytics/query
      POST
  • sitemaps
    • /webmasters/v3/sites/{siteUrl}/sitemaps
      GET
    • /sites/{siteUrl}/sitemaps
      GET
    • /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
      DELETE
    • /sites/{siteUrl}/sitemaps/{feedpath}
      DELETE
    • /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
      GET
    • /sites/{siteUrl}/sitemaps/{feedpath}
      GET
    • /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
      PUT
    • /sites/{siteUrl}/sitemaps/{feedpath}
      PUT
  1. urlTestingTools

/v1/urlTestingTools/mobileFriendlyTest:run

POST
/v1/urlTestingTools/mobileFriendlyTest:run
urlTestingTools
Runs Mobile-Friendly Test for a given URL.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://searchconsole.googleapis.com//v1/urlTestingTools/mobileFriendlyTest:run' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestScreenshot": true,
    "url": "string"
}'
Response Response Example
{
    "mobileFriendliness": "MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED",
    "mobileFriendlyIssues": [
        {
            "rule": "MOBILE_FRIENDLY_RULE_UNSPECIFIED"
        }
    ],
    "resourceIssues": [
        {
            "blockedResource": {
                "url": "string"
            }
        }
    ],
    "screenshot": {
        "data": "string",
        "mimeType": "string"
    },
    "testStatus": {
        "details": "string",
        "status": "TEST_STATUS_UNSPECIFIED"
    }
}

Request

Body Params application/json
Mobile-friendly test request.
requestScreenshot
boolean 
optional
Whether or not screenshot is requested. Default is false.
url
string 
optional
URL for inspection.
Examples

Responses

🟢200Successful response
application/json
Body
Mobile-friendly test response, including mobile-friendly issues and resource issues.
mobileFriendliness
enum<string> 
optional
Test verdict, whether the page is mobile friendly or not.
Allowed values:
MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIEDMOBILE_FRIENDLYNOT_MOBILE_FRIENDLY
mobileFriendlyIssues
array[object (MobileFriendlyIssue) {1}] 
optional
List of mobile-usability issues.
rule
enum<string> 
optional
Rule violated.
Allowed values:
MOBILE_FRIENDLY_RULE_UNSPECIFIEDUSES_INCOMPATIBLE_PLUGINSCONFIGURE_VIEWPORTFIXED_WIDTH_VIEWPORTSIZE_CONTENT_TO_VIEWPORTUSE_LEGIBLE_FONT_SIZESTAP_TARGETS_TOO_CLOSE
resourceIssues
array[object (ResourceIssue) {1}] 
optional
Information about embedded resources issues.
blockedResource
object (BlockedResource) 
optional
Describes a blocked resource issue.
screenshot
object (Image) 
optional
Screenshot of the requested URL.
data
string <byte>
optional
Image data in format determined by the mime type. Currently, the format will always be "image/png", but this might change in the future.
mimeType
string 
optional
The mime-type of the image data.
testStatus
object (TestStatus) 
optional
Final state of the test, can be either complete or an error.
details
string 
optional
Error details if applicable.
status
enum<string> 
optional
Status of the test.
Allowed values:
TEST_STATUS_UNSPECIFIEDCOMPLETEINTERNAL_ERRORPAGE_UNREACHABLE
Previous
/v1/urlInspection/index:inspect
Next
/webmasters/v3/sites
Built with