问题描述
我最近在Google的自定义搜索Api"上注册了密钥.我已达到每日上限,因此注册了计费功能以启用更多请求.但是,我一直收到"usageLimit"错误.
I recently signed up for a key with Google's Custom Search Api. I reached the daily limit so signed up for billing to enable more requests. However, I keep getting the "usageLimit" error.
在我的项目的结算设置中,我看到启用了结算.在启用的Api"中,我看到自定义搜索API".
In my project's billing settings I see billing enabled. In Enabled Api's I see "Custom Search API".
这是我的查询:
https://www.googleapis.com/customsearch/v1?cx=(searchenginekey)&q=flower&rights=cc_publicdomain&key=(myprojectkey)
我做错了什么?即使当我在资源管理器中对其进行测试时, http://developers.google.com/apis-explorer/?hl=zh_CN#p/customsearch/v1/search.cse.list
What am I doing wrong?Even when I test it in the explorer http://developers.google.com/apis-explorer/?hl=en_US#p/customsearch/v1/search.cse.list
我明白了:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "keyInvalid",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
推荐答案
我误解了API密钥是什么.在这里回答: https://developers.google.com/custom- search/json-api/v1/introduction#identify_your_application_to_google_with_api_key
I misunderstood what the API key was. Answer here: https://developers.google.com/custom-search/json-api/v1/introduction#identify_your_application_to_google_with_api_key
这篇关于Google自定义搜索Api不断向我提供"usageLimits"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!