Stylistically, this might be better as a constant.  E.g., API_URL.