歡迎使用全新 Search Console URL Inspection API
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
2022 年 1 月 31 日,星期一
我們在今天推出全新 Google Search Console URL Inspection API,讓您以程式輔助的方式存取 Search Console 中所管理資源的網址層級資料。
透過 Search Console API,您可以在 Search Console 外利用外部應用程式和產品存取資料。開發人員和搜尋引擎最佳化 (SEO) 工具已運用這些 API 打造自訂解決方案,藉此查看、新增或移除資源與 Sitemap,以及執行有關 Google 搜尋成效資料的進階查詢。
我們提供 URL Inspection API 這項新工具,是為了讓開發人員針對自家網頁進行偵錯及最佳化處理。您可以要求 Search Console 的網址索引版本相關資料,此 API 會傳回網址檢查工具中已建立索引的目前可用資訊。
使用全新 API
如要瞭解如何使用新的 API,請參閱 API 開發人員說明文件。要求參數包括您想檢查的網址,以及 Search Console 中所定義資源的網址。
回應中的分析結果含有 Search Console 提供的資訊,包括索引狀態、AMP、複合式搜尋結果和行動裝置可用性。詳情請查看參數清單和已建立索引的網址相關說明。
發出 API 呼叫後,您會收到包含所有相關結果的回應;如果要求失敗,則會收到錯誤訊息。若回應中缺少特定分析結果,就表示檢查的網址不適用該分析作業。以下是 API 傳送給您的回應示例。
{
"inspectionResult": {
"inspectionResultLink": "https://search.google.com/search-console/inspect?resource_id=https://developers.google.com/search/&id=odaUL5Dqq3q8n0EicQzawg&utm_medium=link",
"indexStatusResult": {
"verdict": "PASS",
"coverageState": "Indexed, not submitted in sitemap",
"robotsTxtState": "ALLOWED",
"indexingState": "INDEXING_ALLOWED",
"lastCrawlTime": "2022-01-31T08:39:51Z",
"pageFetchState": "SUCCESSFUL",
"googleCanonical": "https://developers.google.com/search/help/site-appearance-faq",
"userCanonical": "https://developers.google.com/search/help/site-appearance-faq",
"referringUrls": [
"https://developers.google.com/search/updates",
"https://developers.google.com/search/help/crawling-index-faq"
],
"crawledAs": "MOBILE"
},
"mobileUsabilityResult": {
"verdict": "PASS"
},
"richResultsResult": {
"verdict": "PASS",
"detectedItems": [
{
"richResultType": "Breadcrumbs",
"items": [
{
"name": "Unnamed item"
}
]
},
{
"richResultType": "FAQ",
"items": [
{
"name": "Unnamed item"
}
]
}
]
}
}
}
可能的應用方式
建構新的 API 時,我們諮詢過許多搜尋引擎最佳化 (SEO) 專員和發布者,瞭解他們會如何透過該 API 利用相關資料打造解決方案。以下列舉一些值得注意的應用方式:
- 「搜尋引擎最佳化 (SEO) 工具和代理商」可持續監控多個重要網頁和單一網頁的偵錯選項,例如確認使用者宣告的標準網址與 Google 選取的標準網址是否存在差異,或對一組網頁的結構化資料問題進行偵錯。
- 「CMS 和外掛程式開發人員」可新增網頁/範本層級的深入分析資訊和持續檢查現有網頁的程序,例如監控重要網頁的長期變化,以便診斷問題及決定修正作業的優先順序。
用量限制
如需更詳細的 Search Console API 用量限制說明,請參閱開發人員說明文件。就 URL Inspection API 而言,系統會針對每項 Search Console 網站資源 (查詢同一網站的呼叫) 強制執行下列配額限制:
意見回饋
我們相信新的 API 能夠讓整個生態系統有機會運用 Google 搜尋資料推動創新,也一向期待看到開發人員和搜尋引擎最佳化 (SEO) 專員透過各種 Search Console API 打造的解決方案。
如有任何疑問或意見,歡迎透過 Twitter 與我們聯絡,或是前往 Google 搜尋中心社群提問。
發文者:Search Console 團隊的 Daniel Waisberg 和 Dori Rosenberg
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
[null,null,[],[[["\u003cp\u003eGoogle Search Console launches a new URL Inspection API, offering programmatic access to URL-level data for properties managed within Search Console.\u003c/p\u003e\n"],["\u003cp\u003eThis API enables developers and SEO tools to debug and optimize pages by retrieving indexed information, such as index status, AMP, rich results, and mobile usability.\u003c/p\u003e\n"],["\u003cp\u003ePotential use cases include ongoing monitoring, single-page debugging, and integration into CMS or plugins for enhanced page insights.\u003c/p\u003e\n"],["\u003cp\u003eUsage is limited to 2,000 queries per day and 600 queries per minute per website property.\u003c/p\u003e\n"],["\u003cp\u003eGoogle encourages feedback and welcomes innovative solutions built using the Search Console APIs.\u003c/p\u003e\n"]]],["Google launched the URL Inspection API, enabling programmatic access to URL-level data from Search Console. Developers can use it to request indexed information about a specific URL, including its index status, AMP, rich results, and mobile usability. The API returns analysis results or error messages. The data can be used by SEO tools, agencies, CMS and plugins to monitor pages, debug issues, and compare canonical URLs. The API has a limit of 2,000 daily and 600 per minute queries per website property.\n"],null,["# Welcoming the new Search Console URL Inspection API\n\nMonday, January 31, 2022\n\n\nToday we're launching the new Google Search Console [URL Inspection API](/webmaster-tools/v1/urlInspection.index/inspect),\nwhich gives programmatic access to URL-level data for properties you manage in Search Console.\n\n\nThe [Search Console APIs](/webmaster-tools) are a way to access data outside of Search Console, through external applications and products.\nDevelopers and SEO tools already use the APIs to build custom solutions to view, add, or remove properties and sitemaps, and to run advanced queries on Search performance data.\n\n\nWith the new URL Inspection API, we're providing a new tool for developers to debug and optimize their pages. You can request the data Search Console has about the indexed version of a URL;\nthe API will return the indexed information currently available in the [URL Inspection tool](https://support.google.com/webmasters/answer/9012289).\n\nUsing the new API\n-----------------\n\n\nIn order to learn how to use the new API, check the [API developer documentation](/webmaster-tools/v1/urlInspection.index/inspect).\nThe request parameters include the URL you'd like to inspect and the URL of the property as defined in Search Console.\n\n\nThe response includes analysis results containing information from Search Console, including index status, AMP, rich results, and mobile usability. For more details, read the\n[list of parameters](/webmaster-tools/v1/urlInspection.index/UrlInspectionResult) and the\n[Indexed URL results explanation](https://support.google.com/webmasters/answer/9012289#indexed_inspection).\n\n\nOnce you make the API call, you will get a response with all relevant results, or an error message if the request fails. If a specific analysis result is missing from the response,\nit means the analysis was not available for the URL inspected. Here's an example of the response you'll get from the API. \n\n```scdoc\n {\n \"inspectionResult\": {\n \"inspectionResultLink\": \"https://search.google.com/search-console/inspect?resource_id=https://developers.google.com/search/&id=odaUL5Dqq3q8n0EicQzawg&utm_medium=link\",\n \"indexStatusResult\": {\n \"verdict\": \"PASS\",\n \"coverageState\": \"Indexed, not submitted in sitemap\",\n \"robotsTxtState\": \"ALLOWED\",\n \"indexingState\": \"INDEXING_ALLOWED\",\n \"lastCrawlTime\": \"2022-01-31T08:39:51Z\",\n \"pageFetchState\": \"SUCCESSFUL\",\n \"googleCanonical\": \"https://developers.google.com/search/help/site-appearance-faq\",\n \"userCanonical\": \"https://developers.google.com/search/help/site-appearance-faq\",\n \"referringUrls\": [\n \"https://developers.google.com/search/updates\",\n \"https://developers.google.com/search/help/crawling-index-faq\"\n ],\n \"crawledAs\": \"MOBILE\"\n },\n \"mobileUsabilityResult\": {\n \"verdict\": \"PASS\"\n },\n \"richResultsResult\": {\n \"verdict\": \"PASS\",\n \"detectedItems\": [\n {\n \"richResultType\": \"Breadcrumbs\",\n \"items\": [\n {\n \"name\": \"Unnamed item\"\n }\n ]\n },\n {\n \"richResultType\": \"FAQ\",\n \"items\": [\n {\n \"name\": \"Unnamed item\"\n }\n ]\n }\n ]\n }\n }\n}\n```\n\nPotential use cases\n-------------------\n\n\nWhile building the new API, we consulted various SEOs and publishers with regards to how they would use the API to create solutions with this data. Here are some of the use cases that stand out:\n\n- *SEO tools and agencies* can provide ongoing monitoring for important pages and single page debugging options. For example, checking if there are differences between user-declared and Google-selected canonicals, or debugging structured data issues from a group of pages.\n- *CMS and plugin developers* can add page or template-level insights and ongoing checks for existing pages. For example, monitoring changes over time for key pages to diagnose issues and help prioritize fixes.\n\nUsage limits\n------------\n\n\nYou can find a more detailed description of Search Console [APIs usage limits](/webmaster-tools/limits)\nin the developer documentation. Specifically with regards to the URL Inspection API, the quota is enforced per Search Console\n[website property](https://support.google.com/webmasters/answer/34592) (calls querying the same site):\n\n- 2,000 queries per day\n- 600 queries per minute\n\nFeedback\n--------\n\n\nWe believe the new API will bring new opportunities to the ecosystem to innovate with Google Search data; we're always excited to see the solutions developers and SEOs build around the\nSearch Console APIs.\n\n\nIf you have any questions or feedback, reach out to us [on Twitter](https://twitter.com/googlesearchc), or post a question in the\n[Search Central community](https://support.google.com/webmasters/threads?thread_filter=(category:search_console)).\nPosted by [Daniel Waisberg](https://www.danielwaisberg.com) and Dori Rosenberg, Search Console team"]]