PageSpeed Insights API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 PageSpeed Insights API,您可以使用一个简单的 API 分析网站的性能。它能提供量身定制的网站优化建议,还能让您轻松将 PageSpeed Insights 分析集成到您的开发工具和工作流程中。
服务:pagespeedonline.googleapis.com
要调用此服务,我们建议您使用 Google 提供的客户端库。如果您的应用程序需要使用自己的库来调用此服务,请在发出 API 请求时使用以下信息。
发现文档
发现文档是用于说明和使用 REST API 的机器可读规范。它用于构建客户端库、IDE 插件以及与 Google API 交互的其他工具。一项服务可能会提供多个发现文档。此服务提供了以下发现文档:
服务端点
服务端点是指定 API 服务的网络地址的基本网址。一项服务可能有多个服务端点。此服务具有以下服务端点,下面的所有 URI 都与此服务端点相关:
https://pagespeedonline.googleapis.com
方法 |
runpagespeed |
GET /pagespeedonline/v5/runPagespeed
对指定网址处的网页运行 PageSpeed 分析,并返回 PageSpeed 得分、提升网页加载速度的建议列表以及其他信息。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eAnalyze your website's performance and receive optimization suggestions using the PageSpeed Insights API.\u003c/p\u003e\n"],["\u003cp\u003eIntegrate PageSpeed Insights analysis into your development tools for a streamlined workflow.\u003c/p\u003e\n"],["\u003cp\u003eUtilize Google-provided client libraries or the service endpoint and REST resource for API requests.\u003c/p\u003e\n"],["\u003cp\u003eAccess the discovery document for building tools that interact with the PageSpeed Insights API.\u003c/p\u003e\n"]]],["The PageSpeed Insights API analyzes website performance, providing optimization suggestions. It's accessible via Google-provided client libraries or custom libraries using the provided Discovery Document. The API's service endpoint is `https://pagespeedonline.googleapis.com`. The `runpagespeed` method, accessible via a `GET` request to `/pagespeedonline/v5/runPagespeed`, initiates the analysis on a specified URL, returning scores and improvement recommendations. This method is used by the service `pagespeedonline.googleapis.com`.\n"],null,[]]