title: Using Google Books API to get ISBN from book title and author
body: <p>I have a Google form where people can submit books by author and book title. I would like to use this to retrieve the ISBN.</p>
  <pre><code>function atSubmitForm(e) {
    var formResponses = e.response;
    var itemResponses = formResponses.getItemResponses();
    var bookTitle = itemResponses[0].getResponse(); 
    var authorFirst = itemResponses[1].getResponse(); 
    var authorLast = itemResponses[2].getResponse(); 
   
    var url = &quot;https://www.googleapis.com/books/v1/volumes?q=intitle:\&quot;&quot; + bookTitle + &quot;\&quot; inauthor:\&quot;&quot; + authorFirst + &quot; &quot; + authorLast + &quot;\&quot;&quot; + &quot;&amp;country=CA&quot;;
    var urlEncoded = encodeURI(url);
    var response = UrlFetchApp.fetch(urlEncoded);
    var result = JSON.parse(response);
    var items = result.items;
    
    var item = items[0].volumeInfo;
    for (var i = 0; i &lt; item.industryIdentifiers.length; i++) {
      var id = item.industryIdentifiers[i];
      if (id.type === &quot;ISBN_13&quot;) {
        var isbn = id.identifier;
      } 
    }
  }
  </code></pre>
  <p>This isn't the whole function, obviously, but the ISBN is what's giving me problems.  It doesn't seem to be pulling the information I'm expecting. For example, the book <em>Children of Time</em> by Adrian Tchaikovsky will generate a urlEncoded = <a href="https://www.googleapis.com/books/v1/volumes?q=intitle:%22Children+of+Time%22+inauthor:%22Adrian+Tchaikovsky%22&amp;country=CA" rel="nofollow noreferrer">https://www.googleapis.com/books/v1/volumes?q=intitle:&quot;Children+of+Time&quot;+inauthor:&quot;Adrian+Tchaikovsky&quot;&amp;country=CA</a> and it will return an isbn = 9780316452496. I don't know where this ISBN comes from but it isn't listed on the urlEncoded page.</p>
  <p>Similarly, <em>On the Road</em> by Jack Kerouac generates a urlEncoded = <a href="https://www.googleapis.com/books/v1/volumes?q=intitle:%22On+the+Road%22+inauthor:%22Jack+Kerouac%22&amp;country=CA" rel="nofollow noreferrer">https://www.googleapis.com/books/v1/volumes?q=intitle:&quot;On+the+Road&quot;+inauthor:&quot;Jack+Kerouac&quot;&amp;country=CA</a> and then returns an isbn = 9780142437254, also not found on the previous page (i.e., urlEncoded).</p>
  <p>Why doesn't it pull the first ISBN from these pages, or even from these pages at all?</p>
  <p>Edit: For Tchaikovsky's <em>Children of Time</em> I was expecting isbn = 9781447273318.
  For Kerouac's <em>On the Road</em> I was expecting isbn = 9781101127575</p>