import requests


def api_query(data_code, params):
    """
    Retrieves a query from the World Bank Data API.

    Args:
        data_code: (str) World Bank reference code for data source.
        params: (dict) Query parameters.
    Returns:
        json object.
    """
    link = 'https://api.worldbank.org/v2/en/country/all/indicator/'
    r = requests.get(link + data_code, params=params)
    return r.json()