Fixed get_api function and function that makes url