import requests


def call_crxcavator_api(api_and_parameters, crxcavator_api_key, crxcavator_base_url):
    """
    Perform the call requested to the CRXcavator API
    :param crxcavator_api_key: The API key to access the CRXcavator service
    :param crxcavator_base_url: The URL for the CRXcavator API
    :param api_and_parameters: Query string for the API including the required parameters
    :return: Returns JSON text blob for the API called. API spec is at https://crxcavator.io/apidocs
    """
    uri = crxcavator_base_url + api_and_parameters
    data = requests.get(
        uri,
        headers={'Accept': 'application/json',
                 'API-Key': crxcavator_api_key})
    # if call failed, use requests library to raise an exception
    data.raise_for_status()
    return data.json()