NPI Providers
Full schema reference, querying examples, aggregate views, and data quality notes for the NPI Healthcare Provider dataset.
The npi_providers table contains ~9 million active NPI-registered healthcare providers from the CMS NPPES Registry, with related tables for taxonomy codes, alternate names, and secondary practice locations.
Source
| Property | Value |
|---|---|
| Source | CMS NPPES Data Dissemination |
| Total records | ~9,034,000 |
| Individuals (Type 1) | ~7,140,000 (79%) |
| Organizations (Type 2) | ~1,894,000 (21%) |
| Last CMS update | February 2026 |
| Refresh strategy | Periodic (monthly full file from CMS) |
Sample Record
A complete JSON object returned by the API (with select=*):
{
"npi": 1234567890,
"entity_type": 1,
"replacement_npi": null,
"organization_name": null,
"last_name": "SMITH",
"first_name": "JOHN",
"middle_name": "A",
"name_prefix": "Dr.",
"name_suffix": null,
"credential": "M.D.",
"practice_address_1": "1234 MEDICAL CENTER DR",
"practice_address_2": "STE 200",
"practice_city": "HOUSTON",
"practice_state": "TX",
"practice_zip": "770304552",
"practice_phone": "7135551234",
"enumeration_date": "2005-06-15",
"last_update_date": "2024-08-01",
"deactivation_date": null,
"reactivation_date": null,
"gender": "M",
"sole_proprietor": "N",
"is_subpart": null,
"parent_organization_name": null,
"authorized_official_last_name": null,
"authorized_official_first_name": null,
"authorized_official_middle_name": null,
"authorized_official_title": null,
"authorized_official_phone": null,
"authorized_official_credential": null,
"authorized_official_prefix": null,
"authorized_official_suffix": null,
"primary_taxonomy_code": "207R00000X",
"primary_taxonomy_display": "Internal Medicine"
}The primary_taxonomy_code value 207R00000X maps to "Internal Medicine" — see the NUCC Taxonomy Code Reference for the full hierarchy and common codes.
Schema
Identity & Type
| Column | Type | Description |
|---|---|---|
npi | bigint | 10-digit National Provider Identifier (unique, primary key) |
entity_type | smallint | 1 = Individual, 2 = Organization |
replacement_npi | bigint | Replacement NPI if this one was replaced |
Provider Name
| Column | Type | Description |
|---|---|---|
organization_name | text | Legal business name (Type 2 only) |
last_name | text | Provider last name (Type 1 only) |
first_name | text | Provider first name (Type 1 only) |
middle_name | text | Provider middle name (Type 1 only) |
name_prefix | varchar(5) | Ms., Mr., Dr., Prof., etc. |
name_suffix | varchar(5) | Jr., Sr., II, III, etc. |
credential | varchar(20) | M.D., D.O., FNP, DDS, PhD, etc. |
Practice Location Address
| Column | Type | Description |
|---|---|---|
practice_address_1 | text | Street address line 1 |
practice_address_2 | text | Suite, floor, building, etc. |
practice_city | text | City name (stored in ALL CAPS) |
practice_state | varchar(2) | 2-letter state code (e.g., CA, NY, TX) |
practice_zip | varchar(20) | ZIP code (5 or 9 digits, no hyphen) |
practice_phone | varchar(20) | Phone number (10 digits, no formatting) |
Dates & Status
| Column | Type | Description |
|---|---|---|
enumeration_date | date | Date NPI was first assigned |
last_update_date | date | Date provider last updated their record |
deactivation_date | date | Set only for previously-deactivated-then-reactivated providers |
reactivation_date | date | Set only if reactivated after deactivation |
Individual-Specific Fields (Type 1)
| Column | Type | Description |
|---|---|---|
gender | varchar(1) | M, F, U (undisclosed), X (undisclosed) |
sole_proprietor | varchar(1) | Y, N, X (not answered) |
Organization-Specific Fields (Type 2)
| Column | Type | Description |
|---|---|---|
is_subpart | varchar(1) | Y/N/X — indicates org is a division of a parent |
parent_organization_name | text | Legal name of parent org (when is_subpart=Y) |
authorized_official_last_name | text | Organization's official contact last name |
authorized_official_first_name | text | Official contact first name |
authorized_official_middle_name | text | Official contact middle name |
authorized_official_title | varchar(35) | CEO, Administrator, Owner, CFO, etc. |
authorized_official_phone | varchar(20) | Direct phone for the official |
authorized_official_credential | varchar(20) | M.D., MBA, etc. |
authorized_official_prefix | varchar(5) | Dr., Mr., etc. |
authorized_official_suffix | varchar(5) | Jr., etc. |
Taxonomy / Specialty
| Column | Type | Description |
|---|---|---|
primary_taxonomy_code | varchar(10) | NUCC taxonomy code for primary specialty (e.g., 207R00000X) |
primary_taxonomy_display | text | Human-readable specialty name (e.g., "Internal Medicine") |
Search
| Column | Type | Description |
|---|---|---|
search_vector | tsvector | Full-text search vector (auto-generated from provider/org name) |
Related Tables
The NPI dataset includes four related tables that extend the main provider records.
npi_taxonomy_codes (Lookup)
Static reference table mapping ~873 NUCC taxonomy codes to human-readable names.
| Column | Type | Description |
|---|---|---|
taxonomy_code | varchar(10) | NUCC code (primary key) |
provider_type | text | Top-level grouping (e.g., "Allopathic & Osteopathic Physicians") |
classification | text | Specialty (e.g., "Internal Medicine") |
specialization | text | Sub-specialty (e.g., "Cardiovascular Disease"), nullable |
display_name | text | Human-readable label |
slug | text | URL-safe slug (e.g., internal-medicine) |
npi_taxonomies (Join Table)
Maps providers to their taxonomy codes (a provider can have up to 15).
| Column | Type | Description |
|---|---|---|
npi | bigint | Foreign key to npi_providers |
taxonomy_code | varchar(10) | NUCC taxonomy code |
is_primary | boolean | True if this is the provider's primary specialty |
seq | smallint | Original slot position (1-15) |
Composite primary key: (npi, taxonomy_code). ~11.2M rows.
npi_other_names
DBA names and former legal names for organizations. ~709K rows.
| Column | Type | Description |
|---|---|---|
npi | bigint | Foreign key to npi_providers |
other_name | text | The alternate name |
name_type_code | smallint | 1=Former Name, 2=Professional Name, 3=DBA, 4=Former Legal Business Name, 5=Other |
npi_practice_locations
Secondary practice locations (the primary is in the main table). ~1.15M rows.
| Column | Type | Description |
|---|---|---|
id | bigserial | Auto-increment primary key |
npi | bigint | Foreign key to npi_providers |
address_1 | text | Street address |
address_2 | text | Suite/floor |
city | text | City |
state | varchar(2) | State code |
zip | varchar(20) | ZIP code |
phone | varchar(20) | Phone number |
Fast-Lookup Columns
These columns are optimized for fast filtering and sorting:
npi(unique)practice_statepractice_state+practice_city(composite)practice_state+practice_city+entity_type(composite)entity_typeprimary_taxonomy_codeprimary_taxonomy_code+entity_type(composite)practice_state+primary_taxonomy_code(composite)practice_state+primary_taxonomy_code+entity_type(composite)practice_state+practice_city+primary_taxonomy_code+entity_type(composite)search_vector(full-text search, GIN index)
At least one of these columns must appear as a filter in table queries. practice_city requires practice_state as a co-filter (composite index). Guardrail violations return a 400 response.
Querying Examples
For general query syntax (operators, pagination, sorting), see the Query Syntax Reference.
Look up a provider by NPI number
curl "https://newbizbot.ai/api/data/npi_providers?npi=eq.1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"npi": 1234567890,
"entity_type": 1,
"last_name": "SMITH",
"first_name": "JOHN",
"credential": "M.D.",
"practice_city": "HOUSTON",
"practice_state": "TX",
"primary_taxonomy_code": "207R00000X",
"primary_taxonomy_display": "Internal Medicine"
}
]Search providers by name
# Full-text search for "Mayo Clinic"
curl "https://newbizbot.ai/api/data/npi_providers?search_vector=fts.mayo%20clinic&limit=5" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"npi": 1093707622,
"entity_type": 2,
"organization_name": "MAYO CLINIC",
"practice_city": "ROCHESTER",
"practice_state": "MN",
"primary_taxonomy_display": "Clinic/Center"
}
]Find providers by state
# Individual providers in California
curl "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.CA&entity_type=eq.1&limit=10&order=npi" \
-H "Authorization: Bearer YOUR_API_KEY"Filter by specialty (taxonomy code)
# Cardiologists (taxonomy 207RC0000X) in New York
curl "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.NY&primary_taxonomy_code=eq.207RC0000X&limit=10&select=npi,first_name,last_name,credential,practice_city,primary_taxonomy_display" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"npi": 1003000126,
"first_name": "ROBERT",
"last_name": "JOHNSON",
"credential": "M.D.",
"practice_city": "NEW YORK",
"primary_taxonomy_display": "Cardiovascular Disease"
}
]Find organizations in a city
# Healthcare organizations in Miami, FL
curl "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.FL&practice_city=eq.MIAMI&entity_type=eq.2&limit=10&order=npi&select=npi,organization_name,practice_city,primary_taxonomy_display,authorized_official_first_name,authorized_official_last_name,authorized_official_title" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"npi": 1003002411,
"organization_name": "MIAMI CARDIAC AND VASCULAR INSTITUTE",
"practice_city": "MIAMI",
"primary_taxonomy_display": "Clinic/Center",
"authorized_official_first_name": "MARIA",
"authorized_official_last_name": "GARCIA",
"authorized_official_title": "ADMINISTRATOR"
}
]Find sub-organizations with parent info
# Organizations that are subparts of a parent, in Texas
curl "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.TX&entity_type=eq.2&is_subpart=eq.Y&limit=10&select=npi,organization_name,parent_organization_name,practice_city,primary_taxonomy_display" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"npi": 1003045678,
"organization_name": "BAYLOR SCOTT & WHITE MEDICAL CENTER - TEMPLE",
"parent_organization_name": "BAYLOR SCOTT & WHITE HOLDINGS",
"practice_city": "TEMPLE",
"primary_taxonomy_display": "General Acute Care Hospital"
}
]Combine entity type with specialty
# Individual family medicine providers in Chicago, IL
curl "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.IL&practice_city=eq.CHICAGO&entity_type=eq.1&primary_taxonomy_code=eq.207Q00000X&limit=20&select=npi,first_name,last_name,credential,practice_city,primary_taxonomy_display" \
-H "Authorization: Bearer YOUR_API_KEY"Count providers
# Count all providers in Ohio
curl -I "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.OH&limit=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Prefer: count=exact"
# Read the Content-Range response header for the countNatural Language → API Translation
These examples show how to translate common questions into API calls.
"Find orthopedic surgeons in Los Angeles"
Thinking: "Orthopedic surgeons" = taxonomy code 207X00000X. "Los Angeles" = city filter requires state co-filter (CA).
?practice_state=eq.CA&practice_city=eq.LOS%20ANGELES&primary_taxonomy_code=eq.207X00000X&limit=50&select=npi,first_name,last_name,credential,practice_city,primary_taxonomy_display"Show me all hospitals in Texas"
Thinking: "Hospitals" = organization entity type. Hospital taxonomy codes start with 282N (General Acute Care Hospital). "Texas" = state TX.
?practice_state=eq.TX&entity_type=eq.2&primary_taxonomy_code=eq.282N00000X&limit=100&select=npi,organization_name,practice_city,primary_taxonomy_display,authorized_official_first_name,authorized_official_last_name"How many dentists are there in Florida?"
Thinking: "Dentists" = taxonomy codes starting with 1223 (Dentist). "How many" = count query. "Florida" = state FL.
curl -I "https://newbizbot.ai/api/data/npi_providers?practice_state=eq.FL&primary_taxonomy_code=like.1223*&limit=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Prefer: count=exact""Find nursing facilities that are part of a larger health system"
Thinking: "Nursing facilities" = entity_type 2 with nursing taxonomy. "Part of a larger system" = is_subpart=eq.Y.
?entity_type=eq.2&is_subpart=eq.Y&primary_taxonomy_code=like.314*&limit=50&select=npi,organization_name,parent_organization_name,practice_city,practice_state"Search for Dr. Patel in New Jersey"
Thinking: "Dr. Patel" = full-text search for "patel". "New Jersey" = state NJ. Individual provider.
?practice_state=eq.NJ&entity_type=eq.1&search_vector=fts.patel&limit=50&select=npi,first_name,last_name,credential,practice_city,primary_taxonomy_displayTranslation Cheat Sheet
| Human concept | API filter |
|---|---|
| Geographic region | practice_state=in.(STATE1,STATE2,...) |
| Specific city | practice_state=eq.XX&practice_city=eq.CITY (state required) |
| Individual vs organization | entity_type=eq.1 (individual) or entity_type=eq.2 (organization) |
| Specialty | primary_taxonomy_code=eq.XXXXXXXXXX (exact) or like.XXXX* (prefix) |
| Provider by NPI | npi=eq.XXXXXXXXXX |
| Provider by name | search_vector=fts.name |
| Sub-organizations | entity_type=eq.2&is_subpart=eq.Y |
| Parent org info | Add parent_organization_name to select |
| Decision maker | Add authorized_official_* fields to select (Type 2 only) |
| "How many" | Use Prefer: count=exact header + limit=0 |
| "Biggest / most providers" | Use aggregate views (see below) |
Aggregate Views
The NPI dataset uses pre-computed materialized views for aggregate queries. These views are refreshed periodically and return results in milliseconds.
Stats by State
The npi_stats_by_state_mv view provides aggregate counts grouped by state.
| Column | Type | Description |
|---|---|---|
state | text | 2-letter state code |
total_providers | bigint | Total NPI providers in the state |
type1_count | bigint | Individual providers (Type 1) |
type2_count | bigint | Organizations (Type 2) |
Stats by City
The npi_stats_by_city_mv view provides aggregate counts grouped by state and city.
| Column | Type | Description |
|---|---|---|
state | text | 2-letter state code |
city | text | City name |
total_providers | bigint | Total providers in the city |
type1_count | bigint | Individual providers |
type2_count | bigint | Organizations |
Stats by Specialty
The npi_stats_by_specialty_mv view provides aggregate counts grouped by primary taxonomy code.
| Column | Type | Description |
|---|---|---|
taxonomy_code | varchar(10) | NUCC taxonomy code |
display_name | text | Human-readable specialty name |
slug | text | URL-safe slug |
total_providers | bigint | Total providers with this specialty |
Stats by State + Specialty
The npi_stats_by_state_specialty_mv view provides aggregate counts grouped by state and specialty.
| Column | Type | Description |
|---|---|---|
state | text | 2-letter state code |
taxonomy_code | varchar(10) | NUCC taxonomy code |
display_name | text | Human-readable specialty name |
slug | text | URL-safe slug |
total_providers | bigint | Total providers |
Data Quality Notes
This is CMS NPPES data loaded as-is. Known characteristics:
| Issue | Scope | Details |
|---|---|---|
| Self-reported data | All records | Provider information is self-reported and not independently verified |
| City name casing | All records | City names are stored in ALL CAPS (e.g., HOUSTON) |
| ZIP code format | All records | Stored as raw digits without hyphen (e.g., 770304552 for 77030-4552) |
| Phone number format | All records | Stored as 10 digits without formatting (e.g., 7135551234) |
| Deactivated providers | Excluded | ~333K permanently deactivated records are excluded from the dataset |
| Foreign providers | Excluded | ~5.7K non-US providers are excluded |
| Missing gender | ~0.4% of Type 1 | Some individuals have U or X for gender |
| Multiple specialties | ~19% | Most providers have one taxonomy code; ~1.73M have 2+ (see npi_taxonomies table) |
| Sub-organization data | ~8% of Type 2 | Only ~154K organizations have parent_organization_name populated |
| Stale records | Varies | Some providers haven't updated their NPI record in years; check last_update_date |