A few months ago, Google announced an API infrastructure upgrade to improve the performance of the Search Console API as demand grows. Today, Google is announcing some more updates to the API, including the addition of fresh data and news filter in the Search Console API, and domain property support in the Sitemaps API.
The Performance report already supports fresh data that is less than a day old. This data can now be accessed through the API by passing the request parameter
dataState with value set to
all. The data you get for this value will also include fresh data that is not yet final. If you wish to get only final data, you can either pass this parameter with value set to
final or not pass it at all and you will get only final data by default.
For more information on these changes, check out Google's blog post here.
A few months ago, Google added a News tab on the Search filter to the Performance report. This information is now also available in the API, and you can access it by setting the value of the
searchType parameter in the request to
The Sitemaps API now supports domain properties, as other Search Console APIs already do. You can query, add, and delete your sitemaps on domain properties, for example:
We'll drop the support in the Webmasters discovery document. If you're querying the Search Console API using an external API library, or querying the Webmasters API discovery document directly, you will need to update your API calls to include the following changes.
The Google Search Console API has recently been updated, and developers using the API will need to make a few changes to their code in order to stay compatible.
For Java users, all imports related to the Webmasters service should be changed to use the
searchconsole.v1 package instead of the
webmasters package. Additionally, the service name
Webmasters should be changed to
SearchConsole. You can find more detailed instructions in the Java quickstart guide.
For Python users, when building the Webmasters service object, you will need to use the
build() function from the
googleapiclient.discovery module instead of the
webmasters() function from the
googleapiclient.discovery_cache module. You can find more detailed instructions in the Python quickstart guide.
Google has announced changes to the discovery document querying for the Webmasters API. The URL has changed from https://www.googleapis.com/discovery/v1/apis/webmasters/v3/rest to https://searchconsole.googleapis.com/$discovery/rest, and the
version fields have both changed accordingly.
If you have any questions, you can ask in the Search Central community or on Twitter.