# /npi/providers/search

`POST /api/npi/providers/search`

Price: 10 credits

Search the US NPI registry (NPPES) for healthcare providers by name, organization, specialty (taxonomy) and location. Filter by provider type (individual / organization), first and last name, organization name, taxonomy description, city, state, postal code and country, with control over which address and name the filters apply to. Returns each matching provider's full record: type, dates, basic block, taxonomies, addresses, identifiers, other names, practice locations and endpoints.

## How to use it

Find US healthcare providers by name, organization, specialty or location. Pass any of enumeration_type (NPI-1/NPI-2), first_name, last_name, organization_name, taxonomy_description, city, state, postal_code, country_code (and address_purpose, name_purpose, use_first_name_alias), plus count. String filters match exactly unless you add a trailing * for prefix matching. Returns full provider records; feed a returned number into npi/providers for a single lookup.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `enumeration_type` (string, nullable) — Restrict to individual providers (NPI-1) or organizations (NPI-2) (one of: "NPI-1", "NPI-2")
- `first_name` (string, nullable) — Provider first name. Add a trailing * for prefix matching, otherwise the value is matched exactly.
- `last_name` (string, nullable) — Provider last name. Add a trailing * for prefix matching, otherwise the value is matched exactly.
- `organization_name` (string, nullable) — Organization name. Add a trailing * for prefix matching, otherwise the value is matched exactly.
- `taxonomy_description` (string, nullable) — Provider specialty / taxonomy description (examples: "dentist", "Internal Medicine")
- `city` (string, nullable) — City of the provider address
- `state` (string, nullable) — US state or territory of the provider address (one of: "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AS", "GU", "MP", "PR", "VI", "AA", "AE", "AP")
- `postal_code` (string, nullable) — Postal (ZIP) code. Add a trailing * for prefix matching, otherwise the value is matched exactly.
- `country_code` (string, nullable) — 2-letter country code of the provider address (examples: "US")
- `address_purpose` (string, nullable) — Which address the city/state/postal_code filters apply to (one of: "LOCATION", "MAILING", "PRIMARY", "SECONDARY")
- `name_purpose` (string, nullable) — Match first_name/last_name against the provider (PROVIDER) or authorized official (AO) (one of: "AO", "PROVIDER")
- `use_first_name_alias` (boolean, nullable) — Also match known aliases and variants of first_name
- `count` (integer, required) — Max number of results to return (min: 1; max: 1200)

## Response

### 200 — Successful Response

- `@type` (string) (default: "NpiProvider")
- `number` (string, required)
- `enumeration_type` (string, nullable)
- `created_at` (integer, nullable)
- `updated_at` (integer, nullable)
- `basic` (object, nullable)
  - `@type` (string) (default: "NpiBasic")
  - `first_name` (string, nullable)
  - `last_name` (string, nullable)
  - `middle_name` (string, nullable)
  - `name_prefix` (string, nullable)
  - `name_suffix` (string, nullable)
  - `credential` (string, nullable)
  - `gender` (string, nullable)
  - `sole_proprietor` (string, nullable)
  - `organization_name` (string, nullable)
  - `organizational_subpart` (string, nullable)
  - `parent_organization_name` (string, nullable)
  - `status` (string, nullable)
  - `enumeration_date` (string, nullable)
  - `certification_date` (string, nullable)
  - `authorized_official` (object, nullable)
    - `@type` (string) (default: "NpiAuthorizedOfficial")
    - `first_name` (string, nullable)
    - `last_name` (string, nullable)
    - `middle_name` (string, nullable)
    - `name_prefix` (string, nullable)
    - `name_suffix` (string, nullable)
    - `credential` (string, nullable)
    - `official_title` (string, nullable)
    - `phone` (string, nullable)
- `addresses` (array) (default: [])
  - `@type` (string) (default: "NpiAddress")
  - `address_purpose` (string, nullable)
  - `address_type` (string, nullable)
  - `address_1` (string, nullable)
  - `address_2` (string, nullable)
  - `city` (string, nullable)
  - `state` (string, nullable)
  - `postal_code` (string, nullable)
  - `country_code` (string, nullable)
  - `country_name` (string, nullable)
  - `phone` (string, nullable)
  - `fax` (string, nullable)
- `practice_locations` (array) (default: [])
  - `@type` (string) (default: "NpiAddress")
  - `address_purpose` (string, nullable)
  - `address_type` (string, nullable)
  - `address_1` (string, nullable)
  - `address_2` (string, nullable)
  - `city` (string, nullable)
  - `state` (string, nullable)
  - `postal_code` (string, nullable)
  - `country_code` (string, nullable)
  - `country_name` (string, nullable)
  - `phone` (string, nullable)
  - `fax` (string, nullable)
- `taxonomies` (array) (default: [])
  - `@type` (string) (default: "NpiTaxonomy")
  - `code` (string, nullable)
  - `description` (string, nullable)
  - `license` (string, nullable)
  - `is_primary` (boolean, nullable)
  - `state` (string, nullable)
  - `taxonomy_group` (string, nullable)
- `identifiers` (array) (default: [])
  - `@type` (string) (default: "NpiIdentifier")
  - `code` (string, nullable)
  - `description` (string, nullable)
  - `issuer` (string, nullable)
  - `identifier` (string, nullable)
  - `state` (string, nullable)
- `other_names` (array) (default: [])
  - `@type` (string) (default: "NpiOtherName")
  - `name_type` (string, nullable)
  - `code` (string, nullable)
  - `organization_name` (string, nullable)
  - `first_name` (string, nullable)
  - `last_name` (string, nullable)
  - `middle_name` (string, nullable)
  - `name_prefix` (string, nullable)
  - `name_suffix` (string, nullable)
  - `credential` (string, nullable)
- `endpoints` (array) (default: [])
  - `@type` (string) (default: "NpiEndpoint")
  - `endpoint_type` (string, nullable)
  - `endpoint_type_description` (string, nullable)
  - `endpoint` (string, nullable)
  - `endpoint_description` (string, nullable)
  - `affiliation` (string, nullable)
  - `affiliation_name` (string, nullable)
  - `use` (string, nullable)
  - `use_description` (string, nullable)
  - `content_type` (string, nullable)
  - `content_type_description` (string, nullable)
  - `content_other_description` (string, nullable)
  - `address_type` (string, nullable)
  - `address_1` (string, nullable)
  - `address_2` (string, nullable)
  - `city` (string, nullable)
  - `state` (string, nullable)
  - `postal_code` (string, nullable)
  - `country_code` (string, nullable)
  - `country_name` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

