def create_search_query(parsed_item):
    """Formats the search query into a dictionary for post requests.

    Args:
        parsed_item (dict): Dictionary parsed from raw clipboard text.

    Returns:
        A dictionary with search query parameters.

    """

    search_query_dict = {
        "query": {
            "status": {
                "option": "online"
            },
            "filters": {
                "type_filters":{
                    "filters":{
                        "rarity":{}
                    }
                }
            },
            "stats": [{
                "type": "and",
                "filters": []
            }]
        },
        "sort": {
            "price": "asc"
        }
    }

    if parsed_item["Rarity"] == "Unique":
        search_query_dict["query"]["name"] = parsed_item["name"]

    search_query_dict["query"]["type"] = parsed_item["type"]
    search_query_dict["query"]["filters"]["type_filters"]["filters"]["rarity"]["option"] = parsed_item["Rarity"].lower()
    return search_query_dict