 ht_query = (ht_id, level = 0) ->
   if ht_id not in QUERIED_IDS['ht']
     QUERIED_IDS['ht'].push ht_id
-    for table_id in HT_IA_TABLE_IDS
-      fusion_tables_query "SELECT ia_identifier,score FROM #{table_id} WHERE ht_identifier = #{fusion_tables_escape(ht_id)}",
-        (data) ->
-          if data.rows?
-            process_ia_id(row[0],(1 - level) * row[1]) for row in data.rows.reverse()
-            if level == 0
-              ia_query(row[0],1) for row in data.rows.reverse()
+    $.ajax "#{API_GATEWAY_URI}/ht-ia/ht/#{encodeURIComponent(ht_id)}",
+      type: 'GET'
+      cache: true
+      dataType: 'json'
+      crossDomain: true
+      error: (jqXHR, textStatus, errorThrown) ->
+        $('#results').append($('<div/>',{class: 'alert alert-danger', role: 'alert'}).text('Error in Book Aligner HT/IA AJAX call.'))
+        console.log errorThrown
+        console.log "AJAX Error: #{textStatus}"
+      success: (data) ->
+        if data.length
+          process_ia_id(result.ia_identifier, (1 - level) * parseInt(result.score)) for result in data
+          if level == 0
+            ia_query(result.ia_identifier,1) for result in data
 
 ht_url = (ht_id) ->
   "https://babel.hathitrust.org/cgi/pt?id=#{ht_id}"

      dataType: 'json'
      crossDomain: true
      error: (jqXHR, textStatus, errorThrown) ->
        $('#results').append($('<div/>',{class: 'alert alert-danger', role: 'alert'}).text("Error in Google Books AJAX call for identifier #{gb_id}"))
        console.log jqXHR
        console.log errorThrown
        console.log "AJAX Error: #{textStatus}"
      success: (data) ->
        console.log "#{identifier_type} query #{identifier} Google Books result:"
        console.log data
        if data and data.items and (data.items.length > 0)
          for item in data.items
            gb_biblio_query(item.id, score)

        console.log errorThrown
        console.log "AJAX Error: #{textStatus}"
      success: (data) ->
        # console.log "#{identifier_type} query #{identifier} Internet Archive result:"
        # console.log data
        if data? and !($.isEmptyObject(data))
          ebooks = _.values(data)[0].ebooks
          if ebooks? and (ebooks.length > 0)
