add api key to query string if necessary