首页 > 解决方案 > Why is Bing Custom Search API throwing an error when I make a call through node-js?

问题描述

I was using Bing Custom Search API for the past week with no problems thanks to the free trial, but today, I tried upgrading to the S1 plan, since the API was sending error messages. I tried regenerating the key as well, but despite doing both of these things, I was still getting errors and unable to use the API.

However, I was able to make calls using: https://www.customsearch.ai/applications, where I was able to use my API key to test endpoints and get the results I expected. What baffles me is that my nodejs code which hasn't been modified aside from the subscription key should still work with the upgraded plan, but it doesn't.

标签: microsoft-cognitive

解决方案


我应该可以在这里提供帮助。让我们做一点故障排除:

  1. 首先转到https://www.customsearch.ai/applications -> 单击您的实例名称 -> 单击顶部的“生产”选项卡 -> 通过提供您获得的查询和订阅密钥尝试在此页面上进行 API 调用。如果这有效,请转到下一步。
  2. 在上面提到的页面上,您会看到自定义配置 ID 和订阅密钥。确保这两个在您的 node.js 代码中相同。理想情况下,这应该有效。
  3. 如果它仍然不起作用,请分享您的错误代码,以便我可以更好地了解您遇到的错误。

推荐阅读