{
  "openapi": "3.0.1",
  "info": {
    "title": "NPI Number Lookup & Registry: Healthcare Provider Data",
    "description": "Look up US healthcare providers in the official CMS NPPES NPI Registry: bulk NPI lookup or search by specialty, name, organization, city, state and ZIP. Get taxonomy, license, practice address, phone, identifiers and endpoints. Big searches are split by ZIP code to pass the 1,200-result API cap.",
    "version": "0.1",
    "x-build-id": "1o0z0fG1aDPy9Pu4Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~npi-registry-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-npi-registry-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/data-done-right~npi-registry-scraper/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-npi-registry-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/data-done-right~npi-registry-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-npi-registry-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": {
          "npiNumbers": {
            "title": "NPI numbers (bulk lookup)",
            "type": "array",
            "description": "10-digit NPI numbers to look up, one per line. Invalid numbers (wrong length or check digit) and NPIs not in the registry are listed in the NOTES record. You can combine this with a search below.",
            "items": {
              "type": "string"
            }
          },
          "taxonomyDescriptions": {
            "title": "Specialty (taxonomy description)",
            "type": "array",
            "description": "Provider specialty as words, e.g. Dentist, Family Medicine, Physical Therapist, Pharmacy. The registry matches part of the description and also matches secondary specialties. Taxonomy codes are not accepted here (use the taxonomy code filter below).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "2-letter state codes, e.g. CA, TX, NY. A state alone is not enough for the registry: combine it with a specialty, name, city or ZIP code. Every combination of specialty x state x city x ZIP code is searched.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names, e.g. Austin. Leave empty for a whole state (big searches are split automatically by ZIP code).",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "5-digit ZIP codes (also match ZIP+4), or a prefix with a wildcard such as 100* (at least 2 digits before the *).",
            "items": {
              "type": "string"
            }
          },
          "lastName": {
            "title": "Last name (individuals)",
            "type": "string",
            "description": "Provider last name. A trailing * works after 2 letters, e.g. smi*."
          },
          "firstName": {
            "title": "First name (individuals)",
            "type": "string",
            "description": "Provider first name. A trailing * works after 2 letters."
          },
          "organizationName": {
            "title": "Organization name",
            "type": "string",
            "description": "Organization (NPI-2) name, e.g. Mayo Clinic. A trailing * works after 2 letters."
          },
          "enumerationType": {
            "title": "Provider type",
            "enum": [
              "BOTH",
              "NPI-1",
              "NPI-2"
            ],
            "type": "string",
            "description": "Individuals (NPI-1, e.g. physicians, dentists, nurses) or organizations (NPI-2, e.g. clinics, hospitals, pharmacies).",
            "default": "BOTH"
          },
          "addressPurpose": {
            "title": "Address used for city / state / ZIP",
            "enum": [
              "ANY",
              "LOCATION",
              "MAILING",
              "PRIMARY",
              "SECONDARY"
            ],
            "type": "string",
            "description": "Which address the location filters apply to. Any = practice location or mailing address (registry default).",
            "default": "ANY"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "2-letter country code for providers with a foreign address, e.g. DE. Leave empty for the US."
          },
          "maxResults": {
            "title": "Max providers",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many providers in total. Also caps cost.",
            "default": 1000
          },
          "deepSearch": {
            "title": "Go past the 1,200-result limit (split by ZIP code)",
            "type": "boolean",
            "description": "The registry returns at most 1,200 providers per query. When a search hits that limit, it is split automatically into ZIP-code prefixes (2 to 9 digits) until every part fits. Turn off to get only the first 1,200 per search.",
            "default": true
          },
          "taxonomyCodes": {
            "title": "Taxonomy code filter",
            "type": "array",
            "description": "Keep only providers with one of these taxonomy codes, e.g. 1223G0001X. Applied after the search, so you still need a search above.",
            "items": {
              "type": "string"
            }
          },
          "primaryTaxonomyOnly": {
            "title": "Match primary specialty only",
            "type": "boolean",
            "description": "The registry also matches secondary specialties. Turn on to keep only providers whose PRIMARY taxonomy matches your specialty words (or taxonomy codes).",
            "default": false
          },
          "updatedSince": {
            "title": "Updated since",
            "type": "string",
            "description": "YYYY-MM-DD. Keep only records last updated on or after this date."
          },
          "onlyNew": {
            "title": "Only new or updated since my last run",
            "type": "boolean",
            "description": "Remembers each search and NPI list. The first run returns everything (changeType baseline); later runs return only providers added or updated since then (changeType new / updated). A run stopped by Max providers continues where it stopped next time. Great for scheduled monitoring.",
            "default": false
          },
          "maxApiRequests": {
            "title": "Max API requests",
            "minimum": 10,
            "type": "integer",
            "description": "Safety cap on search calls to the NPI Registry API per run (each returns up to 200 providers). Bulk NPI lookups (one call per NPI) come on top.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}