Spiral gives your agent every tool with one account. Browse the tools →

opencode · Lead Gen

How to Use NPI Registry practice locations in opencode

Returns the primary and reported secondary practice locations for one NPI, with business contact details and a separate mailing address. Use it to check where an organization reports providing care.

Prompts to try with NPI Registry practice locations in opencode

Copy an example into opencode, or ask in your own words.

Use NPI Registry practice locations for Cleveland Clinic's NPI 1679525919 and build a table that separates its primary practice address, reported secondary locations, and mailing address.

NPI Registry practice locationsopencode
Try asking
  • Use NPI Registry practice locations for Cleveland Clinic's NPI 1679525919 and compare the returned practice addresses with the locations stored in our project.

  • Use NPI Registry practice locations to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from NPI Registry practice locations and tell me what changed since last week.

  • Check NPI Registry practice locations and summarize what you find in three bullet points.

How to set up NPI Registry practice locations in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run NPI Registry practice locations

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "alexandria",
        "model": "npiregistry-cms-hhs-gov/providers/locations",
        "input": {
          "npi": "<npi>"
        }
      }'

Then paste one of the prompts above: opencode finds NPI Registry practice locations on Spiral, shows the price and runs it.

NPI Registry practice locations providers and prices

Spiral runs NPI Registry practice locations through Alexandria. Open a card for today's price, with every fee included.

AlexandriaLead Gen
NPI Registry · Locations
npiregistry-cms-hhs-gov/providers/locations

What can you do with NPI Registry practice locations in opencode?

Build a healthcare organization directory with each NPI attached to its reported business addresses. Compare NPPES records with existing project data and flag address mismatches for review.

Audit a healthcare organization directory

Compare directory names and business addresses with reported NPPES records. Identify entries that need an address correction or a closer review of the organization match.

Prepare a referral facility directory

Find healthcare organizations in a city, review their reported classifications, and organize their practice addresses for referral staff.

Map reported care sites

Build a map from organization practice addresses, keeping mailing addresses separate. Include reported secondary locations when reviewing an organization's geographic presence.

Review business contact records

Compare a hospital or clinic directory's business address and telephone number with NPPES. Prepare a review queue for discrepancies before changing published contact information.

Report organization address changes

Compare successive registry checks for selected organizations. Summarize changes to reported practice and mailing addresses for the team maintaining the directory.

Reconcile duplicate organization entries

Compare NPIs and reported locations when similarly named organizations appear in a directory. Preserve separate NPI records while flagging entries that may describe the same organization.

Questions about NPI Registry practice locations in opencode

Can opencode use NPI Registry practice locations?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run NPI Registry practice locations like any built-in tool.

How much does NPI Registry practice locations cost in opencode?

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need an Alexandria account to use NPI Registry practice locations in opencode?

No. Spiral runs NPI Registry practice locations on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up NPI Registry practice locations in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while NPI Registry practice locations runs?

NPI Registry practice locations runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Does NPPES cover organizations as well as individual clinicians?

Yes. NPPES distinguishes individual healthcare providers, such as physicians, from organizations, such as hospitals.

How fresh are NPI Registry records?

The registry refreshes daily. Providers have 30 days to report changes to required data, so a daily refresh can still contain an address that has recently changed.

Does an NPI listing verify a provider's license?

No. CMS states that having an NPI does not ensure a provider is licensed or credentialed; providers certify the information they submit to NPPES.

How many records can a registry search return?

The NPPES API returns up to 200 records per request. The rOpenSci client documentation describes a 1,200-record search ceiling, so larger result sets need narrower geographic searches.

What is the difference between a practice address and a mailing address?

NPPES separates location addresses from mailing addresses. The primary practice entry includes a reported address and telephone number, and CMS also maintains reported non-primary practice locations.

Get started

Start using NPI Registry practice locations in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options