{
  "openapi": "3.0.1",
  "info": {
    "title": "NPI Registry Scraper - NPI Lookup & NPPES Provider Search",
    "description": "Look up NPI numbers in bulk and search the official NPPES NPI Registry by name, specialty and location. Get provider names, specialties, licenses, practice and mailing addresses, phone numbers, other IDs and update dates.",
    "version": "0.2",
    "x-build-id": "KXMph3AlI2GBRnROw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~npi-registry/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-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/s-r~npi-registry/runs": {
      "post": {
        "operationId": "runs-sync-s-r-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/s-r~npi-registry/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-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": {
          "first_name": {
            "title": "First name",
            "type": "string",
            "description": "First name; a trailing * requires at least two leading characters."
          },
          "last_name": {
            "title": "Last name",
            "type": "string",
            "description": "Last name; a trailing * requires at least two leading characters."
          },
          "organization_name": {
            "title": "Organization name",
            "type": "string",
            "description": "Organization name; a trailing * requires at least two leading characters."
          },
          "taxonomy_description": {
            "title": "Taxonomy description",
            "type": "string",
            "description": "Specialty description such as Dentist or Cardiovascular Disease. Taxonomy codes are not accepted."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City matched against the selected address purpose."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter state or territory. Requires another search criterion."
          },
          "postal_code": {
            "title": "Postal code",
            "type": "string",
            "description": "US ZIP (5 or 9 digits) or prefix with a trailing *, such as 752*. Foreign postcodes require country_code."
          },
          "country_code": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter country code. Requires another search criterion."
          },
          "npi_numbers": {
            "title": "Npi numbers",
            "type": "array",
            "description": "NPI numbers as strings, validated with the NPI checksum. Empty values and duplicates are ignored; invalid values produce warnings. Lookups precede search results. max_items also limits this list (default 100); increase it to process the full list.",
            "items": {
              "type": "string"
            }
          },
          "provider_type": {
            "title": "Provider type",
            "enum": [
              "any",
              "individual",
              "organization"
            ],
            "type": "string",
            "description": "Individual (NPI-1), organization (NPI-2), or either type. Applies to search, not explicit NPI lookups.",
            "default": "any"
          },
          "address_purpose": {
            "title": "Address purpose",
            "enum": [
              "any",
              "PRIMARY",
              "SECONDARY",
              "LOCATION",
              "MAILING"
            ],
            "type": "string",
            "description": "any matches any published address, including mailing; PRIMARY restricts to the primary practice address; SECONDARY to secondary practices; LOCATION to either practice; MAILING to mailing.",
            "default": "any"
          },
          "use_first_name_alias": {
            "title": "Use first name alias",
            "type": "boolean",
            "description": "Include first-name aliases in name searches.",
            "default": false
          },
          "max_items": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum unique providers across lookups, searches and cursor requests, including NPI lists (default 100). Unprocessed NPI numbers produce a warning and partial output. Increase this limit to process the full list. Free users receive at most 10 providers.",
            "default": 100
          },
          "split_large_searches": {
            "title": "Split large searches",
            "type": "boolean",
            "description": "Split full searches into US ZIP prefixes to retrieve more than the NPPES 1200-record window. A full exact ZIP remains incomplete and produces a warning.",
            "default": false
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Continuation token from the previous response. Keep all other input values unchanged. Large requests return this token before the request budget expires."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}