Classic Wow API Not returning Item Stats

I’ve looked through the documentation, and been working on a project for school. I only know some front end. My goal is to have a light-weight Wowhead-like website where users can search for items.

However, looking through all of the item APIs I am not able to find the item attributes such as agility, strength, etc. Is this something I would have to manually put in a database to query?

I’ve figured out how to parse the API Data to display the icon and the name. However I am also having the problem that since the image and name are separate get requests, I can’t put the image to the left of the item like I want, it’s currently displaying below.

Yeah, that’s weird. The retail endpoint at /data/wow/item/22669?namespace=static-us has stats, but the classic endpoint at /data/wow/item/22669?namespace=static-classic-us does not. Boo.

Thank you for confirming for me as I am new to using APIs. If I wanted to restrict my project to only making Classic Wow Items searchable, how would I go about this?

Is there a way to make the items not display if their ID is higher than a certain number? I tried this by adding [,23000] to the right of the str= , but this seems to not be working.

I guess you could use the item search endpoint for the retail version and apply the range feature to limit some results. Just keep in mind the classic is not 100% vanilla, some items like the wow token and some seasonal/promotional items have higher IDs.
Also keep in mind some item descriptions/stats (or any data in general) will not match the classic version.

This sample request will limit the response to include items with id between 1 and 1000:[1,1000]&orderby=id&_page=1&access_token=

A few important notes about this approach:

  • The response payload is capped at 1000 items, no matter if you request 1 page with 1000 or 10 pages with 100 items.
  • In order to get the next 1000 items you have to request the next range id=[1001,2000], id=[2001,3000] and so on.
  • There are some gaps between item ids, so it is possible you’ll receive less than 1000 items in the response

Ideally you would create a back-end for your app and cache all items in a local database, but I guess this will get you close enough for a school project.

Edit: Since the search endpoint does not return stats you might just use the classic version and fetch the item data from retail. If you want to display useful data you’ll have to perform multiple requests anyway.

Thank you very much :slight_smile: I greatly appreciate your assistance with this, you are a life saver!