I'm following the quickstart code here: https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/quickstarts/client-libraries?pivots=programming-language-python
I'm using a Bing Resource with the Free Tier.
The endpoint I'm using is https://api.bing.microsoft.com/
When I hit web_data = client.web.search(query="Yosemite"), I receive the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yohanjo/anaconda/lib/python3.8/site-packages/azure/cognitiveservices/search/websearch/operations/_web_operations.py", line 371, in search
raise models.ErrorResponseException(self._deserialize, response)
azure.cognitiveservices.search.websearch.models._models_py3.ErrorResponseException: Operation returned an invalid status code 'Resource Not Found'
I also tried creating a Cognitive Services resource and running the same code.
Now the endpoint is https://yjosms-test1.cognitiveservices.azure.com/ with the eastus region.
I'm getting the following error now:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yohanjo/anaconda/lib/python3.8/site-packages/azure/cognitiveservices/search/websearch/operations/_web_operations.py", line 371, in search
raise models.ErrorResponseException(self._deserialize, response)
azure.cognitiveservices.search.websearch.models._models_py3.ErrorResponseException: Operation returned an invalid status code 'Forbidden'
I'm not located in the US physically, though, if that is relevant at all.
Why am I getting these errors and how to solve the issue?