添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Bing's SearchAPI is not working. What should I do? I would appreciate it if you could provide guidance.

Programming language : Python

API : Bing Search API

Reference: https://github.com/microsoft/bing-search-sdk-for-python/blob/main/samples/rest/BingWebSearchV7.py

Type of error: KeyError

@悠暉 山本 Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

I tried executing the same sample mentioned here:
https://github.com/microsoft/bing-search-sdk-for-python/blob/main/samples/rest/BingWebSearchV7.py
It worked fine and I got a successful response from the Bing Search API endpoint.
Please ensure that you have entered your key and endpoint details correctly as shown below and check if that helps.

# Add your Bing Search V7 subscription key and endpoint to your environment variables.
subscription_key = "aae3XXXXXXXXXXfe1c31"
endpoint = "https://api.bing.microsoft.com" + "/v7.0/search"

If you have any follow-up questions, please let me know. I would be happy to help.