import requests


def request_json(year:int, dataset_name:list, dataset_info:str) -> dict:
    """
    Gets variables, geography, groups, or examples for any dataset.

    input args:
        - year = int; the year that the dataset is from
        - dataset_name = list; th estring path that corresponds to a dataset
        - dataset_info = str; the json page to get for a dataset.

    returns dict
    """
    base_url = "https://api.census.gov/data/"
    query_url = f"{base_url}{year}/{'/'.join(dataset_name)}/{dataset_info}.json"

    results = requests.get(query_url)
    return results.json()