credentialBing = 'Basic ' + (':%s' % keyBing).encode('base64')[:-1]
searchString = '%27Xbox+One%27'
top = 20
offset = 0
url = ('https://api.datamarket.azure.com/Bing/Search/Image?' + 
    'Query=%s&$top=%d&$skip=%d&$format=json' % (searchString, top, offset))
request = urllib.request.Request(url)
request.add_header('Authorization', credentialBing)
requestOpener = urllib.request.build_opener()
response = requestOpener.open(request)
results = json.load(response)
Search Bing via Azure API using Python