> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rcintell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search NPPES NPI Registry

> Search the NPPES NPI Registry.

The default backend is the local ``nppes_records`` table (populated from
the weekly NPPES dissemination CSV by the ``NPPES NPI Registry (bulk)``
data source). Falls back to the live CMS NPPES API automatically when the
local search returns zero results, or when ``live=true`` is set.



## OpenAPI

````yaml /docs/openapi.client.json get /v1/npi/search
openapi: 3.1.0
info:
  description: >-
    Client API for RCIntel. Admin ingest, catalog sync, and internal audit
    routes are omitted. See Guides → Which API to use.
  summary: Multi-tenant knowledge API for healthcare revenue cycle management.
  title: Healthcare Knowledge Layer
  version: 0.1.0
servers: []
security: []
tags:
  - description: >-
      Geographic payer policy lookup (national NCD vs MAC LCD vs state). Query
      payer, code, state, plan_type. Each row includes geo_scope and
      document_version.
    name: policies
  - description: >-
      Payer network directory — search payers, check prior auth requirements,
      view filing rules, denial patterns, and appeal levels.
    name: payers
  - description: >-
      Resolve healthcare billing knowledge across the L1-L6 layer stack.
      Includes payment calculation, billing guidance, and per-layer queries.
    name: knowledge
  - description: >-
      CMS Fee Schedule lookups — OPPS (Addendum B / APC), DMEPOS (state-level
      pricing), and Clinical Lab Fee Schedule (CLFS).
    name: fee-schedules
  - description: >-
      NCCI (National Correct Coding Initiative) — dedicated MUE limits, PTP
      bundling edits, add-on code edits, and code pair validation.
    name: ncci
  - description: >-
      Service code intelligence — CPT/HCPCS lookup, RVU data, NCCI edits,
      payment calculation, implant/GUDID search, and service group
      classification.
    name: codes
  - description: >-
      Submit asynchronous AI agent jobs for code research, medical necessity,
      and denial resolution. Poll for results and retrieve reasoning traces.
    name: agents
  - description: >-
      Register and manage healthcare facilities by CCN (Medicare Provider
      Number). Each facility is the root entity for knowledge resolution.
    name: facilities
  - description: >-
      NPI Registry — live search against CMS NPPES API for provider and
      organization National Provider Identifiers.
    name: npi
  - description: >-
      OpenFDA drug product lookup by NDC. Includes product-level fields with
      normalized ingredient and package detail.
    name: drugs
  - description: Health checks, service metadata, and Prometheus metrics.
    name: system
paths:
  /v1/npi/search:
    get:
      tags:
        - npi
      summary: Search NPPES NPI Registry
      description: >-
        Search the NPPES NPI Registry.


        The default backend is the local ``nppes_records`` table (populated from

        the weekly NPPES dissemination CSV by the ``NPPES NPI Registry (bulk)``

        data source). Falls back to the live CMS NPPES API automatically when
        the

        local search returns zero results, or when ``live=true`` is set.
      operationId: search_npi_v1_npi_search_get
      parameters:
        - description: Provider first name (exact match, local DB)
          in: query
          name: first_name
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Provider first name (exact match, local DB)
            title: First Name
        - description: Provider last name (exact match, local DB)
          in: query
          name: last_name
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Provider last name (exact match, local DB)
            title: Last Name
        - description: Organization name (substring, local DB)
          in: query
          name: organization_name
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Organization name (substring, local DB)
            title: Organization Name
        - description: >-
            NUCC taxonomy code (e.g. '207RC0000X' for Cardiology). Local DB
            only.
          in: query
          name: taxonomy_code
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              NUCC taxonomy code (e.g. '207RC0000X' for Cardiology). Local DB
              only.
            title: Taxonomy Code
        - description: Taxonomy / specialty description (substring)
          in: query
          name: taxonomy_description
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Taxonomy / specialty description (substring)
            title: Taxonomy Description
        - description: Practice address city
          in: query
          name: city
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Practice address city
            title: City
        - description: 2-letter state code
          in: query
          name: state
          required: false
          schema:
            anyOf:
              - maxLength: 2
                type: string
              - type: 'null'
            description: 2-letter state code
            title: State
        - description: ZIP code (prefix match)
          in: query
          name: postal_code
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: ZIP code (prefix match)
            title: Postal Code
        - description: NPI-1 (individual) or NPI-2 (organization)
          in: query
          name: enumeration_type
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: NPI-1 (individual) or NPI-2 (organization)
            title: Enumeration Type
        - description: >-
            Filter to providers affiliated with a specific CCN-registered
            facility. Resolves CCN → Facility.npi and returns matching rows.
            Local DB only.
          in: query
          name: facility_ccn
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter to providers affiliated with a specific CCN-registered
              facility. Resolves CCN → Facility.npi and returns matching rows.
              Local DB only.
            title: Facility Ccn
        - description: >-
            If true, query the live CMS NPPES API directly and skip the local
            table. Useful when the local copy is stale or for one-off lookups of
            brand-new NPIs.
          in: query
          name: live
          required: false
          schema:
            default: false
            description: >-
              If true, query the live CMS NPPES API directly and skip the local
              table. Useful when the local copy is stale or for one-off lookups
              of brand-new NPIs.
            title: Live
            type: boolean
        - description: Max results
          in: query
          name: limit
          required: false
          schema:
            default: 20
            description: Max results
            maximum: 200
            minimum: 1
            title: Limit
            type: integer
        - description: Results to skip
          in: query
          name: skip
          required: false
          schema:
            default: 0
            description: Results to skip
            minimum: 0
            title: Skip
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NPISearchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    NPISearchResponse:
      description: NPI search results.
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Error message if NPPES was unreachable
          title: Error
        providers:
          items:
            $ref: '#/components/schemas/NPIProviderSummary'
          title: Providers
          type: array
        result_count:
          default: 0
          description: Total matching results from NPPES
          title: Result Count
          type: integer
      title: NPISearchResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    NPIProviderSummary:
      description: Summarized NPI provider record.
      properties:
        credential:
          anyOf:
            - type: string
            - type: 'null'
          title: Credential
        entity_type:
          anyOf:
            - type: string
            - type: 'null'
          description: individual or organization
          title: Entity Type
        enumeration_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Enumeration Date
        gender:
          anyOf:
            - type: string
            - type: 'null'
          title: Gender
        last_updated:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Updated
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Provider or organization name
          title: Name
        npi:
          anyOf:
            - type: string
            - type: 'null'
          description: 10-digit NPI number
          title: Npi
        other_taxonomies:
          items:
            $ref: '#/components/schemas/NPITaxonomy'
          title: Other Taxonomies
          type: array
        practice_address:
          anyOf:
            - $ref: '#/components/schemas/NPIAddress'
            - type: 'null'
        primary_taxonomy:
          anyOf:
            - $ref: '#/components/schemas/NPITaxonomy'
            - type: 'null'
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
      title: NPIProviderSummary
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    NPITaxonomy:
      description: Healthcare taxonomy classification.
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        license:
          anyOf:
            - type: string
            - type: 'null'
          title: License
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
      title: NPITaxonomy
      type: object
    NPIAddress:
      description: Practice or mailing address from NPPES.
      properties:
        address_1:
          anyOf:
            - type: string
            - type: 'null'
          title: Address 1
        address_2:
          anyOf:
            - type: string
            - type: 'null'
          title: Address 2
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        fax:
          anyOf:
            - type: string
            - type: 'null'
          title: Fax
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
      title: NPIAddress
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey

````