getting back the proper URL from API