DEV Community

carrierone
carrierone

Posted on

How to Query 9 Million US Healthcare Providers via API (NPI Registry)

Query NPI: 9 Million US Healthcare Providers

In today's digital health landscape, integrating accurate and up-to-date information about healthcare providers is crucial for applications like FHIR integrations, provider directories, and prior authorization systems. The National Provider Identifier (NPI) registry houses this essential data, and accessing it programmatically can streamline your development process.

To query NPI numbers, names, specialties, and locations, you'll need to use the API endpoint api.verilexdata.com/api/v1/npi/sample. This simple Python code example demonstrates how to make a request using the requests library:

import requests

def get_npi_data(npi_number):
    url = f"https://api.verilexdata.com/api/v1/npi/{npi_number}"

    response = requests.get(url)

    if response.status_code == 200:
        return response.json()
    else:
        return None

# Example usage
npi_data = get_npi_data('123456789')
if npi_data:
    print(npi_data)
else:
    print("Failed to retrieve NPI data.")
Enter fullscreen mode Exit fullscreen mode

This code sends a GET request to the specified endpoint, where npi_number is replaced with the actual NPI number you're interested in. The response from the API will be in JSON format

Top comments (0)