import requests


def get_response(url):
    """Get a response from the API's url."""
    response = requests.get(url)
    if response.status_code != 200:
        raise ValueError(
            f"API response code may be invalid. Code: {response.status_code}")
    return response