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 分數、可加快網頁載入速度的建議清單,以及其他資訊。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-04 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2024-09-04 (世界標準時間)。"],[[["Analyze your website's performance and receive optimization suggestions using the PageSpeed Insights API."],["Integrate PageSpeed Insights analysis into your development tools for a streamlined workflow."],["Utilize Google-provided client libraries or the service endpoint and REST resource for API requests."],["Access the discovery document for building tools that interact with the PageSpeed Insights API."]]],["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"]]