title: Import.io simple script javascript
body: <p>I am trying to use integrate simple import.io with JavaScript (exemple website)  but the script not working. Can you help me?</p>
  
  <pre><code>  &lt;!DOCTYPE html&gt;   &lt;html&gt; &lt;head&gt;   &lt;title&gt;Import&amp;bull;io
   Example&lt;/title&gt;   &lt;script
   src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
   &lt;!-- 1. Include the client library --&gt;   &lt;script
   src="https://cdn.import.io/js/2.0.0/importio.js"&gt;&lt;/script&gt;
  
   &lt;!-- 2. Configure the library --&gt;   &lt;script type="text/javascript"&gt;
       importio.init({
         "auth": {
          "userGuid": "XXX",
           "apiKey": "XXX"
         },
         "host": "import.io"
       });
  
       // Data and done callbacks
       var dataCallback = function(data) {
         console.log("Data received", data);
         for (var i = 0; i &lt; data.length; i++) {
          var d = data[i];        for (var k in d.data) {
            document.write("&lt;i&gt;" + k + "&lt;/i&gt;: " + d.data[k] + "&lt;br /&gt;");      }       document.write("&lt;hr&gt;");       }
       }
       var doneCallback = function(data) {
         console.log("Done, all data:", data);
         document.write("&lt;b&gt;Done&lt;/b&gt;&lt;hr&gt;");
       }
  
   // 3. Do the query (when the function is called)
       var doQuery = function() {
         // Query for tile Magic Api
         importio.query({
           "connectorGuids": [
             "a362c175-e265-4f96-867c-5610686bbb21"
           ],
           "input": {
             "webpage/url": "http://www.davy.ie/markets-and-share-prices/iseq"
           }
         }, { "data": dataCallback, "done": doneCallback });
       }   &lt;/script&gt;   &lt;body&gt;
       &lt;button onclick="doQuery()"&gt;Query&lt;/button&gt;   &lt;/body&gt; &lt;/html&gt;
  </code></pre>