Google PageSpeed Pagespeed Pagespeedapi API

The Pagespeed Pagespeedapi API from Google PageSpeed — 1 operation(s) for pagespeed pagespeedapi.

GitHub OpenAPI

Operations 1

GET /pagespeedonline/v5/runPagespeed Runpagespeed pagespeedapi #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-pagespeed:google-pagespeed-pagespeedapi-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-pagespeed-pagespeedapi-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PageSpeed Insights Pagespeedapi API
  version: v5
  description: Generated from Google's published Discovery document for PageSpeed Insights API (pagespeedonline v5, revision 20261110). 1 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://pagespeedonline.googleapis.com
tags:
- name: Pagespeedapi
paths:
  /pagespeedonline/v5/runPagespeed:
    get:
      operationId: pagespeedonline.pagespeedapi.runpagespeed
      summary: Runpagespeed pagespeedapi
      description: 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.
      parameters:
      - name: captchaToken
        in: query
        required: false
        description: The captcha token passed when filling out a captcha.
        schema:
          type: string
      - name: category
        in: query
        required: false
        description: A Lighthouse category to run; if none are given, only Performance category will be run
        schema:
          type: array
          items:
            enum:
            - CATEGORY_UNSPECIFIED
            - ACCESSIBILITY
            - BEST_PRACTICES
            - PERFORMANCE
            - PWA
            - SEO
            - AGENTIC_BROWSING
            type: string
      - name: locale
        in: query
        required: false
        description: The locale used to localize formatted results
        schema:
          pattern: '[a-zA-Z]+((_|-)[a-zA-Z]+)?'
          type: string
      - name: strategy
        in: query
        required: false
        description: The analysis strategy (desktop or mobile) to use, and desktop is the default
        schema:
          enum:
          - STRATEGY_UNSPECIFIED
          - DESKTOP
          - MOBILE
          type: string
      - name: url
        in: query
        required: true
        description: Required. The URL to fetch and analyze
        schema:
          type: string
          pattern: (?i)(url:|origin:)?http(s)?://.*
      - name: utm_campaign
        in: query
        required: false
        description: Campaign name for analytics.
        schema:
          type: string
      - name: utm_source
        in: query
        required: false
        description: Campaign source for analytics.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagespeedApiPagespeedResponseV5'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - openid
      - apiKey: []
      tags:
      - Pagespeedapi
