Skip to content

Instantly share code, notes, and snippets.

View vanwars's full-sized avatar

Sarah vanwars

  • UC Berkeley School of Information
View GitHub Profile
print('hello world!')
{"businesses": [{"id": "7Lv-EVQZ-ZxQO-zKzMXoqQ", "alias": "chocolate-shoppe-ice-cream-skokie-2", "name": "Chocolate Shoppe Ice Cream", "image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/wuHuWZk09QrgKSgN9rr7jw/o.jpg", "is_closed": false, "url": "https://www.yelp.com/biz/chocolate-shoppe-ice-cream-skokie-2?adjust_creative=9k71bqKa01jQrg_YkTuweA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=9k71bqKa01jQrg_YkTuweA", "review_count": 58, "categories": [{"alias": "icecream", "title": "Ice Cream & Frozen Yogurt"}], "rating": 5.0, "coordinates": {"latitude": 42.0404581933413, "longitude": -87.7294532038701}, "transaction s": ["delivery", "pickup"], "price": "$", "location": {"address1": "4041 Dempster St", "address2": "", "address3": "", "city": "Skokie", "zip_code": "60076", "country": "US", "state": "IL", "display_address": ["4041 Dempster St", "Skokie, IL 60076"]}, "phone": "+18476742900", "display_phone": "(847) 674-2900", "distance": 2882.1194006529363}, {"id": "fwaQgDduHk3uF-I6e9
import json
import urllib.request
my_title = 'Child'
my_description = 'metal'
requestURL = 'https://www.saferproducts.gov/RestWebServices/Recall?Title={title}&RecallDescription={description}&format=json'.format(
title=my_title, description=my_description
)
print('Retrieving data from...', requestURL)