Soenneker.Google.IndexingService
4.0.2341
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Google.IndexingService --version 4.0.2341
NuGet\Install-Package Soenneker.Google.IndexingService -Version 4.0.2341
<PackageReference Include="Soenneker.Google.IndexingService" Version="4.0.2341" />
<PackageVersion Include="Soenneker.Google.IndexingService" Version="4.0.2341" />
<PackageReference Include="Soenneker.Google.IndexingService" />
paket add Soenneker.Google.IndexingService --version 4.0.2341
#r "nuget: Soenneker.Google.IndexingService, 4.0.2341"
#:package Soenneker.Google.IndexingService@4.0.2341
#addin nuget:?package=Soenneker.Google.IndexingService&version=4.0.2341
#tool nuget:?package=Soenneker.Google.IndexingService&version=4.0.2341
Soenneker.Google.IndexingService
A lazy, thread-safe provider for Google Indexing API clients keyed by service-account credential file.
Install
dotnet add package Soenneker.Google.IndexingService
Credential file
This package uses Soenneker.Google.Credentials. Place a service-account JSON file beneath LocalResources in the application output and pass its resource-relative filename to Get().
<Content Include="LocalResources\google-indexing.json"
CopyToOutputDirectory="PreserveNewest" />
Register
using Soenneker.Google.IndexingService.Registrars;
using Microsoft.Extensions.DependencyInjection;
services.AddGoogleIndexingServiceUtilAsSingleton();
Singleton registration is recommended for this client provider. Scoped application utilities can use it and be disposed without destroying the cached Google client. AddGoogleIndexingServiceUtilAsScoped() is available only when each scope deliberately needs separate credential and client caches.
Publish a notification
using Google.Apis.Indexing.v3.Data;
Google.Apis.Indexing.v3.IndexingService service =
await indexingServices.Get("google-indexing.json", cancellationToken);
var notification = new UrlNotification
{
Url = "https://example.com/jobs/software-engineer",
Type = "URL_UPDATED"
};
await service.UrlNotifications
.Publish(notification)
.ExecuteAsync(cancellationToken);
The service account must be authorized for the target site. This package creates the authenticated client; it does not decide whether a URL or notification type is eligible for Google's Indexing API.
API at a glance
| API | What it does | Result / important behavior |
|---|---|---|
Get(fileName) |
Gets or creates the authenticated client for a credential file. | Reuses the same client for that filename within the provider lifetime. |
Remove(fileName) |
Asynchronously removes and disposes a cached client. | Returns whether an entry existed. |
RemoveSync(fileName) |
Synchronously removes and disposes a cached client. | Use only when asynchronous removal is unavailable. |
Practical notes
- Removing a client does not remove the underlying cached credential from
IGoogleCredentialsUtil. - Do not use a client concurrently with removing that same filename; removal disposes the cached service.
- Let the DI container dispose registered providers. Dispose manually constructed providers yourself.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Google.Apis.Indexing.v3 (>= 1.74.0.3191)
- Soenneker.Google.Credentials (>= 4.0.2569)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Google.IndexingService:
| Package | Downloads |
|---|---|
|
Soenneker.Google.SearchIndex
Publishes Google Indexing API URL notifications and retrieves their notification metadata. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2342 | 130 | 8/30/2026 |
| 4.0.2341 | 72 | 8/30/2026 |
| 4.0.2340 | 88 | 8/30/2026 |
| 4.0.2339 | 89 | 8/30/2026 |
| 4.0.2338 | 83 | 8/30/2026 |
| 4.0.2337 | 73 | 8/29/2026 |
| 4.0.2336 | 92 | 8/29/2026 |
| 4.0.2335 | 84 | 8/29/2026 |
| 4.0.2334 | 80 | 8/29/2026 |
| 4.0.2333 | 141 | 8/26/2026 |
| 4.0.2332 | 97 | 8/26/2026 |
| 4.0.2331 | 95 | 8/26/2026 |
| 4.0.2330 | 121 | 8/22/2026 |
| 4.0.2329 | 110 | 8/21/2026 |
| 4.0.2328 | 105 | 8/21/2026 |
| 4.0.2327 | 127 | 8/20/2026 |
| 4.0.2326 | 133 | 8/19/2026 |
| 4.0.2325 | 104 | 8/18/2026 |
| 4.0.2324 | 126 | 8/18/2026 |
| 4.0.2323 | 125 | 8/13/2026 |
Document indexing client ownership and usage