import requests


def get_node(name, api_url, headers, validate_certs=True):
    """Returns a dict containing API results for the node if found.

    Returns None if not just one node is found
    """
    url = "{}/v3/nodes?name={}".format(api_url, name)
    node_search = requests.get(url, headers=headers, verify=validate_certs)
    if node_search.json()['pagination']['total'] > 1 or node_search.json()['pagination']['total'] == 0:
        return None
    return node_search.json()['data'][0]