Google书籍API和API密钥的重要性 [英] Google books API and the neccesity of an API key

查看:97
本文介绍了Google书籍API和API密钥的重要性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,Google声称为了使用他们的Google Books Api,您必须注册并获取API密钥。但是你可以在没有API密钥的情况下提出请求。

例如:

https://www.googleapis.com/books/v1/volumes?q=isbn:9780553819229



如果我可以在没有密钥的情况下发出请求,我为什么要注册?我不明白。

一个API密钥,API请求不会被扼杀。



不使用API​​密钥,您将更快地得到以下错误:

  {
error:{
errors:[
{
domain: usageLimits,
reason:userRateLimitExceededUnreg,
message:用户速率超出限制,请注册,
extendedHelp:https:// code。 google.com/apis/console
}
],
code:403,
message:用户比率超出限制,请注册
}
}


So Google claims that in order to use their Google Books Api, you have to register and get an API key. But you can make a request without an api key.

e.g.:

https://www.googleapis.com/books/v1/volumes?q=isbn:9780553819229

Why would I register if I can make requests without a key? I don't get it.

解决方案

Along with the Terms of Use mentioned by Will, the biggest reason is that when you use an API key, the API request isn't throttled as much.

You'll get the following error much quicker without using the API key:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "userRateLimitExceededUnreg",
    "message": "User Rate Limit Exceeded. Please sign up",
    "extendedHelp": "https://code.google.com/apis/console"
   }
  ],
  "code": 403,
  "message": "User Rate Limit Exceeded. Please sign up"
 }
}

这篇关于Google书籍API和API密钥的重要性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