Search the public NPPES NPI registry. Call it with a person name, an organization name, a 10-digit NPI, or a search URL on npiregistry.cms.hhs.gov.
GET https://api.piloterr.com/v2/npi/search?query=Anthony%20Fauci
Header: x-api-key.
A text query is split into a first name and a last name. Anthony Fauci searches first name Anthony and last name Fauci. A single word, such as Smith, is the last name.
enumeration_type=NPI-2 treats that text as an organization name. query=Mayo Clinic&enumeration_type=NPI-2 searches for the organization Mayo Clinic. NPI-1 is a person. If you omit enumeration_type, a text query is a person name.
A provider-view URL belongs on /v2/npi/provider. On this endpoint it returns 400.
Send at least one of query, first_name, last_name, organization_name, city, state, postal_code, or taxonomy.
query is optional when another criterion is set. Example: Anthony Fauci. A 10-digit NPI such as 1972813608 is accepted, and so is a search URL such as https://npiregistry.cms.hhs.gov/search?last_name=Fauci&state=DC. With enumeration_type=NPI-2, the text is the organization name.
first_name is optional. Example: Anthony.
last_name is optional. Example: Fauci.
organization_name is optional. Example: Mayo Clinic.
city is optional. Example: Washington.
state is optional. It must be two letters. Example: DC.
postal_code is optional. Example: 20016.
taxonomy is optional. It is matched to the taxonomy description. Example: Internal Medicine.
enumeration_type is optional. Use NPI-1 or NPI-2. Example: NPI-2.
page is optional and defaults to 1. Example: 2.
limit is optional, defaults to 10, and cannot exceed 200. Example: 10.
Each item in results is one provider card.
npi is the 10-digit number. url points at the provider-view page. name is the display name. For a person it can include the prefix, for example Dr. ANTHONY STEPHEN FAUCI. For an organization, name and organization_name are the organization, and first_name, middle_name, last_name, and credential are null.
enumeration_type is NPI-1 or NPI-2. status is the registry status, often A. taxonomy and taxonomy_code come from the primary taxonomy. address, city, state, postal_code, and phone come from the location address. enumeration_date is YYYY-MM-DD.
The registry does not publish a count. pagination.total_results and pagination.total_pages are null on every page.
pagination.page starts at 1. pagination.per_page is the limit you sent, or 10.
pagination.next is a URL only when the page is full, which means the row count equals per_page. A short page has next set to null. That includes the last page when it does not fill the limit.
Anthony Fauci returns one row, so next is null. Mayo Clinic with enumeration_type=NPI-2 and limit=10 fills the page, so next is a URL. The next page of that search returned 4 rows and next was null.
NPI values on one page do not repeat. Page 2 does not repeat page 1. Pass page=2, or open pagination.next and read its page parameter.
- A credentialing team pages every NPI-2 record for Mayo Clinic until
next is null, then opens each npi on the provider endpoint.
- A health-plan directory lists Internal Medicine practices in DC with
taxonomy=Internal Medicine and state=DC.
- A staffing desk checks that a 10-digit NPI such as
1972813608 still resolves before it books a shift.
- 400: no criterion, a state that is not two letters, a bad
enumeration_type, page below 1, limit outside 1 to 200, or a provider-view URL sent to search.
- 404: the registry returned no rows.
- 401: missing API key.