def get_search_params(url_path):
    """
    From the full url path, this prunes it to just the query section, 
    that starts with 'q=' and ends either at the end of the line of the 
    next found '&'.

    Parameters
    ----------
    url_path : str
        The full url of the request to chop up

    Returns
    -------
    str
        The pruned query string, with any other replaced string
    """
    # Remove the '/search.json' part to get the given options
    query_params = url_path[len('/search.json?'):]

    # Find the 'q=' section, what we care about
    queryPos = query_params.find('q=')
    if queryPos == -1:
        # There's no 'q=' to grab items from, fail
        return []
    query_params = query_params[queryPos+2:]

    # Find the end of the search terms, if not the end of the string
    endPos = query_params.find('&')
    if endPos != -1:
        query_params = query_params[:endPos]

    return query_params