Help with reagent quality from API

I am trying to gather information about items in the auction for an app I am writing. I am needing to gather an items crafting quality.

I have read in another thread that this information needs to be mapped manually but am not sure which endpoint it maps to to get this info. I can not seem to find it in the item endpoint as well as the item search endpoint.

Any help would be greatly appreciated! :slight_smile:

each regent quality has its own item id you would need to look these up your self like on wow head and then map them your self the api does not expose item quality for items or regents

The only workaround I found was looking for the item id on wowhead and then looking for image responsible for adding quality marker to the item picture. all of them end in quality_tierx.png
I converted the xml to json and saved what quality coresponds to what tier.

def get_item_tier(verified_items):
    item_tier_dict = {}
    for item in verified_items:
        item_id = item['wowhead']['item']['@id']
        #xml from wowhead converted to json
        html_tooltip = item['wowhead']['item']['htmlTooltip']

        match = re.search(r'quality-tier(\d+)\.png', html_tooltip)
        if match:
            tier = match.group(1)
            # Add item id and tier to the dictionary
            item_tier_dict[item_id] = f"tier{tier}"
        else:
            # If no tier is found, set the value to None or some default
            item_tier_dict[item_id] = None

    return item_tier_dict
1 Like