CMS NPI Registry API
cms.gov · Government
Search the National Plan and Provider Enumeration System (NPPES) for healthcare provider NPI numbers. Verify provider credentials, look up practice addresses, specialties, and taxonomy codes. Required for healthcare billing and credentialing workflows.
Authentication
Sample Requests
Returns NPI records matching a provider name. Use organization_name for group practices, first_name/last_name for individuals.
Hover any highlighted part to learn what it does
curl -X GET "https://npiregistry.cms.hhs.gov/api/?limit=10&state=CA&version=2.1&last_name=Smith&first_name=John"
import requests
params = {
"limit": "10",
"state": "CA",
"version": "2.1",
"last_name": "Smith",
"first_name": "John"
}
response = requests.get(
"https://npiregistry.cms.hhs.gov/api/",
params=params,
)
print(response.json())const url = new URL('https://npiregistry.cms.hhs.gov/api/');
url.searchParams.set('limit', '10');
url.searchParams.set('state', 'CA');
url.searchParams.set('version', '2.1');
url.searchParams.set('last_name', 'Smith');
url.searchParams.set('first_name', 'John');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://npiregistry.cms.hhs.gov/api/")
q := baseURL.Query()
q.Set("limit", "10")
q.Set("state", "CA")
q.Set("version", "2.1")
q.Set("last_name", "Smith")
q.Set("first_name", "John")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://npiregistry.cms.hhs.gov/api/")
uri.query = URI.encode_www_form({
"limit" => "10",
"state" => "CA",
"version" => "2.1",
"last_name" => "Smith",
"first_name" => "John"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://npiregistry.cms.hhs.gov/api/?" . http_build_query([
"limit" => "10",
"state" => "CA",
"version" => "2.1",
"last_name" => "Smith",
"first_name" => "John"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Returns full provider record for a known NPI number.
Hover any highlighted part to learn what it does
curl -X GET "https://npiregistry.cms.hhs.gov/api/?number=1003000126&version=2.1"
import requests
params = {
"number": "1003000126",
"version": "2.1"
}
response = requests.get(
"https://npiregistry.cms.hhs.gov/api/",
params=params,
)
print(response.json())const url = new URL('https://npiregistry.cms.hhs.gov/api/');
url.searchParams.set('number', '1003000126');
url.searchParams.set('version', '2.1');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://npiregistry.cms.hhs.gov/api/")
q := baseURL.Query()
q.Set("number", "1003000126")
q.Set("version", "2.1")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://npiregistry.cms.hhs.gov/api/")
uri.query = URI.encode_www_form({
"number" => "1003000126",
"version" => "2.1"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://npiregistry.cms.hhs.gov/api/?" . http_build_query([
"number" => "1003000126",
"version" => "2.1"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- No API key needed — completely open
- GET https://npiregistry.cms.hhs.gov/api/?version=2.1&{filters}
- For individuals: use first_name, last_name, state, taxonomy_description
- For organizations: use organization_name, state
- enumeration_type=NPI-1 (individual) or NPI-2 (organization)
- Response includes addresses, taxonomy codes, and credential status
- Max 1,200 results per request — use skip parameter to paginate
What can you build with CMS NPI Registry API?
CMS NPI Registry API is a Government API. Developers commonly use government APIs for:
- surfacing public datasets in citizen-facing apps
- building transparency and civic engagement tools
- accessing legislation, court records, and official data
- powering research and journalism tools
- creating compliance and regulatory monitoring dashboards
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. CMS NPI Registry API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?