Google has announced that it has launched the Search Console URL inspection API tool to help SEOs and developers debug and optimize their web pages.
Google Search Console URL Inspection API
GSE URL inspection API is a tool that makes it possible for Developers and SEOs to access URL inspection results outside the Google Search Console dashboard. The API can be used in a web application or plugin. The response data that you will get is what is normally available when you inspect a URL manually via Search Console.
Examples of information that you will get from URL Inspection API execution include;
- URL sitemap (whether a URL has been submitted in sitemap or not)
- Is Indexing Allowed?
- Is URL crawling allowed or disallowed in Robots.txt
- Last crawl time and status
- Indexing status
- Google-selected canonical
- User-declared canonical ulr
- referring urls
- Mobile usability (pass or fail)
- Rich Results
- AMP etc.
How to use URL Inspection API
In order for you to inspect a URL via API, you need the page URL and property URL as defined in Google Search Console. Here is an example of how a request body should look like in JSON representation.
To test how the URL inspection API tool works, go to index.inspect and click the try it button on the right sidebar. You must have permission to access the property in Search Console for the execution to be successful.
For live URL Inspection API setup, go to console.cloud.google.com, create a project then search Google Search Console API and enable it. Create credentials and follow all the configuration steps that follow (we will provide a detailed explanation about these steps in another tutorial post).
The limits of URL Inspection API queries are 2,000 per day and 600 per minute.
Visit URL Inspection API for more information on implementation.