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
doctors
key containing a list of matching providers andnextPage
indicating if more results are available.
advanced_results = scraper.search_providers(query="John Doe", state="CA", specialty="Pediatrics")
print(search_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
doctors
key containing a list of matching doctors andnextPage
indicating if more results are available.
advanced_results = scraper.search_doctors(school="Harvard Medical School", organization="Healthcare Org")
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
File details
Details for the file opennpi-scraper-0.1.0.tar.gz
.
File metadata
- Download URL: opennpi-scraper-0.1.0.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 | 2712d10193778bcccbdff48179e0c5ef1447888b3baca728b1ae99ece06e80e9 |
|
MD5 | 23e79f5f699c27e40d3bcbd4048c0e45 |
|
BLAKE2b-256 | 08a73392cb7d23778930b970e274266f801306ccf3101ff9f5e919e6dd8181be |
File details
Details for the file opennpi_scraper-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: opennpi_scraper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 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 | 6c70eaad1adacea7f05e0cd6bf45afcf05d8aa8880e77a09648a4eb4d75b3c68 |
|
MD5 | 5accd9a70ee4d955dc9cce319aed20c3 |
|
BLAKE2b-256 | 4952268ed3c389c1bbc2363a5a773c151f7ed794b86cda17c852977b265b101b |