Monday, January 31, 2022
Today we’re launching the new Google Search Console URL Inspection API, which gives programmatic access to URL-level data for properties you manage in Search Console.
The Search Console APIs are a way to access data outside of Search Console, through external applications and products. Developers 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.
With 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; the API will return the indexed information currently available in the URL Inspection tool.
Using the new API
In order to learn how to use the new API, check the API developer documentation. The request parameters include the URL you’d like to inspect and the URL of the property as defined in Search Console.
The response includes analysis results containing information from Search Console, including index status, AMP, rich results, and mobile usability. For more details, read the list of parameters and the Indexed URL results explanation.
Once 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, it means the analysis was not available for the URL inspected. Here's an example of the response you’ll get from the API.
{ "inspectionResult": { "inspectionResultLink": "https://search.google.com/search-console/inspect?resource_id=https://developers.google.com/search/&id=odaUL5Dqq3q8n0EicQzawg&u