Last active
May 5, 2023 04:08
-
-
Save lordjabez/78758db3342df0fec7029801ce3d1531 to your computer and use it in GitHub Desktop.
Query the Scripps physician API to find available doctors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
url = 'https://www.scripps.org/physicians.json' | |
params = { | |
'api': 'provider_search', | |
'location': 'location-61-scripps-clinic-rancho-bernardo', | |
'skill': 'synonym-1-primary-care', | |
'age_group': 'adults', | |
'gender': 'male', | |
'new_patient': 'true', | |
} | |
def lambda_handler(event, context): | |
response = requests.get(url, params=params) | |
doctors = response.json()['results'] | |
print(json.dumps({'count': len(doctors)})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment