Skip to main content
GET
/
npis
cURL
curl --request GET \
  --url https://app.opencharges.com/api/v1/npis \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://app.opencharges.com/api/v1/npis"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://app.opencharges.com/api/v1/npis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.opencharges.com/api/v1/npis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.opencharges.com/api/v1/npis"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.opencharges.com/api/v1/npis")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.opencharges.com/api/v1/npis")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "npi": "<string>",
    "display_name": "<string>",
    "org_name": "<string>",
    "pro_last_name": "<string>",
    "pro_first_name": "<string>",
    "pro_middle_name": "<string>",
    "provider_enumeration_date": "<string>",
    "last_update_date": "<string>",
    "certification_date": "<string>",
    "npi_deactivation_date": "<string>",
    "npi_reactivation_date": "<string>"
  }
]
{
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer<int32>

The page number of the results to return.

filter[npi]
string

The specific NPI you are searching for. Returns exact matches only.

filter[entity_type_code]
string

Filters by the NPIs entity_type_code.

filter[name]
string

Filters by the NPIs org_name, pro_first_name and pro_last_name.

filter[has_records]
boolean

Returns NPIs that have negotiated rates associated with them. The false option returns all NPIs.

Response

NPI response

npi
string
required

The NPI number given by NPPES.

entity_type_code
enum<string>

The entity type code given by NPPES. '0' = Unknown. '1' = Professional. '2' = Insitutional.

Available options:
0,
1,
2
display_name
string

This is the name used for displaying to end users. If the NPI has an entity_type_code of 1, then we join the first and last name together. If the NPI has an entity_type_code of 2, then we display the org_name

org_name
string | null

If the NPI has an entity_type_code of 2, this will be the organizations name. If the entity_type_code is 2, it will be null.

pro_last_name
string | null

If the NPI has an entity_type_code of 1, this will be the providers last name. If the entity_type_code is 1, it will be null.

pro_first_name
string | null

If the NPI has an entity_type_code of 1, this will be the providers first name. If the entity_type_code is 1, it will be null.

pro_middle_name
string | null

If the NPI has an entity_type_code of 1, this will be the providers middle name. If the entity_type_code is 1, it will be null.

provider_enumeration_date
string | null

The enumeration date for the provider

last_update_date
string | null

The last time the provider was updated inside the NPPES dataset.

certification_date
string | null

The certification date for the provider

npi_deactivation_date
string | null

The deactivation date for the provider

npi_reactivation_date
string | null

The reactivation date for the provider