{
  "openapi": "3.0.1",
  "info": {
    "title": "Healthcare Provider Intel: NPI, Pharma Payments, Rx",
    "description": "One row per US provider joined across three federal sources: NPPES identity, licence, address and phone, plus CMS Open Payments industry money received and Medicare Part D prescribing volume. 8M+ NPIs. No API key, no proxy.",
    "version": "0.1",
    "x-build-id": "NmVah1XzBSgDgqdF8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~healthcare-provider-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-healthcare-provider-intelligence",
        "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/themineworks~healthcare-provider-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-healthcare-provider-intelligence",
        "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/themineworks~healthcare-provider-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-healthcare-provider-intelligence",
        "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": {
          "specialties": {
            "title": "Specialties",
            "type": "array",
            "description": "NPPES taxonomy descriptions, for example Cardiovascular Disease, Dermatology, Orthopaedic Surgery, Internal Medicine, Nurse Practitioner. Matching is partial, so Cardiology also returns Cardiovascular Disease.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two letter state codes. NPPES rejects a bare state, so this needs a specialty, name, city or postal code alongside it.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Practice city names. Combined with the specialty list to form the search plan.",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Five digit ZIP codes for tight territory targeting.",
            "items": {
              "type": "string"
            }
          },
          "npis": {
            "title": "Specific NPIs",
            "type": "array",
            "description": "Ten digit NPI numbers to enrich directly. Use this to bulk enrich a list you already have. Bypasses the search entirely.",
            "items": {
              "type": "string"
            }
          },
          "lastName": {
            "title": "Last name",
            "type": "string",
            "description": "Provider last name. Wildcards are supported by NPPES, so smit* works."
          },
          "organizationName": {
            "title": "Organization name",
            "type": "string",
            "description": "Organisation name for group practices, hospitals and clinics. Add a trailing asterisk for prefix matching, for example boston medical*, because an exact string matches only an exact name. NPPES also searches former and doing business as names, so some results will look unrelated until you check their other names. Set Provider type to organization when using this."
          },
          "providerType": {
            "title": "Provider type",
            "enum": [
              "individual",
              "organization",
              "both"
            ],
            "type": "string",
            "description": "Individual providers, organisations, or both.",
            "default": "individual"
          },
          "includePayments": {
            "title": "Include industry payments",
            "type": "boolean",
            "description": "Join CMS Open Payments to get how much pharma and device money each provider received, from whom, and for what. Adds one request per provider.",
            "default": true
          },
          "paymentYear": {
            "title": "Payment year",
            "minimum": 2013,
            "maximum": 2030,
            "type": "integer",
            "description": "Which Open Payments programme year to join. The dataset id is resolved live, so if the year is not published yet the newest available year is used and reported in the summary.",
            "default": 2024
          },
          "includePrescribing": {
            "title": "Include Medicare prescribing",
            "type": "boolean",
            "description": "Join CMS Part D Prescriber to get Medicare claim counts, drug cost and beneficiary counts. Adds one request per provider.",
            "default": true
          },
          "industryPaidOnly": {
            "title": "Only providers who received industry payments",
            "type": "boolean",
            "description": "Keep only providers with at least one Open Payments record. Turn this on to build a list of prescribers already engaged with industry.",
            "default": false
          },
          "maxProviders": {
            "title": "Max providers",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on providers for the whole run. This is your main cost and runtime control.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}