Skip to content

Commit 81e0d29

Browse files
authored
Updated key/endpoint
Endpoints are not region-based anymore, but rather custom domain -based. Although regional endpoints will still work. Also, the authentication information is moving to a standard of getting it from environment variables.
1 parent 0d20f1e commit 81e0d29

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/Search/BingEntitySearchv7.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os, requests, json
22

3-
subscriptionKey = 'put_your_key_here'
4-
host = ''
3+
# Add your Bing Entity Search subscription key and endpoint to your environment variables.
4+
subscriptionKey = os.environ['BING_ENTITY_SEARCH_SUBSCRIPTION_KEY']
5+
host = os.environ['BING_ENTITY_SEARCH_ENDPOINT']
56
path = ''
67
search_query = ''
78

@@ -73,4 +74,4 @@ def get_suggestions ():
7374
return response.read ()
7475

7576
result = get_suggestions ()
76-
print (json.dumps(json.loads(result), indent=4))
77+
print (json.dumps(json.loads(result), indent=4))

0 commit comments

Comments
 (0)