Added API key and timeout argument support.