added sun url to api getter function