The `opennpi-scraper` is designed for seamless interaction with the opennpi.com page
Project description
openNPI Scraper
Introduction
The opennpi-scraper Python package enables efficient access to the OpenNPI database, facilitating detailed queries on healthcare providers and offering a streamlined interface for extracting National Provider Identifier (NPI) records. This tool is invaluable for healthcare research and data analysis, offering advanced search capabilities and detailed information retrieval.
Features
- Advanced Search Functionality: Perform detailed searches using a variety of filters such as name, specialty, and location.
- Detailed Information Retrieval: Access comprehensive details about individual healthcare providers and doctors.
- User-Friendly Interface: Simplifies the extraction process with an easy-to-use API, designed for developers and researchers alike.
Installation
To install opennpi-scraper, run the following command in your terminal:
pip install opennpi-scraper
Usage
Importing the Module
Start by importing the openNPI class from the opennpi package:
from opennpi import openNPI
Creating an Instance
Create an instance of the openNPI class:
scraper = openNPI.Scraper()
Fetching Details
Retrieve detailed information about healthcare providers and doctors by their NPI numbers.
Providers
provider_info = scraper.get_provider_detail(NPI="1629848031")
print(provider_info)
Doctors
doctor_info = scraper.get_doctor_detail(NPI="8224486550")
print(doctor_info)
Returns:
- A dictionary with the provider's or doctor's name and additional details extracted from their respective pages.
Search
Conduct searches for healthcare providers or doctors based on specific criteria.
Providers Search Parameters
| Parameter | Type | Description |
|---|---|---|
| query | str | General search term. |
| taxonomy | str | Filter by the provider's specialty. |
| state | str | State abbreviation. |
| city | str | City name. |
| zip | str | Postal code. |
| page | int | Page number of results to query. |
Returns:
- A dictionary with
doctorskey containing a list of matching providers andnextPageindicating if more results are available.
advanced_results = scraper.search_providers(query="John Doe", state="CA")
print(advanced_results)
Doctors Search Parameters
| Parameter | Type | Description |
|---|---|---|
| query | str | General search term. |
| specialty | str | Medical specialty of the doctor. |
| school | str | Medical school or university of the doctor. |
| organization | str | Organization or medical practice the doctor belongs to. |
| state | str | State abbreviation. |
| city | str | City name. |
| zip | str | Postal code. |
| page | int | Page number of results to query. |
Returns:
- A dictionary with
doctorskey containing a list of matching doctors andnextPageindicating if more results are available.
advanced_results = scraper.search_doctors(school="Wayne State University School of Medicine", state = 'MI')
print(advanced_results)
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opennpi-scraper-0.1.1.tar.gz.
File metadata
- Download URL: opennpi-scraper-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e904036f516dd75bc1f09eb76376eec73a767e8d77c43b1b36a81877e94e1da8
|
|
| MD5 |
4bb9c723dfd09cd26a92fb3623cb976b
|
|
| BLAKE2b-256 |
0932093ca4bd65a4d8e666be460603a72388d237ffe36ff1d5cab51fbaf9ec74
|
File details
Details for the file opennpi_scraper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: opennpi_scraper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1d2649593e4d17b5df9a3ea0f672748f331673ad0ac341a9d2564b7b7b55107
|
|
| MD5 |
c40bb4af1eaeee7cf141e0b39d8860a4
|
|
| BLAKE2b-256 |
c92751cd0957b88668dec27e3140680b983c4899aaf0796d66ca99a8f5f4479c
|