added fuction get_url() to dynamically build the API URL