def get_census_params(variable_ids, county_level=False):
    """Gets census url params to make an API call.

    variable_ids: The ids of the variables to request. Automatically includes
        NAME.
    county_level: Whether to request at the county level, or the state level."""
    keys = variable_ids.copy()
    keys.append("NAME")
    params = {"get": ",".join(keys)}
    params["for"] = "county:*" if county_level else "state:*"
    return params