def _url_search_builder(term, country='US', media='all', entity=None, attribute=None, limit=50):
    """
    Builds the URL to perform the search based on the provided data
    :param term: String. The URL-encoded text string you want to search for. Example: Steven Wilson.
                 The method will take care of spaces so you don't have to.
    :param country: String. The two-letter country code for the store you want to search.
                    For a full list of the codes: http://en.wikipedia.org/wiki/%20ISO_3166-1_alpha-2
    :param media: String. The media type you want to search for. Example: music
    :param entity: String. The type of results you want returned, relative to the specified media type. Example: musicArtist.
                   Full list: musicArtist, musicTrack, album, musicVideo, mix, song
    :param attribute: String. The attribute you want to search for in the stores, relative to the specified media type.
    :param limit: Integer. The number of search results you want the iTunes Store to return.
    :return: The built URL as a string
    """
    built_url = base_search_url + _parse_query(term)
    built_url += ampersand + parameters[1] + country
    built_url += ampersand + parameters[2] + media

    if entity is not None:
        built_url += ampersand + parameters[3] + entity

    if attribute is not None:
        built_url += ampersand + parameters[4] + attribute

    built_url += ampersand + parameters[5] + str(limit)

    return built_url
Builds the URL to perform the search based on the provided data
    :param term: String. The URL-encoded text string you want to search for. Example: Steven Wilson.
                 The method will take care of spaces so you don't have to.
    :param country: String. The two-letter country code for the store you want to search.
                    For a full list of the codes: http://en.wikipedia.org/wiki/%20ISO_3166-1_alpha-2
    :param media: String. The media type you want to search for. Example: music
    :param entity: String. The type of results you want returned, relative to the specified media type. Example: musicArtist.
                   Full list: musicArtist, musicTrack, album, musicVideo, mix, song
    :param attribute: String. The attribute you want to search for in the stores, relative to the specified media type.
    :param limit: Integer. The number of search results you want the iTunes Store to return.
    :return: The built URL as a string