title: Google Search response.items.length error
body: <p>EDIT:
  This is the page where you can find all the error stuff:
  <a href="http://google.intellectproductions.com/" rel="nofollow">http://google.intellectproductions.com/</a></p>
  
  <p>I'm using this example for Google Search API:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;JSON/Atom Custom Search API Example&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="content"&gt;&lt;/div&gt;
      &lt;script&gt;
        function hndlr(response) {
        for (var i = 0; i &lt; response.items.length; i++) {
          var item = response.items[i];
          // in production code, item.htmlTitle should have the HTML entities escaped.
          document.getElementById("content").innerHTML += "&lt;br&gt;" + item.htmlTitle;
        }
      }
      &lt;/script&gt;
      &lt;script src="https://www.googleapis.com/customsearch/v1?key=YOUR-KEY&amp;cx=017576662512468239146:omuauf_lfve&amp;q=cars&amp;callback=hndlr"&gt;
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However, that has a flaw in it and I have no idea why.</p>
  
  <p>My script tag url is this:</p>
  
  <pre><code>&lt;script src="https://www.googleapis.com/customsearch/v1?key={{MY KEY}}&amp;cx=012495781369301842149:acs-gv099hu&amp;q=runescape&amp;callback=hndlr"&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>But with both examples it is giving me this error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'length' of undefined 
  </code></pre>
  
  <p>Why would they post something that has an error in it?</p>