Google Custom Search Api keeps giving me “usageLimits” error

ぃ、小莉子 提交于 2019-12-12 16:21:41

问题


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.

In my project's billing settings I see billing enabled. In Enabled Api's I see "Custom Search API".

This is my query:

https://www.googleapis.com/customsearch/v1?cx=(searchenginekey)&q=flower&rights=cc_publicdomain&key=(myprojectkey)

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

I get this:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "keyInvalid",
    "message": "Bad Request"
   }
  ],
  "code": 400,
  "message": "Bad Request"
 }
}

回答1:


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



来源:https://stackoverflow.com/questions/29016847/google-custom-search-api-keeps-giving-me-usagelimits-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!