Search code examples
google-apigoogle-api-php-clientgoogle-books

Google book Images fetching limit exceed


I am fetching Google Book images through ISBN number. I am using dynamic link which is given here https://developers.google.com/books/docs/dynamic-links According to this, it does not have any limit but it shows me error sometime that limit exceed, please register.

<script>
   function handleResponse(response) {
   for (var i = 0; i < response.items.length; i++) {

     var item = response.items[i];

     var x =item.volumeInfo.imageLinks.smallThumbnail;

     document.getElementById("<?php echo $r?>").src = x;
     if(document.getElementById("<?php echo $r?>").src)
     {  <?php $check=1;?>   }
   }

   }
</script>
<?php if($check==1){?>
<img  id="<?php echo $r?>" border="0" src="img/noimg.png" />
<?php }?>
<?php 
   $rr=$r1['isbn'] ?><?php
   <script src="https://www.googleapis.com/books/v1/volumes?q=isbn:<?php echo $rr ?>&jscmd=viewap&callback=handleResponse"></script>
COPY TO CLIPBOARD   

Solution

  • All Google APIs require that you identify your application. Some of the public APIs like Google Books will let you access them for a short time without identifying yourself but eventually you are going to hit the quota limit.

    You only need to create an API key on the Google Developers console and add a Key parameter to your request and tack on the key you got from the console.

    https://www.googleapis.com/books/v1/volumes?key=[apikey]&q=isbn

    Quota In google developer console where you enabled the books api. check for a tab called quota. It will tell you there how many requests you can make a day and you may be able to request an increase of your quota.