
New to working with APIs? An API is just a way for your software to ask
ours a question and get a structured answer back. You will need an API token
to identify yourself, and from there you send a request and read the response.
This guide assumes no prior experience and shows every step.
Create an account
Sign up at developer.perfectreferral.com. You’ll use this developer portal to manage your account and API tokens.Create an API token
1
Open the API tokens page
Once signed in, go to the API tokens section of the developer portal.
2
Generate a new token
Click Create API token, give it a descriptive name (for example,
local-testing or production), and confirm.3
Copy and store it safely
Your token is shown only once. Copy it and store it somewhere secure,
such as a password manager.
Make your first request
Every request is authenticated with your API token sent as a Bearer token in theAuthorization header, and is made against the base URL:
GET /practitioners/{npiNumber} endpoint. Replace YOUR_API_TOKEN with the token
you just created and 1234567890 with the NPI you want to look up.
Understand the response
A successful request returns200 OK with the practitioner’s name, their
NPPES-registered specialties, and their scope of practice:
referralScopeMatches pairs a target (a specific reason a provider
is referred into a specialty, like cataract evaluation in ophthalmology) with a label
describing how well the provider fits it. The API returns one of six labels: five
sit on a single scale from strong match to strong rule-out, and the sixth marks the
cases where there is too little data to judge.
The strong labels (
very_likely_match, very_unlikely_match) are calibrated to be
correct at least 95% of the time, and the moderate labels (likely_match,
unlikely_match) at least 80%. See Methodology & limitations
for how we derive and validate the scale.
Next steps
API Reference
Explore the full list of endpoints, parameters, and response schemas.
