This is a .NET wrapper for interacting with the CMS National Plan and Provider Enumeration System NPPES National Provider Identifier (NPI) lookup system
For more information visit the NPI registry
Requests are as simple as providing an NPI number to lookup:
var results = await NPPESApiClient.SearchAsync("8942315671");OR
var results = await NPPESApiClient.SearchAsync(new NPPESRequest
{
Number = "5631047582"
});For more complicated queries, use the other provided fields on the NPPESRequest object:
var results = await NPPESApiClient.SearchAsync(new NPPESRequest
{
FirstName = "John",
LastName = "Doe"
});Using the builder:
var builder = new NPPESRequestBuilder();
var request = builder
.Version(NPPESVersion.v1_0)
.Number("1234567890")
.Build();
var results = await NPPESApiClient.SearchAsync(request);On .NET 10+, register the client with IServiceCollection:
using Forcura.NPPES.DependencyInjection;
// simple approach
IServiceCollection serviceCollection = ...;
serviceCollection.AddNPPESApi();
// for any customizations of the IHttpClientBuilder
IServiceCollection serviceCollection = ...;
serviceCollection.AddHttpClient<NPPESApiClient>();netstandard and .NET Framework consumers use NPPESApiClient directly (construct with new NPPESApiClient() or inject your own HttpClient). The AddNPPESApi extension is not included in those targets.
It is important to note that the NPPES API by default, accesses the latest public api version, as currently it is backward compatible, this is something to be aware of.
Copyright 2026 Mosai
Licensed under the Apache 2.0 license