components:
  schemas:
    PagespeedApiLoadingExperienceV5:
      type: object
      properties:
        id:
          description: The url, pattern or origin which the metrics are on.
          type: string
        metrics:
          description: The map of .
          additionalProperties:
            $ref: '#/components/schemas/UserPageLoadMetricV5'
          type: object
        overall_category:
          type: string
          description: The human readable speed "category" of the id.
        initial_url:
          type: string
          description: The requested URL, which may differ from the resolved "id".
        origin_fallback:
          description: True if the result is an origin fallback from a page, false otherwise.
          type: boolean
      description: The CrUX loading experience object that contains CrUX data breakdowns.
    RuntimeError:
      description: Message containing a runtime error config.
      properties:
        message:
          description: A human readable message explaining the error code.
          type: string
        code:
          description: The enumerated Lighthouse Error code.
          type: string
      type: object
    LighthouseCategoryV5:
      properties:
        description:
          description: A more detailed description of the category and its importance.
          type: string
        title:
          type: string
          description: The human-friendly name of the category.
        auditRefs:
          description: An array of references to all the audit members of this category.
          type: array
          items:
            $ref: '#/components/schemas/AuditRefs'
        manualDescription:
          description: A description for the manual audits in the category.
          type: string
        categoryScoreDisplayMode:
          type: string
          enum:
          - CATEGORY_SCORE_DISPLAY_MODE_UNSPECIFIED
          - GAUGE
          - FRACTION
          description: Optional. How the category score should be displayed (e.g. as a fraction).
        score:
          description: The overall score of the category, the weighted average of all its audits. (The category's score, can be null.)
        id:
          type: string
          description: The string identifier of the category.
      type: object
      description: A Lighthouse category.
    MetricSavings:
      properties:
        TBT:
          description: Optional. Optional numeric value representing the audit's savings for the TBT metric.
          type: number
          format: double
        INP:
          type: number
          description: Optional. Optional numeric value representing the audit's savings for the INP metric.
          format: double
        LCP:
          type: number
          description: Optional. Optional numeric value representing the audit's savings for the LCP metric.
          format: double
        CLS:
          format: double
          description: Optional. Optional numeric value representing the audit's savings for the CLS metric.
          type: number
        FCP:
          format: double
          description: Optional. Optional numeric value representing the audit's savings for the FCP metric.
          type: number
      type: object
      description: The metric savings of the audit.
    ConfigSettings:
      type: object
      description: Message containing the configuration settings for the Lighthouse run.
      properties:
        formFactor:
          type: string
          description: How Lighthouse should interpret this run in regards to scoring performance metrics and skipping mobile-only tests in desktop.
        channel:
          description: How Lighthouse was run, e.g. from the Chrome extension or from the npm module.
          type: string
        emulatedFormFactor:
          type: string
          description: The form factor the emulation should use. This field is deprecated, form_factor should be used instead.
          deprecated: true
        locale:
          type: string
          description: The locale setting.
        onlyCategories:
          description: List of categories of audits the run should conduct.
    StackPack:
      properties:
        title:
          description: The stack pack title.
          type: string
        id:
          description: The stack pack id.
          type: string
        descriptions:
          additionalProperties:
            type: string
          type: object
          description: The stack pack advice strings.
        iconDataURL:
          description: The stack pack icon data uri.
          type: string
      description: Message containing Stack Pack information.
      type: object
    LighthouseResultV5:
      description: The Lighthouse result object.
      properties:
        fetchTime:
          type: string
          description: The time that this run was fetched.
        entities:
          items:
            $ref: '#/components/schemas/LhrEntity'
          description: Entity classification data.
          type: array
        runtimeError:
          $ref: '#/components/schemas/RuntimeError'
          description: A top-level error message that, if present, indicates a serious enough problem that this Lighthouse result may need to be discarded.
        lighthouseVersion:
          type: string
          description: The lighthouse version that was used to generate this LHR.
        runWarnings:
          description: List of all run warnings in the LHR. Will always output to at least `[]`.
          type: array
          items: {}
        fullPageScreenshot:
          description: Screenshot data of the full page, along with node rects relevant to the audit results.
        mainDocumentUrl:
          description: URL of the main document request of the final navigation.
          type: string
        timing:
          $ref: '#/components/schemas/Timing'
          description: Timing information for this LHR.
        categories:
          $ref: '#/components/schemas/Categories'
          description: Map of categories in the LHR.
        environment:
          $ref: '#/components/schemas/Environment'
          description: Environment settings that were used when making this LHR.
        categoryGroups:
          type: object
          description: Map of category groups in the LHR.
          additionalProperties:
            $ref: '#/components/schemas/CategoryGroupV5'
        stackPacks:
          items:
            $ref: '#/components/schemas/StackPack'
          description: The Stack Pack advice strings.
          type: array
        requestedUrl:
          type: string
          description: The original requested url.
        audits:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/LighthouseAuditResultV5'
          description: Map of audits in the LHR.
        finalDisplayedUrl:
          type: string
          description: URL displayed on the page after Lighthouse finishes.
        userAgent:
          type: string
          description: The user agent that was used to run this LHR.
        configSettings:
          $ref: '#/components/schemas/ConfigSettings'
          description: The configuration settings for this LHR.
        finalUrl:
          description: The final resolved url that was audited.
          type: string
        i18n:
          $ref: '#/components/schemas/I18n'
          description: The internationalization strings that are required to render the LHR.
      type: object
    PagespeedApiPagespeedResponseV5:
      type: object
      properties:
        analysisUTCTimestamp:
          type: string
          description: The UTC timestamp of this analysis.
        id:
          type: string
          description: Canonicalized and final URL for the document, after following page redirects (if any).
        kind:
          description: Kind of result.
          type: string
        version:
          $ref: '#/components/schemas/PagespeedVersion'
          description: The version of PageSpeed used to generate these results.
        originLoadingExperience:
          $ref: '#/components/schemas/PagespeedApiLoadingExperienceV5'
          description: Metrics of the aggregated page loading experience of the origin
        captchaResult:
          description: The captcha verify result
          type: string
        lighthouseResult:
          $ref: '#/components/schemas/LighthouseResultV5'
          description: Lighthouse response for the audit url as an object.
        loadingExperience:
          $ref: '#/components/schemas/PagespeedApiLoadingExperienceV5'
          description: Metrics of end users' page loading experience.
      description: The Pagespeed API response object.
    PagespeedVersion:
      properties:
        major:
          description: The major version number of PageSpeed used to generate these results.
          type: string
        minor:
          type: string
          description: The minor version number of PageSpeed used to generate these results.
      type: object
      description: The Pagespeed Version object.
    Timing:
      type: object
      description: Message containing the performance timing data for the Lighthouse run.
      properties:
        total:
          type: number
          format: double
          description: The total duration of Lighthouse's run.
    LhrEntity:
      properties:
        homepage:
          type: string
          description: Optional. An optional homepage URL of the entity.
        category:
          type: string
          description: Optional. An optional category name for the entity.
        name:
          description: Required. Name of the entity.
          type: string
        isUnrecognized:
          description: Optional. An optional flag indicating if the entity is not recognized.
          type: boolean
        isFirstParty:
          type: boolean
          description: Optional. An optional flag indicating if the entity is the first party.
        origins:
          items:
            type: string
          type: array
          description: Required. A list of URL origin strings that belong to this entity.
      description: Message containing an Entity.
      type: object
    UserPageLoadMetricV5:
      description: A CrUX metric object for a single metric and form factor.
      properties:
        percentile:
          format: int32
          type: integer
          description: We use this field to store certain percentile value for this metric. For v4, this field contains pc50. For v5, this field contains pc90.
        metricId:
          type: string
          description: Identifies the type of the metric.
        formFactor:
          type: string
          description: Identifies the form factor of the metric being collected.
        distributions:
          type: array
          items:
            $ref: '#/components/schemas/Bucket'
          description: Metric distributions. Proportions should sum up to 1.
        category:
          description: The category of the specific time metric.
          type: string
        median:
          type: integer
          description: The median number of the metric, in millisecond.
          format: int32
      type: object
    Bucket:
      type: object
      properties:
        min:
          description: Lower bound for a bucket's range.
          format: int32
          type: integer
        proportion:
          type: number
          format: double
          description: The proportion of data in this bucket.
        max:
          type: integer
          description: Upper bound for a bucket's range.
          format: int32
      description: A proportion of data in the total distribution, bucketed by a min/max percentage. Each bucket's range is bounded by min <= x < max, In millisecond.
    CategoryGroupV5:
      type: object
      properties:
        description:
          type: string
          description: The description of what the category is grouping
        title:
          type: string
          description: The human readable title of the group
      description: Message containing a category
    Environment:
      type: object
      properties:
        networkUserAgent:
          description: The user agent string that was sent over the network.
          type: string
        benchmarkIndex:
          description: The benchmark index number that indicates rough device class.
          format: double
          type: number
        credits:
          additionalProperties:
            type: string
          type: object
          description: 'The version of libraries with which these results were generated. Ex: axe-core.'
        hostUserAgent:
          type: string
          description: The user agent string of the version of Chrome used.
      description: Message containing environment configuration for a Lighthouse run.
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    LighthouseAuditResultV5:
      properties:
        scoreDisplayMode:
          type: string
          description: The enumerated score display mode.
        id:
          description: The audit's id.
          type: string
        score:
          description: The score of the audit, can be null.
        metricSavings:
          $ref: '#/components/schemas/MetricSavings'
          description: The metric savings of the audit.
        numericValue:
          type: number
          description: A numeric value that has a meaning specific to the audit, e.g. the number of nodes in the DOM or the timestamp of a specific load event. More information can be found in the audit details, if present.
          format: double
        warnings:
          description: Possible warnings that occurred in the audit, can be null.
        description:
          type: string
          description: The description of the audit.
        details:
          additionalProperties:
            description: Properties of the object.
          type: object
          description: Freeform details section of the audit.
        errorMessage:
          description: An error message from a thrown error inside the audit.
          type: string
        numericUnit:
          description: The unit of the numeric_value field. Used to format the numeric value for display.
          type: string
        displayValue:
          type: string
          description: The value that should be displayed on the UI for this audit.
        title:
          type: string
          description: The human readable title.
        explanation:
          description: An explanation of the errors in the audit.
          type: string
      type: object
      description: An audit's result object in a Lighthouse result.
    RendererFormattedStrings:
      type: object
      properties:
        passedAuditsGroupTitle:
          description: The heading that is shown above a list of audits that are passing.
          type: string
        dropdownSaveHTML:
          type: string
          description: Option in a dropdown menu that saves the Lighthouse report HTML locally to the system as a '.html' file.
        toplevelWarningsMessage:
          type: string
          description: The label shown preceding important warnings that may have invalidated an entire report.
        warningHeader:
          type: string
          description: The label shown above a bulleted list of warnings.
        runtimeSettingsDevice:
          type: string
          description: 'Label for a row in a table that describes the kind of device that was emulated for the Lighthouse run. Example values for row elements: ''No Emulation'', ''Emulated Desktop'', etc.'
        warningAuditsGroupTitle:
          description: The heading that is shown above a list of audits that have warnings
          type: string
        runtimeSettingsCPUThrottling:
          type: string
          description: Label for a row in a table that describes the CPU throttling conditions that were used during a Lighthouse run, if any.
        dropdownSaveJSON:
          description: Option in a dropdown menu that saves the Lighthouse JSON object to the local system as a '.json' file.
          type: string
        varianceDisclaimer:
          description: The disclaimer shown below a performance metric value.
          type: string
        dropdownPrintSummary:
          description: Option in a dropdown menu that opens a small, summary report in a print dialog.
          type: string
        runtimeSettingsAxeVersion:
          description: Label for a row in a table that shows the version of the Axe library used
          type: string
        viewTreemapLabel:
          description: Label for a button that opens the Treemap App
          type: string
        runtimeNoEmulation:
          description: Descriptive explanation for emulation setting when no device emulation is set.
          type: string
        thirdPartyResourcesLabel:
          description: This label is for a filter checkbox above a table of items
          type: string
        footerIssue:
          description: Label for button to create an issue against the Lighthouse GitHub project.
          type: string
        throttlingProvided:
          type: string
          description: Descriptive explanation for environment throttling that was provided by the runtime environment instead of provided by Lighthouse throttling.
        errorLabel:
          type: string
          description: The label shown next to an audit or metric that has had an error.
        runtimeSettingsUA:
          type: string
          description: Label for a row in a table that shows the User Agent that was detected on the Host machine that ran Lighthouse.
        manualAuditsGroupTitle:
          type: string
          description: The heading shown above a list of audits that were not computerd in the run.
        runtimeSettingsChannel:
          type: string
          description: Label for a row in a table that shows in what tool Lighthouse is being run (e.g. The lighthouse CLI, Chrome DevTools, Lightrider, WebPageTest, etc).
        runtimeUnknown:
          description: Descriptive explanation for a runtime setting that is set to an unknown value.
          type: string
        runtimeSettingsTitle:
          description: Title of the Runtime settings table in a Lighthouse report. Runtime settings are the environment configurations that a specific report used at auditing time.
          type: string
        runtimeSettingsNetworkThrottling:
          description: Label for a row in a table that describes the network throttling conditions that were used during a Lighthouse run, if any.
          type: string
        runtimeSettingsFetchTime:
          type: string
          description: Label for a row in a table that shows the time at which a Lighthouse run was conducted; formatted as a timestamp, e.g. Jan 1, 1970 12:00 AM UTC.
        dropdownPrintExpanded:
          type: string
          description: Option in a dropdown menu that opens a full Lighthouse report in a print dialog.
        runtimeSettingsBenchmark:
          type: string
          description: 'Label for a row in a table that shows the estimated CPU power of the machine running Lighthouse. Example row values: 532, 1492, 783.'
        dropdownCopyJSON:
          type: string
          description: Option in a dropdown menu that copies the Lighthouse JSON object to the system clipboard.
        scorescaleLabel:
          description: The label that explains the score gauges scale (0-49, 50-89, 90-100).
          type: string
        dropdownDarkTheme:
          description: Option in a dropdown menu that toggles the themeing of the report between Light(default) and Dark themes.
          type: string
        crcLongestDurationLabel:
          type: string
          description: The label for values shown in the summary of critical request chains.
        auditGroupExpandTooltip:
          type: string
          description: The tooltip text on an expandable chevron icon.
        dropdownViewer:
          description: Option in a dropdown menu that opens the current report in the Lighthouse Viewer Application.
          type: string
        opportunityResourceColumnLabel:
          description: The heading for the estimated page load savings opportunity of an audit.
          type: string
        dropdownSaveGist:
          description: Option in a dropdown menu that saves the current report as a new GitHub Gist.
          type: string
        runtimeSettingsUrl:
          description: Label for a row in a table that shows the URL that was audited during a Lighthouse run.
          type: string
        opportunitySavingsColumnLabel:
          description: The heading for the estimated page load savings of opportunity audits.
          type: string
        runtimeMobileEmulation:
          description: Descriptive explanation for emulation setting when emulating a Nexus 5X mobile device.
          type: string
        calculatorLink:
          type: string
          description: Text link pointing to the Lighthouse scoring calculator. This link immediately follows a sentence stating the performance score is calculated from the perf metrics.
        runtimeSettingsUANetwork:
          type: string
          description: Label for a row in a table that shows the User Agent that was used to send out all network requests during the Lighthouse run.
        snippetExpandButtonLabel:
          description: The label for the button to show all lines of a snippet
          type: string
        crcInitialNavigation:
          description: The label for the initial request in a critical request chain.
          type: string
        errorMissingAuditInfo:
          description: The error string shown next to an erroring audit.
          type: string
        runtimeDesktopEmulation:
          description: Descriptive explanation for emulation setting when emulating a generic desktop form factor, as opposed to a mobile-device like form factor.
          type: string
        snippetCollapseButtonLabel:
          type: string
          description: The label for the button to show only a few lines of a snippet
        showRelevantAudits:
          type: string
          description: Label preceding a radio control for filtering the list of audits. The radio choices are various performance metrics (FCP, LCP, TBT), and if chosen, the audits in the report are hidden if they are not relevant to the selected metric.
        lsPerformanceCategoryDescription:
          description: The disclaimer shown under performance explaining that the network can vary.
          type: string
        notApplicableAuditsGroupTitle:
          type: string
          description: The heading shown above a list of audits that do not apply to a page.
        labDataTitle:
          description: The title of the lab data performance category.
          type: string
      description: Message holding the formatted strings used in the renderer.
    AuditRefs:
      description: A light reference to an audit by id, used to group and weight audits in a given category.
      type: object
      properties:
        id:
          description: The audit ref id.
          type: string
        relevantAudits:
          type: array
          items:
            type: string
          description: Any audit IDs closely relevant to this one.
        weight:
          type: number
          description: The weight this audit's score has on the overall category score.
          format: double
        acronym:
          description: The conventional acronym for the audit/metric.
          type: string
        group:
          type: string
          description: The category group that the audit belongs to (optional).
    Categories:
      type: object
      properties:
        performance:
          $ref: '#/components/schemas/LighthouseCategoryV5'
          description: The performance category, containing all performance related audits.
        accessibility:
          $ref: '#/components/schemas/LighthouseCategoryV5'
          description: The accessibility category, containing all accessibility related audits.
        pwa:
          $ref: '#/components/schemas/LighthouseCategoryV5'
          description: The Progressive-Web-App (PWA) category, containing all pwa related audits. This is deprecated in Lighthouse's 12.0 release.
        best-practices:
          $ref: '#/components/schemas/LighthouseCategoryV5'
          description: The best practices category, containing all best practices related audits.
        seo:
          $ref: '#/components/schemas/LighthouseCategoryV5'
          description: The Search-Engine-Optimization (SEO) category, containing all seo related audits.
        agentic-browsing:
          $ref: '#/components/schemas/LighthouseCategoryV5'
          description: The agentic browsing category, containing all agentic browsing related audits.
      description: The categories in a Lighthouse run.
    I18n:
      type: object
      properties:
        rendererFormattedStrings:
          $ref: '#/components/schemas/RendererFormattedStrings'
          description: Internationalized strings that are formatted to the locale in configSettings.
      description: Message containing the i18n data for the LHR - Version 1.
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            openid: Associate you with your personal info on Google
externalDocs:
  url: https://developers.google.com/speed/docs/insights/v5/about
x-provenance:
  method: harvested
  publisher: Google
  source: https://pagespeedonline.googleapis.com/$discovery/rest?version=v5
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261110)