import requests


def query_to_json(query):
    """Query with requests and return response as json

    Parameters
    ----------
    query : string
        query

    Returns
    -------
    json
        response

    """
    return requests.get(query).json()