{
  "openapi": "3.0.1",
  "info": {
    "title": "NPI Provider Contact Finder",
    "description": "Generate healthcare leads with verified provider contacts. Find doctor emails, practice phones, LinkedIn profiles, and websites from the NPPES NPI Registry. Built for medical device sales, pharma outreach, healthcare marketing, and recruiting.",
    "version": "2.1",
    "x-build-id": "9b6I9ctp9Xhce2NA2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/labrat011~npi-provider-contact-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-labrat011-npi-provider-contact-finder",
        "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/labrat011~npi-provider-contact-finder/runs": {
      "post": {
        "operationId": "runs-sync-labrat011-npi-provider-contact-finder",
        "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/labrat011~npi-provider-contact-finder/run-sync": {
      "post": {
        "operationId": "run-sync-labrat011-npi-provider-contact-finder",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "🔍 Scraping mode",
            "enum": [
              "search_providers",
              "get_provider",
              "search_organizations",
              "search_by_specialty",
              "bulk_lookup"
            ],
            "type": "string",
            "description": "Select what to do: search providers, get by NPI number, search organizations, or search by specialty.",
            "default": "search_providers"
          },
          "query": {
            "title": "🔎 Search query",
            "type": "string",
            "description": "General search term. Used as last name (search_providers), organization name (search_organizations), or specialty (search_by_specialty) depending on mode. For multiple searches in one run, use 'searchQueriesList' instead. Prefer the mode-specific field (Last Name / Organization Name / Specialty) when you know which one you want."
          },
          "searchQueriesList": {
            "title": "🔎 Batch Search Queries",
            "type": "array",
            "description": "Run multiple searches in one go. Each item replaces the 'query' field for one search run, so it means the same thing 'query' does in the selected mode: a last name in search_providers, an organization name in search_organizations, a specialty in search_by_specialty. Results are automatically deduped by NPI number across all queries. If provided, takes precedence over the single 'query' field.",
            "items": {
              "type": "string"
            }
          },
          "npiNumber": {
            "title": "🪪 NPI Number",
            "type": "string",
            "description": "10-digit NPI number for direct lookup (get_provider mode). Example: 1881018208 (Mayo Clinic). Note that location filters are ignored in this mode."
          },
          "npiNumbers": {
            "title": "📋 NPI Numbers (bulk)",
            "type": "array",
            "description": "JSON array of 10-digit NPI numbers for bulk_lookup mode. Example: [\"1881018208\", \"1275791162\"] (Mayo Clinic, Cleveland Clinic). Every value must be exactly 10 digits or the run fails.",
            "items": {
              "type": "string"
            }
          },
          "npiFile": {
            "title": "📁 NPI CSV File URL (bulk)",
            "type": "string",
            "description": "URL to a CSV file containing NPI numbers for bulk_lookup mode. The file should have a column named 'npi', 'npi_number', or 'NPI', or list one NPI per row. Supports any publicly accessible URL or Apify Key-Value Store URL."
          },
          "firstName": {
            "title": "👤 First Name",
            "type": "string",
            "description": "Provider's first name (individual providers only)."
          },
          "lastName": {
            "title": "👤 Last Name",
            "type": "string",
            "description": "Provider's last name (individual providers only)."
          },
          "organizationName": {
            "title": "🏥 Organization Name",
            "type": "string",
            "description": "Organization name (e.g., 'Mayo Clinic', 'Johns Hopkins'). Used in search_organizations mode."
          },
          "taxonomyDescription": {
            "title": "🩺 Specialty / Taxonomy",
            "type": "string",
            "description": "NUCC taxonomy description, matched against the description text (e.g. 'Dermatology', 'Dentist', 'Family Medicine', 'Cardiovascular Disease'). A trailing wildcard works after two characters, e.g. 'Derm*'. Note it must match the NUCC wording: 'Cardiovascular Disease' finds cardiologists while 'Cardiology' mostly returns pharmacists, and it is 'Orthopaedic Surgery' - the American spelling returns nothing. Used in search_by_specialty mode."
          },
          "city": {
            "title": "🏙️ City",
            "type": "string",
            "description": "Filter by city. In search_providers mode a city alone is enough, e.g. every provider in Austin with state TX."
          },
          "state": {
            "title": "🗺️ State",
            "type": "string",
            "description": "Two-letter state code (e.g., 'CA', 'NY', 'TX')."
          },
          "postalCode": {
            "title": "📮 Postal Code",
            "type": "string",
            "description": "ZIP/postal code filter. In search_providers mode a ZIP code alone is enough."
          },
          "countryCode": {
            "title": "🌎 Country Code",
            "type": "string",
            "description": "Two-letter country code (default: US)."
          },
          "enumerationType": {
            "title": "🏷️ Provider Type",
            "enum": [
              "",
              "NPI-1",
              "NPI-2"
            ],
            "type": "string",
            "description": "Filter by NPI type."
          },
          "maxResults": {
            "title": "📊 Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of providers to return (1-1000). Free users are limited to 25 per run.",
            "default": 100
          },
          "requestIntervalSecs": {
            "title": "⏱️ Request interval (seconds)",
            "minimum": 0.2,
            "maximum": 5,
            "type": "number",
            "description": "Minimum seconds between API requests.",
            "default": 0.5
          },
          "timeoutSecs": {
            "title": "⏳ HTTP timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for API requests.",
            "default": 30
          },
          "maxRetries": {
            "title": "🔁 Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts on failed requests.",
            "default": 5
          },
          "enableEmailEnrichment": {
            "title": "📧 Enable Email Enrichment",
            "type": "boolean",
            "description": "Scrape practice websites for email addresses (office, billing, manager contacts). MX-verified emails are billed at the verified-email rate; unverified discovery at the email-found rate.",
            "default": false
          },
          "enableLinkedInEnrichment": {
            "title": "💼 Enable LinkedIn Enrichment",
            "type": "boolean",
            "description": "Deprecated and no longer billed. Dedicated LinkedIn profile search has been removed; any LinkedIn URL found for free on the practice website is still returned. This option has no effect.",
            "default": false
          },
          "enableSocialMediaEnrichment": {
            "title": "📱 Enable Social Media Enrichment",
            "type": "boolean",
            "description": "Extract all social media links (Facebook, Twitter, Instagram, Healthgrades, Vitals, Zocdoc). No additional per-event charge; social discovery is included in the email enrichment process.",
            "default": false
          },
          "personalEmailsOnly": {
            "title": "🎯 Personal Emails Only",
            "type": "boolean",
            "description": "Keep only emails whose address contains the provider's name (e.g. jsmith@, paula.cantu@). Drops generic practice mailboxes like info@ and billing@. Useful for direct, named outreach. Records with no personal email return no email and are not billed for one.",
            "default": false
          },
          "emailEnrichmentTimeout": {
            "title": "⏱️ Email Enrichment Timeout (seconds)",
            "minimum": 5,
            "maximum": 30,
            "type": "integer",
            "description": "Timeout for scraping each practice website. Lower = faster but may miss emails. Higher = slower but more thorough.",
            "default": 10
          },
          "maxEnrichmentResults": {
            "title": "🧮 Max Enrichment Results (per run)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of providers to run paid contact enrichment on per run. Each enriched provider triggers a web search, so this caps the run's enrichment cost. Providers beyond this limit still return base NPI data (no enrichment). Paying users can raise this for larger enriched runs.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Proxy used for website and LinkedIn discovery during contact enrichment. Leave at the default (Apify Proxy, Google SERP group) unless you have a specific reason to change it.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}