{
  "openapi": "3.0.1",
  "info": {
    "title": "NPI Registry Scraper - Healthcare Providers & Leads",
    "description": "Scrape the NPPES NPI Registry: US doctors, clinicians & healthcare organizations by name, NPI, state, city, ZIP or specialty. Get addresses, phone & fax, taxonomies, licenses, org authorized officials, contact leads & lead scores. Monitor new registrations. No key.",
    "version": "0.1",
    "x-build-id": "lIwOuqtAj1hk3xl56"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~npi-nppes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-npi-nppes-scraper",
        "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/scrapesage~npi-nppes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-npi-nppes-scraper",
        "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/scrapesage~npi-nppes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-npi-nppes-scraper",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "npiLookup"
            ],
            "type": "string",
            "description": "How to find providers. \"search\" queries the registry by criteria (name, location, specialty…). \"npiLookup\" fetches specific NPI numbers directly.",
            "default": "search"
          },
          "outputType": {
            "title": "Output type",
            "enum": [
              "providers",
              "leads",
              "both"
            ],
            "type": "string",
            "description": "\"providers\" = full registry records (taxonomies, licenses, addresses, identifiers). \"leads\" = contact-focused B2B leads (named contact, phone, specialty, lead score). \"both\" emits one of each per provider.",
            "default": "providers"
          },
          "taxonomyDescription": {
            "title": "Specialty / taxonomy",
            "type": "string",
            "description": "Provider type / specialty from the NUCC taxonomy, e.g. \"Dentist\", \"Physical Therapist\", \"Pharmacy\", \"Internal Medicine\", \"Nurse Practitioner\". Partial matches and a trailing * wildcard are supported."
          },
          "specialty": {
            "title": "Specialty (alias)",
            "type": "string",
            "description": "Friendly alias for the specialty / taxonomy field above — use either one."
          },
          "taxonomyDescriptions": {
            "title": "Multiple specialties",
            "type": "array",
            "description": "Run several specialties in one go (combined with each state/city/ZIP below).",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter US state/territory code, e.g. CA, TX, NY, FL."
          },
          "states": {
            "title": "Multiple states",
            "type": "array",
            "description": "Run several states in one go (cross-combined with each specialty/city/ZIP).",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name to match against the provider address."
          },
          "cities": {
            "title": "Multiple cities",
            "type": "array",
            "description": "Run several cities in one go (cross-combined with each specialty/state/ZIP).",
            "items": {
              "type": "string"
            }
          },
          "postalCode": {
            "title": "ZIP / postal code",
            "type": "string",
            "description": "5-digit ZIP. A trailing * wildcard is supported (e.g. 902* for the 902xx area)."
          },
          "postalCodes": {
            "title": "Multiple ZIPs",
            "type": "array",
            "description": "Run several ZIP codes in one go (cross-combined with the other criteria).",
            "items": {
              "type": "string"
            }
          },
          "firstName": {
            "title": "First name (individuals)",
            "type": "string",
            "description": "For NPI-1 individual providers. Trailing * wildcard supported."
          },
          "lastName": {
            "title": "Last name (individuals)",
            "type": "string",
            "description": "For NPI-1 individual providers. Trailing * wildcard supported."
          },
          "organizationName": {
            "title": "Organization name (orgs)",
            "type": "string",
            "description": "For NPI-2 organizations, e.g. \"CVS Pharmacy\", \"Mayo Clinic\". Trailing * wildcard supported."
          },
          "enumerationType": {
            "title": "Provider type",
            "enum": [
              "",
              "NPI-1",
              "NPI-2"
            ],
            "type": "string",
            "description": "Limit to individuals (NPI-1) or organizations (NPI-2). Leave blank for both.",
            "default": ""
          },
          "addressPurpose": {
            "title": "Address purpose",
            "enum": [
              "",
              "LOCATION",
              "MAILING",
              "PRIMARY",
              "SECONDARY"
            ],
            "type": "string",
            "description": "Match the state/city/ZIP against the provider's LOCATION (practice) or MAILING address. Leave blank for the default.",
            "default": ""
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter country code; defaults to US.",
            "default": "US"
          },
          "npiNumbers": {
            "title": "NPI numbers (npiLookup mode)",
            "type": "array",
            "description": "One or more 10-digit NPI numbers to fetch directly.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "NPPES URLs",
            "type": "array",
            "description": "Paste NPPES API or registry URLs — their query parameters (state, taxonomy, name, number…) are parsed and added as searches.",
            "items": {
              "type": "string"
            }
          },
          "enrichContacts": {
            "title": "Enrich contacts (website crawl)",
            "type": "boolean",
            "description": "When building leads, if a provider lists a website endpoint, fetch its homepage to pull emails and social links. Off by default (NPPES rarely lists a marketing website; phone, fax and the org authorized official are always included regardless).",
            "default": false
          },
          "maxResults": {
            "title": "Max providers",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of providers to scrape. Each NPPES query returns up to 1,200 results; narrow by specialty/state/city to go deeper.",
            "default": 200
          },
          "deduplicateResults": {
            "title": "Deduplicate by NPI",
            "type": "boolean",
            "description": "Skip duplicate providers (same NPI) within a run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new)",
            "type": "boolean",
            "description": "Remember NPIs seen in previous runs (in a named key-value store) and emit only newly-appearing providers — ideal on a schedule to capture new healthcare registrations as fresh leads.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name your monitor so different searches keep separate memory (e.g. \"ca-dentists\").",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of parallel requests (NPI lookups and contact enrichment).",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The NPPES API is clean from Apify datacenter proxies; a fresh IP is rotated per request to spread the per-IP rate limit.",
            "default": {
              "useApifyProxy": true
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}