US healthcare provider search (NPI)
US healthcare organisations and providers in the NPPES NPI Registry by organisation name, provider name, specialty (taxonomy description), city, state, postcode or country, optionally only organisations or only individuals. Each result has NPI, type, name, credential, status, enumeration and update dates, specialties with licence numbers, practice addresses and phones, other names, identifiers and endpoints. Names accept a trailing * wildcard. Give at least one of organization, last_name, first_name, taxonomy, city or postal_code. Pass next_page back as page; null on the last page (the registry serves up to 1,200 matches).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
organization | string | Organisation name (trailing * for a prefix). Example: mayo clinic |
first_name | string | Provider first name. |
last_name | string | Provider last name. |
taxonomy | string | Specialty (taxonomy) description words, e.g. cardiovascular, family medicine, pharmacy. |
city | string | City. |
state | string | 2-letter state code (narrows a search; not enough alone). Example: MN |
postal_code | string | 5 or 9-digit postcode; a trailing * matches a prefix. |
country | string | 2-letter country code. |
type | organization | individual | Only organizations or only individual providers. |
limit | integer | Results per page, 1-200. Example: 50 |
page | integer | Page number, starting at 1. Pass next_page back as page; it is null on the last page. Example: 1 |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/npi/v1/search?organization=mayo+clinic" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/npi/v1/search",
params={"organization": "mayo clinic"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/npi/v1/search");
url.searchParams.set("organization", "mayo clinic");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).