Soenneker.Google.IndexingService 4.0.2351

Prefix Reserved
dotnet add package Soenneker.Google.IndexingService --version 4.0.2351
                    
NuGet\Install-Package Soenneker.Google.IndexingService -Version 4.0.2351
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Google.IndexingService" Version="4.0.2351" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Google.IndexingService" Version="4.0.2351" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Google.IndexingService" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Google.IndexingService --version 4.0.2351
                    
#r "nuget: Soenneker.Google.IndexingService, 4.0.2351"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Google.IndexingService@4.0.2351
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Google.IndexingService&version=4.0.2351
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Google.IndexingService&version=4.0.2351
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2351 0 9/5/2026
4.0.2350 0 9/4/2026
4.0.2349 36 9/4/2026
4.0.2348 41 9/4/2026
4.0.2347 49 9/4/2026
4.0.2346 44 9/4/2026
4.0.2345 46 9/4/2026
4.0.2344 41 9/4/2026
4.0.2343 35 9/4/2026
4.0.2342 150 8/30/2026
4.0.2341 73 8/30/2026
4.0.2340 99 8/30/2026
4.0.2339 95 8/30/2026
4.0.2338 88 8/30/2026
4.0.2337 75 8/29/2026
4.0.2336 96 8/29/2026
4.0.2335 86 8/29/2026
4.0.2334 81 8/29/2026
4.0.2333 152 8/26/2026
4.0.2332 99 8/26/2026
Loading failed

Update dependency Soenneker.Google.Credentials to 4.0.2584 (#2896)