code: def run_ajax_spider(self, target_url):
          
          self.logger.debug('AJAX Spidering target {0}...'.format(target_url))
  
          self.zap.ajaxSpider.scan(target_url)
  
          while self.zap.ajaxSpider.status == 'running':
              self.logger.debug('AJAX Spider: {0}'.format(self.zap.ajaxSpider.status))
              time.sleep(self._status_check_sleep)
  
          self.logger.debug('AJAX Spider completed')
docs: Run AJAX Spider against a URL.