       params.query = cleaned
       headers = {}
       if _this.apiKey
-        headers['api token'] = _this.apiKey
+        if _this.version == 4
+          authHeaderName = 'api token'
+        else
+          authHeaderName = 'authorization'
+        headers[authHeaderName] = _this.apiKey
+
       _this.params = {}
       _this.filters = {}
       _this.sort = []

      zone = ""
      @apiKey = ""

    @url ?= zone + "-search.doofinder.com"

  ###

    @version ?= 5
    @params = {}
    @filters = {}

    @url ?= address
    # API Key can be two ways:
    # zone-APIKey
