diff --git a/Changes b/Changes
index 46d7fa3..c1db812 100755
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.39 2020-08-25
+0.39 2020-08-28
         - Add information on secret file to Readme.
         - Change default API endpoint to korap.ids-mannheim.de.
         - Fix label for toggle plugins.
@@ -6,6 +6,7 @@
         - Forward 'pipe' parameter to backend.
         - Introduce base css file for plugins.
         - Refactoring of sass files.
+        - Added query form API to plugin server.
 
         WARNING: If you relied on the former default API endpoint
           being http://localhost:9999/, this will break your
diff --git a/dev/js/spec/pluginSpec.js b/dev/js/spec/pluginSpec.js
index 3d20942..c0d741d 100644
--- a/dev/js/spec/pluginSpec.js
+++ b/dev/js/spec/pluginSpec.js
@@ -1,4 +1,4 @@
-define(['plugin/server','plugin/widget','panel', 'panel/query', 'panel/result', 'plugin/service', 'pipe'], function (pluginServerClass, widgetClass, panelClass, queryPanelClass, resultPanelClass, serviceClass, pipeClass) {
+define(['plugin/server','plugin/widget','panel', 'panel/query', 'panel/result', 'plugin/service', 'pipe', 'vc','util'], function (pluginServerClass, widgetClass, panelClass, queryPanelClass, resultPanelClass, serviceClass, pipeClass, vcClass) {
 
   describe('KorAP.Plugin.Server', function () {
 
@@ -290,8 +290,7 @@
     });  
   });
   
-  describe('KorAP.Plugin.ResultPanel', function () {
-    
+  describe('KorAP.Plugin.ResultPanel', function () {    
     it('Plugin is registered second: buttons should be added to panel', function () {
       
       var resultPanel = resultPanelClass.create();
@@ -322,7 +321,7 @@
       // Clean up
       KorAP.Panel['result'] = undefined;
       manager.destroy();
-  });
+    });
     
     it('Plugin is registered first: Buttons should be added to panel and cleared', function () {
       
@@ -360,43 +359,32 @@
   describe('KorAP.Plugin communications', function () {
     it('should receive messages', function () {
       var manager = pluginServerClass.create();
-
       var id = manager.addService('Example 1', 'about:blank');
       expect(id).toMatch(/^id-/);
-
       var temp = KorAP.koralQuery;
       KorAP.koralQuery = { "@type" : "koral:test" };
-
       let data = {
         "originID" : id,
         "action" : "get",
         "key" : "KQ"
       };
-
       manager._receiveMsg({
         "data" : data
       });
-
       manager.destroy();
-
       expect(data.value["@type"]).toEqual("koral:test");
-
       // Recreate initial state
       KorAP.koralQuery = temp;
     });
 
-
     it('should add to pipe', function () {
       var manager = pluginServerClass.create();
-
       var temp = KorAP.Pipe;
       KorAP.Pipe = pipeClass.create();
-
       expect(KorAP.Pipe.toString()).toEqual("");
       
       var id = manager.addService('Example 2', 'about:blank');
       expect(id).toMatch(/^id-/);
-
       manager._receiveMsg({
         "data" : {
           "originID" : id,
@@ -405,9 +393,7 @@
           "service" : "https://pipe-service.de"
         }
       });
-
       expect(KorAP.Pipe.toString()).toEqual("https://pipe-service.de");
-
       manager._receiveMsg({
         "data" : {
           "originID" : id,
@@ -416,9 +402,7 @@
           "service" : "https://pipe-service-2.de"
         }
       });
-
       expect(KorAP.Pipe.toString()).toEqual("https://pipe-service.de,https://pipe-service-2.de");
-
       manager._receiveMsg({
         "data" : {
           "originID" : id,
@@ -427,13 +411,52 @@
           "service" : "https://pipe-service.de"
         }
       });
-
       expect(KorAP.Pipe.toString()).toEqual("https://pipe-service-2.de");
-
       manager.destroy();
-
       // Recreate initial state
       KorAP.Pipe = temp;
     });
+
+    it('should reply to query information requests', function () {
+      var manager = pluginServerClass.create();
+      var id = manager.addService('Service', 'about:blank');
+      expect(id).toMatch(/^id-/);
+      var temp = KorAP.vc;
+      // Create form for query form information
+      let f = document.createElement('form');
+      var qfield = f.addE('input');
+      qfield.setAttribute("id", "q-field");
+      qfield.value = "[orth=Baum]";
+      var qlfield = f.addE('select');
+      qlfield.setAttribute("id", "ql-field");
+      qlfield.addE('option').setAttribute('value', 'cosmas-2');
+      qlfield.addE('option').setAttribute('value', 'poliqarp');
+      qlfield.selectedIndex = 1;
+      
+      KorAP.vc = vcClass.create().fromJson({
+        "key"   : "title",
+        "type"  : "type:regex",
+        "value" : "[^b]ee.+?",
+        "@type" : "koral:doc"
+      });
+      // console.log(KorAP.vc.toQuery());
+      
+      document.body.appendChild(f);
+      let data = {
+        "originID" : id,
+        "action" : "get",
+        "key" : "QueryForm"
+      };
+      manager._receiveMsg({
+        "data" : data
+      });
+      manager.destroy();
+      expect(data.value["q"]).toEqual("[orth=Baum]");
+      expect(data.value["ql"]).toEqual("poliqarp");
+      expect(data.value["cq"]).toEqual("title = /[^b]ee.+?/");
+      // Recreate initial state
+      KorAP.vc = temp;
+      document.body.removeChild(f);
+    });
   });
 });
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index e5578be..7a2d305 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -407,10 +407,29 @@
 
       // Get information from the embedding platform
       case 'get':
+
+        // Get KoralQuery
         if (d.key == 'KQ') {
           if (KorAP.koralQuery !== undefined) {    
             d["value"] = KorAP.koralQuery;
           };
+        }
+
+        // Get Query form information
+        else if (d.key == 'QueryForm') {
+          let doc = document;
+          let v = d["value"] = {};
+
+          var el;
+          if (el = doc.getElementById('q-field')) {
+            v["q"] = el.value;
+          };
+          if (el = doc.getElementById('ql-field')) {
+            v["ql"] = el.value;
+          };
+          if (el = KorAP.vc) {
+            v["cq"] = el.toQuery();
+          };
         };
       };
 
