Sunday, May 3, 2026
HomeSEOUpdates to Search Console's API  |  Google Search Central Weblog

Updates to Search Console’s API  |  Google Search Central Weblog

[ad_1]

Wednesday, December 9, 2020

Just a few months in the past we introduced an API infrastructure improve
to enhance the efficiency of the Search Console API as demand grows. At the moment we’re glad to announce
some extra updates coming your manner:

  • Addition of recent knowledge and information filter within the Search Console API
  • Area property assist within the Sitemaps API
  • Pointers on learn how to migrate the Discovery doc

In case you make your individual calls to the API, learn on.

Recent knowledge and information filter within the Search Console API

The Efficiency report already helps recent knowledge that’s lower than a day previous. Now you can entry this knowledge via the API by passing the request parameter
dataState with worth set to all. The info you get for this worth can even embrace recent knowledge that isn’t but remaining. In case you want to get solely remaining knowledge,
you possibly can both cross this parameter with worth set to remaining or not cross it in any respect and you’ll get solely remaining knowledge by default.

Just a few months in the past, we added a Information tab on Search filter to the
Efficiency report. This data is now additionally out there within the API, and you may entry it by setting the worth of searchType
parameter within the request to information.

Area property assist within the Sitemaps API

The Sitemaps API now helps area properties, as different Search Console APIs already do. You possibly can question, add, and delete your sitemaps on
area properties, for instance:

GET https://www.googleapis.com/site owners/v3/websites/sc-domain:instance.com/sitemaps

Discovery doc migration

We’ll drop the assist within the Site owners discovery doc. In case you’re querying the Search Console API utilizing an exterior API library, or querying
the Site owners API discovery doc immediately, you’ll
must replace your API calls to incorporate the next adjustments.

API library adjustments

For updates on the API library adjustments, discuss with the Java and
Python quickstart guides,
for an up to date API utilization information.

Java

For all Site owners service-related imports, change the site owners package deal to the searchconsole.v1 package deal,
and the service title, Site owners, to SearchConsole. Examples:

  • Importing the API service:

    import com.google.api.companies.site owners.Site owners;

    import com.google.api.companies.searchconsole.v1.SearchConsole;

  • Importing a response object:

    import com.google.api.companies.site owners.mannequin.WmxSite;

    import com.google.api.companies.searchconsole.v1.mannequin.WmxSite;

Observe that moreover the service object, different API objects are precisely the identical as earlier than, solely the package deal adjustments.

Python

When constructing the Site owners service object, make the next change:

webmasters_service = construct('site owners', 'v3', http=http)

webmasters_service = construct('searchconsole', 'v1', http=http)

Once more, there is no change in how objects behave.

Direct discovery doc question

The invention doc querying adjustments embrace:

When you’ve got any questions, you possibly can ask within the Search
Central group
or on Twitter.



[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments