Page Summary
-
The Indexing API's UrlService allows web developers to inform Google about changes to their website's URLs, such as updates or deletions.
-
Developers can use
PublishUrlNotificationto notify Google about URL updates or removals andGetUrlNotificationMetadatato retrieve the latest notification status for a specific URL. -
UrlNotificationdetails the type of change (update or deletion) and the affected URL, whileUrlNotificationMetadataprovides a summary of the latest successful notifications for a given URL. -
The API utilizes specific notification types (
URL_UPDATED,URL_DELETED) to categorize URL changes and requires thehttps://www.googleapis.com/auth/indexingOAuth scope for authorization.
Index
UrlService(interface)GetUrlNotificationMetadataRequest(message)PublishUrlNotificationRequest(message)PublishUrlNotificationResponse(message)UrlNotification(message)UrlNotificationMetadata(message)UrlNotificationType(enum)
UrlService
Allows web developers to notify Google about state changes in the URLs they own.
| GetUrlNotificationMetadata | |
|---|---|
|
Gets metadata about a Web Document. This method can only be used to query URLs that were previously seen in successful Indexing API notifications. Includes the latest
|
|
| PublishUrlNotification | |
|---|---|
|
Notifies that a URL has been updated or deleted.
|
|
GetUrlNotificationMetadataRequest
Input for GetUrlNotificationMetadata call.
| Fields | |
|---|---|
url |
URL that is being queried. |
PublishUrlNotificationRequest
Input for PublishUrlNotification
| Fields | |
|---|---|
url_notification |
Description of the URL event that is being notified. |
PublishUrlNotificationResponse
Output for PublishUrlNotification
| Fields | |
|---|---|
url_notification_metadata |
Description of the notification events received for this URL. |
UrlNotification
UrlNotification is the resource used in all Indexing API calls. It describes one event in the life cycle of a Web Document.
| Fields | |
|---|---|
url |
The object of this notification. The URL must be owned by the publisher of this notification and, in case of |
type |
The URL life cycle event that Google is being notified about. |
notify_time |
Creation timestamp for this notification. Users should not specify it, the field is ignored at the request time. |
UrlNotificationMetadata
Summary of the most recent Indexing API notifications successfully received, for a given URL.
| Fields | |
|---|---|
url |
URL to which this metadata refers. |
latest_update |
Latest notification received with type |
latest_remove |
Latest notification received with type |
UrlNotificationType
Specifies the different events that can happen to a given URL.
| Enums | |
|---|---|
URL_NOTIFICATION_TYPE_UNSPECIFIED |
Unspecified. |
URL_UPDATED |
The given URL (Web document) has been updated. |
URL_DELETED |
The given URL (Web document) has been deleted. |