{
  "openapi": "3.0.1",
  "info": {
    "title": "NPI Healthcare Provider Leads — Doctors, Clinics & Contacts",
    "description": "🔥 Up to 20% OFF! Scrape the NPPES NPI Registry — doctors, clinics, specialties, taxonomies, phones/fax/E.164 and 0-100 lead score, with cross-run change monitoring. Official US data, no login. Perfect for medical sales, recruiters & healthcare marketing. ⚡",
    "version": "0.0",
    "x-build-id": "jaAdobGlZexJdZnEN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bgfc97~npi-healthcare-provider-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bgfc97-npi-healthcare-provider-leads",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/bgfc97~npi-healthcare-provider-leads/runs": {
      "post": {
        "operationId": "runs-sync-bgfc97-npi-healthcare-provider-leads",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/bgfc97~npi-healthcare-provider-leads/run-sync": {
      "post": {
        "operationId": "run-sync-bgfc97-npi-healthcare-provider-leads",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "taxonomyDescription": {
            "title": "Specialty / taxonomy",
            "type": "string",
            "description": "Provider specialty (NPPES taxonomy description), e.g. \"Dentist\", \"Family Medicine\", \"Pediatrics\", \"Pharmacy\". A trailing wildcard * works (e.g. \"Dent*\"); wildcards need at least 2 leading characters."
          },
          "state": {
            "title": "State (2-letter)",
            "type": "string",
            "description": "US state abbreviation, e.g. TX, CA, NY. Cannot be used entirely on its own — combine it with a specialty, city, ZIP or name. For several states use the \"States\" list below."
          },
          "states": {
            "title": "States (multiple)",
            "type": "array",
            "description": "Several 2-letter state codes — each is searched (and, if enabled, sharded) independently and the results are merged + de-duplicated. Leave empty to use the single \"State\" field above.",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name, e.g. \"Houston\". Works on its own. For several cities use the \"Cities\" list below."
          },
          "cities": {
            "title": "Cities (multiple)",
            "type": "array",
            "description": "Several cities — each is searched independently and merged + de-duplicated. Great for building a lead list across a metro area.",
            "items": {
              "type": "string"
            }
          },
          "postalCode": {
            "title": "Postal / ZIP code",
            "type": "string",
            "description": "ZIP code. A trailing wildcard * works for a whole area (e.g. \"770*\"); wildcards need at least 2 leading characters."
          },
          "firstName": {
            "title": "First name (individuals)",
            "type": "string",
            "description": "Provider first name. Trailing wildcard * works (≥2 leading chars)."
          },
          "lastName": {
            "title": "Last name (individuals)",
            "type": "string",
            "description": "Provider last name. Trailing wildcard * works (≥2 leading chars)."
          },
          "organizationName": {
            "title": "Organization name (clinics / orgs)",
            "type": "string",
            "description": "Organization / clinic / facility name. Trailing wildcard * works (≥2 leading chars)."
          },
          "npi": {
            "title": "NPI number (direct lookup)",
            "type": "string",
            "description": "Look up one exact 10-digit NPI number. When set, all search filters are ignored."
          },
          "npiList": {
            "title": "NPI numbers (bulk lookup)",
            "type": "array",
            "description": "A list of 10-digit NPI numbers to look up in bulk. When set, search filters are ignored. Non-10-digit and duplicate values are dropped.",
            "items": {
              "type": "string"
            }
          },
          "enumerationType": {
            "title": "Provider type",
            "enum": [
              "both",
              "individual",
              "org"
            ],
            "type": "string",
            "description": "Restrict to individuals (doctors, dentists…), organizations (clinics, hospitals, pharmacies…) or return both.",
            "default": "both"
          },
          "addressPurpose": {
            "title": "Address purpose",
            "enum": [
              "",
              "LOCATION",
              "MAILING",
              "PRIMARY",
              "SECONDARY"
            ],
            "type": "string",
            "description": "Match on a specific address type. PRIMARY / SECONDARY refer to the provider's primary vs. secondary practice locations.",
            "default": ""
          },
          "taxonomyCode": {
            "title": "Taxonomy code (exact, post-filter)",
            "type": "string",
            "description": "Keep only providers carrying this exact 10-char NUCC taxonomy code (e.g. \"122300000X\" for Dentist). Applied on top of your other filters."
          },
          "useFirstNameAlias": {
            "title": "Match first-name nicknames",
            "type": "boolean",
            "description": "Also match common nicknames of the first name (e.g. Bob ↔ Robert, Bill ↔ William).",
            "default": false
          },
          "namePurpose": {
            "title": "Name applies to",
            "enum": [
              "",
              "Provider",
              "AO"
            ],
            "type": "string",
            "description": "When searching by name, whether the name refers to the provider or the organization's authorized official. Requires a first/last name.",
            "default": ""
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "2-letter country code for the address (default US). Cannot be used alone — combine with another field."
          },
          "onlyActive": {
            "title": "Active providers only",
            "type": "boolean",
            "description": "Drop deactivated NPIs and keep only active providers.",
            "default": false
          },
          "splitLargeSearches": {
            "title": "Break past the 1,200 cap (fetch all)",
            "type": "boolean",
            "description": "NPPES returns at most 1,200 results per search. Turn this on (and set a high Max results) to automatically shard the search by ZIP or name prefix and pull the complete, de-duplicated set — tens of thousands of providers.",
            "default": false
          },
          "splitBy": {
            "title": "Split strategy",
            "enum": [
              "auto",
              "postal",
              "lastname",
              "organizationname",
              "none"
            ],
            "type": "string",
            "description": "How to shard when breaking past the cap. \"Auto\" uses ZIP prefixes (complete coverage for individuals + organizations) and only falls back to name when a ZIP is already pinned.",
            "default": "auto"
          },
          "minLeadScore": {
            "title": "Minimum lead score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only providers whose transparent 0–100 lead score is at least this value (0 = keep everyone). Every row carries a `lead_score`, an A/B/C/D `lead_tier` and a `lead_score_factors` breakdown explaining the points. Filtered-out rows are not returned or charged.",
            "default": 0
          },
          "highValueTaxonomies": {
            "title": "High-value specialties (score boost)",
            "type": "array",
            "description": "Optional. Keywords (matched against the specialty / category, case-insensitive) that earn a provider +8 on its lead score — e.g. \"Dentist\", \"Dermatology\", \"Med Spa\". Leave empty for no boost.",
            "items": {
              "type": "string"
            }
          },
          "buildPracticeNetwork": {
            "title": "Emit practice-network clusters",
            "type": "boolean",
            "description": "Also output `practice_network` records that cluster providers sharing a practice address or local phone (same clinic / group = the organization plus the providers who work there). Free / uncharged.",
            "default": true
          },
          "marketSummary": {
            "title": "Emit market summary",
            "type": "boolean",
            "description": "Also output one `market_summary` record per run: counts by specialty, category, grouping, state and county, provider mix, contactability, lead-score distribution and network stats. Free / uncharged.",
            "default": true
          },
          "dedupeAcrossRuns": {
            "title": "De-duplicate across runs (never pay twice)",
            "type": "boolean",
            "description": "Remember every NPI delivered in previous runs (in a named Key-Value store) and skip it next time — not re-returned and not re-charged. Run the same search on a schedule and pay only for brand-new providers.",
            "default": false
          },
          "dedupeStoreName": {
            "title": "Cross-run store name",
            "type": "string",
            "description": "Name of the named Key-Value store that holds the cross-run \"seen NPIs\" set. Use distinct names to keep separate lead lists independent.",
            "default": "npi-provider-seen"
          },
          "trackChanges": {
            "title": "Track changes across runs (monitor)",
            "type": "boolean",
            "description": "Remember a compact snapshot of every provider (in a named Key-Value store) and, on the NEXT run of the same search, report WHAT CHANGED: brand-new providers (`is_new_provider` — fresh leads nobody has worked), practice-address moves, phone changes, new trade names (d/b/a), new authorized officials (decision-makers), specialty changes, deactivations/reactivations, and — under complete coverage — providers that dropped out. Off by default and adds zero columns when off. Each provider row gains `monitored`, `first_seen`, `last_checked_prev`, `is_new_provider` and a `change_since` object; one free `monitor_summary` row rolls it all up. The first run is a baseline (it just records snapshots); changes appear from the second run on.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "A stable label that ties a run to its history, e.g. \"tx-dentists-watch\". Leave blank and a key is derived automatically from your search filters (so the same search reuses the same history). Set distinct keys to keep separate watchlists independent. Only used when \"Track changes across runs\" is on."
          },
          "monitorStoreName": {
            "title": "Monitor store name (advanced)",
            "type": "string",
            "description": "Optional explicit name for the named Key-Value store that holds the monitor snapshots. Leave blank to derive it from the monitor key. Only used when \"Track changes across runs\" is on."
          },
          "monitorMaxAgeDays": {
            "title": "Monitor: drop providers unseen for N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "A tracked provider not re-seen within this many days is pruned from the snapshot store (keeps an always-on monitor bounded). Only used when \"Track changes across runs\" is on.",
            "default": 400
          },
          "monitorMaxEntries": {
            "title": "Monitor: max tracked providers",
            "minimum": 10,
            "maximum": 2000000,
            "type": "integer",
            "description": "Hard cap on how many provider snapshots the store keeps (most-recently-seen are kept). Only used when \"Track changes across runs\" is on.",
            "default": 200000
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum providers to return. Without \"Break past the 1,200 cap\", a single search tops out at 1,200. With it enabled, set this as high as you need.",
            "default": 1000
          },
          "maxRequests": {
            "title": "Max API requests (safety cap)",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Upper bound on NPPES API calls for one run, so a huge sharded sweep can't run away. Each call returns up to 200 providers.",
            "default": 5000
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Politeness delay between calls to the government API.",
            "default": 120
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}