import requests


def id_to_name(x):
    """
    Converts from LittleSis ID number to name. 
    
    Parameters
    ----------
    x : LittleSis ID number
    
    Example
    -------
    >>> id_to_name(96583)
    'Ted Cruz'
    """
    
    path = 'https://littlesis.org/api/entities/{}'.format(x)
    response = requests.get(path)
    response = response.json()
    name = response['data']['attributes']['name']
    return name