Skip to content

Instantly share code, notes, and snippets.

@kbolt
Created July 11, 2016 23:55
Show Gist options
  • Save kbolt/2b212cb33f22b6785c425be61996c34e to your computer and use it in GitHub Desktop.
Save kbolt/2b212cb33f22b6785c425be61996c34e to your computer and use it in GitHub Desktop.
import requests
import json
import pprint
def bizSearch(query):
api_key = yp_api
url = 'https://api.locu.com/v1_0/venue/search/?api_key=' + api_key
locality = query.replace(' ', '%20')
searchUrl = url + '&locality=' + locality + '&term=pizza'
json_data = requests.get(searchUrl)
data = json_data.json()
for item in data['objects']:
print(item['name'])
bizSearch('Miami')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment