google-api-nodejs-client icon indicating copy to clipboard operation
google-api-nodejs-client copied to clipboard

urlNotifications:publish not replying with expected response

Open DevRCRun opened this issue 1 year ago • 2 comments

Environment details

  • OS: Windows 11
  • Node.js version: v18.20.4
  • npm version: [email protected]
  • googleapis version: 144.0.0

Steps to reproduce

  1. Over the last couple of weeks the POST https://indexing.googleapis.com/v3/urlNotifications:publish action has started returning the urlNotificationMetadata without the documented latestUpdate property shown at https://developers.google.com/search/apis/indexing-api/v3/reference/indexing/rest/v3/UrlNotificationMetadata breaking existing code. The status of the response is 200 and the statusText 'OK'. So it doesn't appear that the request / authorisation is being rejected best I can see. A preceding call to inspect the indexing status of the URL is working without issue.

Data submitted

data: { type: 'URL_UPDATED', url: 'https://www.theurlwesubmitted.com/path/page.html' },

Response:

{ urlNotificationMetadata: { url: 'https://www.theurlwesubmitted.com/path/page.html' } }

DevRCRun avatar Sep 20 '24 09:09 DevRCRun

The Indexing API can only be used to crawl pages that contain a JobPosting or BroadcastEvent (nested in a VideoObject).

pretenderchen avatar Oct 09 '24 07:10 pretenderchen

Thanks for the reminder, this method had been working for us for over two years (up to now) despite our submissions being ordinary html pages.

It would be useful if the API call in question had started to return a relevant error message when the behaviour changed.

In terms of our use case, we'd been using it to get new URLs into our Google CSE that represent local government applications that must be publicly published. A sitemap did not seem appropriate in this case due to the large amount of historical applications covering decades.

Is there an endpoint / alternative method we can use to get new application pages indexed so that they are visible in short order to our CSE?

DevRCRun avatar Oct 14 '24 11:10 DevRCRun

Since this is an API question/bug, transferring over to Discussions - also, please feel free to post directly to the API issue tracker itself

sofisl avatar Feb 04 '25 19:02 sofisl