{
  "openapi": "3.0.1",
  "info": {
    "title": "NPI Registry - US Healthcare Provider Lookup",
    "description": "The US NPI registry (public open data, no key): look up any of the ~9M enumerated healthcare providers by NPI number, name, organization, taxonomy or location. Demographics, credential, license numbers, up to 15 taxonomies, every practice location and endpoint.",
    "version": "0.0",
    "x-build-id": "0vXYr8fP1bpgNsuDU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~npi-registry/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-npi-registry",
        "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/j0401~npi-registry/runs": {
      "post": {
        "operationId": "runs-sync-j0401-npi-registry",
        "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/j0401~npi-registry/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-npi-registry",
        "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": [
              "rows",
              "profile",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = providers matching your filters (default). profile = one provider's complete flat record, given npi. aggregate = a rollup by one dimension over the matching providers.",
            "default": "rows"
          },
          "npi": {
            "title": "NPI number",
            "type": "string",
            "description": "A 10-digit National Provider Identifier, e.g. '1003000126'. Exact match. In profile mode this is the provider to return; in rows mode it is a normal filter.",
            "default": ""
          },
          "enumerationType": {
            "title": "Provider type",
            "enum": [
              "",
              "NPI-1",
              "NPI-2"
            ],
            "type": "string",
            "description": "NPI-1 = an individual practitioner (person). NPI-2 = an organization (hospital, clinic, group practice). Blank = both. Cannot stand alone - combine it with a name, taxonomy, city, ZIP or NPI.",
            "default": ""
          },
          "firstName": {
            "title": "First name",
            "type": "string",
            "description": "An individual provider's first name, matched as a whole word (not a prefix). Add * for a contains search, e.g. '*john*'. Individual records only - not usable with organizationName.",
            "default": ""
          },
          "lastName": {
            "title": "Last name",
            "type": "string",
            "description": "An individual provider's last name, matched as a whole word (not a prefix). Add * for a contains search, e.g. '*smith*'. Individual records only - not usable with organizationName.",
            "default": ""
          },
          "useFirstNameAlias": {
            "title": "Match first-name nicknames",
            "type": "boolean",
            "description": "When on, a first-name search also matches the provider's registered nickname or former name (e.g. 'Bob' finds 'Robert'). Only meaningful with firstName.",
            "default": false
          },
          "organizationName": {
            "title": "Organization name",
            "type": "string",
            "description": "An organization provider's name, matched as a whole word - 'MAYO CLINIC' matches, 'MAYO' alone does not. Add * for a contains search, e.g. '*clinic*'. Organization records only - not usable with firstName or lastName.",
            "default": ""
          },
          "gender": {
            "title": "Gender",
            "type": "string",
            "description": "NOT USABLE as a filter - the registry accepts it and ignores it (identical rows for any value), so it is rejected rather than charged for. It is still a valid aggregate dimension.",
            "default": ""
          },
          "taxonomyDescription": {
            "title": "Taxonomy / specialty",
            "type": "string",
            "description": "Free-text specialty search over the healthcare taxonomy descriptions, e.g. 'Cardiology', 'Internal Medicine', 'Nurse Practitioner'. Wildcards work: '*cardio*'. There are ~800 codes, so this is a text search.",
            "default": ""
          },
          "addressPurpose": {
            "title": "Address purpose",
            "type": "string",
            "description": "NOT USABLE as a filter - the registry accepts it and ignores it (identical rows for any value), so it is rejected rather than charged for. Listed only to explain its absence.",
            "default": ""
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City of any of the provider's addresses, e.g. 'Dallas'. Matched as a whole word - 'Dall' does not match 'Dallas'. Blank uses the run default.",
            "default": ""
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter USPS state code, e.g. 'TX', 'CA', 'NY'. Blank = any state. Cannot stand alone - combine it with a city, ZIP, name, taxonomy or NPI.",
            "default": ""
          },
          "postalCode": {
            "title": "ZIP / postal code",
            "type": "string",
            "description": "5 or 9 digits, e.g. '78701' or '787014211' (a '78701-4211' dash form is normalized). A 5-digit ZIP finds every provider whose stored ZIP starts with it; a 9-digit code matches a ZIP stored at full length. Matches the LOCATION, MAILING or practice-location address.",
            "default": ""
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter ISO country code of the provider's address, e.g. 'CA' for Canada. Leave blank for the US. 'US' cannot stand alone - combine it with another criterion.",
            "default": ""
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "enumerationType",
              "status",
              "gender",
              "soleProprietor",
              "locationState",
              "locationCountryCode",
              "primaryTaxonomyCode",
              "primaryTaxonomyGroup"
            ],
            "type": "string",
            "description": "The dimension the aggregate mode rolls up. The registry has no grouped query, so aggregate scans the first maxResults matching providers and counts them locally.",
            "default": "primaryTaxonomyGroup"
          },
          "maxResults": {
            "title": "Max providers",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of provider records delivered (0 = up to 2000 per run). The registry serves 200 per request and is paged automatically. Each record is metered individually, so there is no per-run charge cap.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}