def create_url_with_query(api_root: str, query: str):
    """
    Combines the root url with the query string
    :param api_root: the root url of the twitter api
    :param query: the query string
    :return: the url to which the request will be made
    """
    tweet_fields = "tweet.fields=id,author_id,text,created_at,public_metrics&expansions=author_id" \
                   "&user.fields=name,username"
    return api_root + f"tweets/search/recent?query={query}&{tweet_fields}"