Added the api_key as a configurable parameter.