Soenneker.Google.IndexingService 4.0.2341

Prefix Reserved
There is a newer version of this package available.
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
                    
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.2341" />
                    
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.2341" />
                    
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.2341
                    
#r "nuget: Soenneker.Google.IndexingService, 4.0.2341"
                    
#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.2341
                    
#: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.2341
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Google.IndexingService&version=4.0.2341
                    
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.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
Loading failed

Document indexing client ownership and usage