       jobId = paths[2]
       if paths[3] == 'event'
         return @handleEventRequest jobId, request, response
+      else if paths[3] == 'data'
+        return @handleDataRequest jobId, request, response
       else
         return response.end()
     else
       return response.end()
+
+  handleDataRequest: (jobId, request, response) ->
+    console.log "#{request.method} #{jobId}" if @options.verbose
+    job = @jobs[jobId]
+    if not job
+      # multiple callbacks for same id, or wrong id
+      debug 'could not find solve job', jobId
+      return
+
+    response.writeHead 200, {"Content-Type": "application/json; charset=utf-8"}
+    body = JSON.stringify { input: job.page, options: job.options }
+    response.end body
 
   handleSolveRequest: (jobId, request, response) ->
     console.log "#{request.method} #{jobId}" if @options.verbose

      #{scriptTags}
      <script>#{library}</script>
      <script src="#{filter}"></script>
      <script id="poly-input-data" type="application/json"><!--#{json}--></script>
    </head>
    <body>
      <script>#{script}</script>

  };
  var main = function() {
    console.log('poly: main start');

    getData(function(err, data) {
      console.log('poly: starting solving');
      window.jsJobRun(data.input, data.options, cb);
      console.log('poly: started');
    });
  };
  window.onload = main;
//  main();
  """

  scriptTags = ("<script>#{s}</script>" for s in options.scripts).join("\n")
  body = """<!DOCTYPE html>
