隆重推出新的 Search Console URL Inspection API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
2022 年 1 月 31 日,星期一
今天,我们推出了新的 Google Search Console URL Inspection API,它让您能够以编程方式访问您在 Search Console 中所管理资源的网址级数据。
借助 Search Console API,您可以通过外部应用和产品在 Search Console 以外访问相应数据。开发者和搜索引擎优化 (SEO) 工具已使用这些 API 构建自定义解决方案,以便查看、添加或移除资源和站点地图,以及针对搜索效果数据运行高级查询。
借助新的 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 的次数):
反馈
我们相信,这一新 API 将为生态系统带来利用 Google 搜索数据进行创新的新机会;我们一直期待看到开发者和 SEO 人员运用 Search Console API 构建的解决方案。
如果您有任何疑问或反馈,欢迎在 Twitter 上与我们联系,或在搜索中心社区中发帖提问。
发布者:Daniel Waisberg 和 Dori Rosenberg,Search Console 团队
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。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"]]