Skip to contents

provider_nppes() allows you to search the NPPES NPI Registry's public API by many of the parameters defined in the API's documentation.

Usage

provider_nppes(
  npi = NULL,
  first = NULL,
  last = NULL,
  org = NULL,
  city = NULL,
  state = NULL,
  country = NULL,
  limit = 10,
  skip = NULL
)

Arguments

npi

10-digit National Provider Identifier (NPI).

first

Provider's first name. Applies to Individual Providers (NPI-1) only. Trailing wildcard entries are permitted requiring at least two characters to be entered (e.g. "jo*" ). This field allows the following special characters: ampersand(&), apostrophe(,), colon(:), comma(,), forward slash(/), hyphen(-), left and right parentheses(()), period(.), pound sign(#), quotation mark("), and semi-colon(;).

last

Provider's last name. Applies to Individual Providers (NPI-1) only. Trailing wildcard entries are permitted requiring at least two characters to be entered (e.g. "jo*" ). This field allows the following special characters: ampersand(&), apostrophe(,), colon(:), comma(,), forward slash(/), hyphen(-), left and right parentheses(()), period(.), pound sign(#), quotation mark("), and semi-colon(;).

org

Healthcare organization's name. Applies to Organizational Providers (NPI-2) only. Trailing wildcard entries are permitted requiring at least two characters to be entered. All types of Organization Names (LBN, DBA, Former LBN, Other Name) associated with an NPI are examined for matching contents, therefore, the results might contain an organization name different from the one entered in the Organization Name criterion. This field allows the following special characters: ampersand, apostrophe, "at" sign, colon, comma, forward slash, hyphen, left and right parentheses, period, pound sign, quotation mark, and semi-colon.

city

City associated with the provider's address. To search for a Military Address, enter either APO or FPO into the City field. This field allows the following special characters: ampersand, apostrophe, colon, comma, forward slash, hyphen, left and right parentheses, period, pound sign, quotation mark, and semi-colon.

state

State abbreviation associated with the provider's address. This field cannot be used as the only input criterion. If this field is used, at least one other field, besides the prov_type and country, must be populated. Valid values for state abbreviations: https://npiregistry.cms.hhs.gov/help-api/state.

country

Country abbreviation associated with the provider's address. This field can be used as the only input criterion, as long as the value selected is not US (United States). Valid values for country abbreviations: https://npiregistry.cms.hhs.gov/help-api/country.

limit

Maximum number of results to return; default is 10, maximum is 1200.

skip

Number of results to skip after searching the previous number; set in limit.

Value

A tibble containing the date-time the search was performed and a list-column of the results.

The NPPES NPI Public Registry

The NPPES NPI Registry Public Search is a free directory of all active National Provider Identifier (NPI) records. Healthcare providers acquire their unique 10-digit NPIs to identify themselves in a standard way throughout their industry. After CMS supplies an NPI, they publish the parts of the NPI record that have public relevance, including the provider’s name, taxonomy and practice address. It enables you to search for providers in the NPPES (National Plan and Provider Enumeration System.) All information produced by the NPI Registry is provided in accordance with the NPPES Data Dissemination Notice. There is no charge to use the NPI Registry.

Data Update Frequency

Weekly

Data Source

Centers for Medicare & Medicaid Services

Examples

if (FALSE) {
# Single NPI
provider_nppes(npi = 1528060837)

# City, state, country
provider_nppes(city = "Atlanta",
               state = "GA",
               country = "US")

# First name, city, state
provider_nppes(first = "John",
               city = "Baltimore",
               state = "MD")

provider_nppes(npi = 1336413418) # NPI-2
provider_nppes(npi = 1710975040) # NPI-1
provider_nppes(npi = 1659781227) # Deactivated

# List of NPIs
npi_list <- c(1003026055,
              1710983663,
              1316405939,
              1720392988,
              1518184605,
              1922056829,
              1083879860)

npi_list |>
purrr::map_dfr(provider_nppes) |>
dplyr::group_split(outcome) |>
purrr::map_dfr(provider_unpack)

# Data frame of NPIs
npi_df <- data.frame(npi = c(1710983663,
                             1003026055,
                             1316405939,
                             1720392988,
                             1518184605,
                             1922056829,
                             1083879860))
npi_df |>
tibble::deframe() |>
purrr::map_dfr(provider_nppes)
}