Page Summary
-
Analyzes a webpage's performance and provides PageSpeed scores.
-
Offers suggestions to improve page loading speed based on the analysis.
-
Returns information about user experience metrics such as loading time.
-
Allows specifying the analysis strategy for desktop or mobile devices.
-
Uses Lighthouse to perform a comprehensive audit of the given URL.
Runs PageSpeed analysis on the page at the specified URL, and returns PageSpeed scores, a list of suggestions to make that page faster, and other information. Try it now .
Request
HTTP request
GET https://www.googleapis.com/pagespeedonline/v5/runPagespeed
Parameters
url
string
category
string
Acceptable values are:
- "
accessibility" - "
best-practices" - "
performance" - "
seo"
locale
string
strategy
string
Acceptable values are:
- "
desktop": Fetch and analyze the URL for desktop browsers - "
mobile": Fetch and analyze the URL for mobile devices
utm_campaign
string
utm_source
string
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response body with the following structure:
{ "captchaResult" : string , "kind" : "pagespeedonline#result" , "id" : string , "loadingExperience" : { "id" : string , "metrics" : { ( key ) : { "percentile" : integer , "distributions" : [ { "min" : integer , "max" : integer , "proportion" : double } ], "category" : string } } , "overall_category" : string , "initial_url" : string } , "originLoadingExperience" : { "id" : string , "metrics" : { ( key ) : { "percentile" : integer , "distributions" : [ { "min" : integer , "max" : integer , "proportion" : double } ], "category" : string } } , "overall_category" : string , "initial_url" : string } , "lighthouseResult" : { "requestedUrl" : string , "finalUrl" : string , "lighthouseVersion" : string , "userAgent" : string , "fetchTime" : string , "environment" : { "networkUserAgent" : string , "hostUserAgent" : string , "benchmarkIndex" : double } , "runWarnings" : [ ( value ) ], "configSettings" : { "emulatedFormFactor" : string , "locale" : string , "onlyCategories" : ( value ) , "onlyCategories" : ( value ) } , "audits" : { ( key ) : { "id" : string , "title" : string , "description" : string , "score" : ( value ) , "score" : ( value ) , "scoreDisplayMode" : string , "displayValue" : string , "explanation" : string , "errorMessage" : string , "warnings" : ( value ) , "warnings" : ( value ) , "details" : { ( key ) : ( value ) } } } , "categories" : { ( key ) : { "id" : string , "title" : string , "description" : string , "score" : ( value ) , "score" : ( value ) , "manualDescription" : string , "auditRefs" : [ { "id" : string , "weight" : double , "group" : string } ] } } , "categoryGroups" : { ( key ) : { "title" : string , "description" : string } } , "runtimeError" : { "code" : string , "message" : string } , "timing" : { "total" : double } , "i18n" : { "rendererFormattedStrings" : { "varianceDisclaimer" : string , "opportunityResourceColumnLabel" : string , "opportunitySavingsColumnLabel" : string , "errorMissingAuditInfo" : string , "errorLabel" : string , "warningHeader" : string , "auditGroupExpandTooltip" : string , "passedAuditsGroupTitle" : string , "notApplicableAuditsGroupTitle" : string , "manualAuditsGroupTitle" : string , "toplevelWarningsMessage" : string , "scorescaleLabel" : string , "crcLongestDurationLabel" : string , "crcInitialNavigation" : string , "lsPerformanceCategoryDescription" : string , "labDataTitle" : string } } } , "analysisUTCTimestamp" : string , "version" : { "major" : integer , "minor" : integer } }
captchaResult
string
Acceptable values are:
- "
CAPTCHA_BLOCKING" - "
CAPTCHA_MATCHED" - "
CAPTCHA_NEEDED" - "
CAPTCHA_NOT_NEEDED" - "
CAPTCHA_UNMATCHED"
kind
string
id
string
loadingExperience
nested object
loadingExperience.
id
string
loadingExperience.
metrics
object
loadingExperience.metrics.
(key)
object
loadingExperience.metrics.(key).
distributions[]
list
loadingExperience.metrics.(key).distributions[].
min
integer
loadingExperience.metrics.(key).distributions[].
max
integer
loadingExperience.metrics.(key).distributions[].
proportion
double
version
object
version.
major
integer
version.
minor
integer
loadingExperience.metrics.(key).
category
string
Acceptable values are:
- "
AVERAGE" - "
FAST" - "
NONE" - "
SLOW"
loadingExperience.
overall_category
string
Acceptable values are:
- "
AVERAGE" - "
FAST" - "
NONE" - "
SLOW"
loadingExperience.
initial_url
string
loadingExperience.metrics.(key).
percentile
integer
originLoadingExperience
nested object
originLoadingExperience.
id
string
originLoadingExperience.
metrics
object
originLoadingExperience.metrics.
(key)
object
originLoadingExperience.metrics.(key).
percentile
integer
originLoadingExperience.metrics.(key).
distributions[]
list
originLoadingExperience.metrics.(key).distributions[].
min
integer
originLoadingExperience.metrics.(key).distributions[].
max
integer
originLoadingExperience.metrics.(key).distributions[].
proportion
double
originLoadingExperience.metrics.(key).
category
string
Acceptable values are:
- "
AVERAGE" - "
FAST" - "
NONE" - "
SLOW"
originLoadingExperience.
overall_category
string
Acceptable values are:
- "
AVERAGE" - "
FAST" - "
NONE" - "
SLOW"
originLoadingExperience.
initial_url
string
analysisUTCTimestamp
string
lighthouseResult
nested object
lighthouseResult.
requestedUrl
string
lighthouseResult.
finalUrl
string
lighthouseResult.
lighthouseVersion
string
lighthouseResult.
userAgent
string
lighthouseResult.
fetchTime
string
lighthouseResult.
environment
object
lighthouseResult.environment.
networkUserAgent
string
lighthouseResult.environment.
hostUserAgent
string
lighthouseResult.environment.
benchmarkIndex
double
lighthouseResult.
runWarnings[]
list
lighthouseResult.
configSettings
object
lighthouseResult.configSettings.
emulatedFormFactor
string
Acceptable values are:
- "
UNKNOWN_FORM_FACTOR" - "
desktop" - "
mobile" - "
none"
lighthouseResult.configSettings.
locale
string
lighthouseResult.configSettings.
onlyCategories
nested object
lighthouseResult.
audits
object
lighthouseResult.audits.
(key)
nested object
lighthouseResult.audits.(key).
id
string
lighthouseResult.audits.(key).
title
string
lighthouseResult.audits.(key).
description
string
lighthouseResult.audits.(key).
score
nested object
lighthouseResult.audits.(key).
scoreDisplayMode
string
Acceptable values are:
- "
SCORE_DISPLAY_MODE_UNSPECIFIED" - "
binary" - "
error" - "
informative" - "
manual" - "
not_applicable" - "
numeric"
lighthouseResult.audits.(key).
displayValue
string
lighthouseResult.audits.(key).
explanation
string
lighthouseResult.audits.(key).
errorMessage
string
lighthouseResult.audits.(key).
warnings
nested object
lighthouseResult.audits.(key).
details
object
lighthouseResult.audits.(key).details.
(key)
any value
lighthouseResult.
categories
object
lighthouseResult.categories.
(key)
nested object
lighthouseResult.categories.(key).
id
string
lighthouseResult.categories.(key).
title
string
lighthouseResult.categories.(key).
description
string
lighthouseResult.categories.(key).
score
nested object
lighthouseResult.categories.(key).
manualDescription
string
lighthouseResult.categories.(key).
auditRefs[]
list
lighthouseResult.categories.(key).auditRefs[].
id
string
lighthouseResult.categories.(key).auditRefs[].
weight
double
lighthouseResult.categories.(key).auditRefs[].
group
string
lighthouseResult.
categoryGroups
object
lighthouseResult.categoryGroups.
(key)
object
lighthouseResult.categoryGroups.(key).
title
string
lighthouseResult.categoryGroups.(key).
description
string
lighthouseResult.
runtimeError
object
lighthouseResult.runtimeError.
code
string
Acceptable values are:
- "
ERRORED_DOCUMENT_REQUEST" - "
FAILED_DOCUMENT_REQUEST" - "
INSECURE_DOCUMENT_REQUEST" - "
INVALID_SPEEDLINE" - "
NO_DCL" - "
NO_DOCUMENT_REQUEST" - "
NO_ERROR" - "
NO_FCP" - "
NO_NAVSTART" - "
NO_SCREENSHOTS" - "
NO_SPEEDLINE_FRAMES" - "
NO_TRACING_STARTED" - "
PARSING_PROBLEM" - "
PROTOCOL_TIMEOUT" - "
READ_FAILED" - "
SPEEDINDEX_OF_ZERO" - "
TRACING_ALREADY_STARTED" - "
UNKNOWN_ERROR"
lighthouseResult.
timing
object
lighthouseResult.timing.
total
double
lighthouseResult.
i18n
object
lighthouseResult.i18n.
rendererFormattedStrings
object
lighthouseResult.i18n.rendererFormattedStrings.
varianceDisclaimer
string
lighthouseResult.i18n.rendererFormattedStrings.
opportunityResourceColumnLabel
string
lighthouseResult.i18n.rendererFormattedStrings.
opportunitySavingsColumnLabel
string
lighthouseResult.i18n.rendererFormattedStrings.
errorMissingAuditInfo
string
lighthouseResult.i18n.rendererFormattedStrings.
errorLabel
string
lighthouseResult.i18n.rendererFormattedStrings.
warningHeader
string
lighthouseResult.i18n.rendererFormattedStrings.
auditGroupExpandTooltip
string
lighthouseResult.i18n.rendererFormattedStrings.
passedAuditsGroupTitle
string
lighthouseResult.i18n.rendererFormattedStrings.
notApplicableAuditsGroupTitle
string
lighthouseResult.i18n.rendererFormattedStrings.
manualAuditsGroupTitle
string
lighthouseResult.i18n.rendererFormattedStrings.
toplevelWarningsMessage
string
lighthouseResult.i18n.rendererFormattedStrings.
scorescaleLabel
string
lighthouseResult.i18n.rendererFormattedStrings.
crcLongestDurationLabel
string
lighthouseResult.i18n.rendererFormattedStrings.
lsPerformanceCategoryDescription
string
lighthouseResult.i18n.rendererFormattedStrings.
labDataTitle
string
Try it!
Use the APIs Explorer below to call this method on live data and see the response.


