NPIAPI Documentation


When you create an account, you will be assigned an authentication Token, which you can always find on the Account page. You must use that token as a query parameter for every search submitted to the API.


XML or JSON Formatting

You may send a format query parameter to specify if you want the results to be formatted in XML or JSON. If no format is specified the results will be returned in JSON.


Finding a specific provider by NPI number.

If you already know the NPI number of a provider, you can send a get request to /api/providers/:id, replacing :id with the NPI number of that provider. If found, you will receive an XML or JSON response with the Provider's information. If not found, you will receive an empty reply with a 404 status code.
GET /api/providers/12345678?token=11111111&format=xml

Searching for a provider

To search for a provider, you can send a get request to /api/providers with the query parameters you need to limit the search. Any of the query parameters can do a begins with match, by adding a * to the end of the string. You can combine as many of the query parameters together as you would like.

Search Parameters

By default a limit of 100 results are returned at a time. You can limit that number further by sending the limit option. You can search for another batch of results (pagination) by sending the offset parameter.
GET /api/providers?token=11111111&format=xml&last_name=myname*&state=KY&limit=5&offset=5

Search Results

All search results are returned inside a result object. The result object contains the total number of matches, the count of results in this answer, and the offset that was used in the query. The result object will contain a providers key with an array of providers. If no matches are found, the result object will indicate such and the providers array will be empty.

{"total":10,"count":10,"offset":0, "providers":[{"npi":"12345678", "entity_type":"1"}...]}
<?xml version="1.0" encoding="UTF-8"?>
<total type="integer">10</total>
<count type="integer">10</count>
<offset type="integer">0</offset>
<providers type="array">

Provider Keys

The results contain all the information contained in the NPI Registry for that provider. If the response is a JSON object, the keys will use an underscore (_) to represent spaces. If the response is an XML object, the underscores (_) will be replaced with dashes (-).


JSON: "last_name" : "Lastname"
 XML: <last-name>Lastname</last-name>

Please refer to the NPPES documentation for a description of the possible values. The latest version can be found at

A list of the different keys that may be present in a provider object is below.

Basic Provider Object