refactored api_get_request