Pet Breeds from the API

Discuss your favorite pet addons and macros.
Post Reply
Jnichel
Posts:3
Joined:December 31st, 2015
Pet Score:10392
Realm:Korialstrasz-us
Contact:
Pet Breeds from the API

Post by Jnichel » February 22nd, 2025, 12:53 pm

Hi,

I've been working with the Blizzard API for my personal WoW helper tool, but I have found no way to get the breed of pets from there. I don't know if this is the right place to ask, but Blizzard has been no help at all. Would you be able to tell me if you get it from the API? I'm not looking for your secrets, but just if that's the way you do it so that I know I'm on the right path. Thank you.

Cysgodi
Posts:2
Joined:December 31st, 1969
Pet Score:9807
Realm:Dalaran-us
Contact:

Re: Pet Breeds from the API

Post by Cysgodi » February 23rd, 2025, 10:34 am

Battle pet breeds aren't "officially" part of the WoW battle pet data, so there aren't any API calls related to them. The only way to determine a pet's breed is by math. If you want to get into the details, the logic in the BattlePetBreedID addon is coded well, so it's easy to read.

Jnichel
Posts:3
Joined:December 31st, 2015
Pet Score:10392
Realm:Korialstrasz-us
Contact:

Re: Pet Breeds from the API

Post by Jnichel » February 23rd, 2025, 1:18 pm

Cysgodi wrote:
February 23rd, 2025, 10:34 am
Battle pet breeds aren't "officially" part of the WoW battle pet data, so there aren't any API calls related to them. The only way to determine a pet's breed is by math. If you want to get into the details, the logic in the BattlePetBreedID addon is coded well, so it's easy to read.
Thank you for the reply. I use BattlePetBreedID in game, so I'll poke around in there. My main concern was getting what breeds are available for a pet. Like Yipper is only available as a H/P breed, but an Abyssal Slitherling is available in multiple breeds (P/P, S/S, P/S, etc). I guess places like here and WoWhead are just getting the info from in the game?

Mutanis
Posts:4
Joined:December 2nd, 2016
Pet Score:12401
Realm:Mannoroth-eu
Contact:

Re: Pet Breeds from the API

Post by Mutanis » March 4th, 2025, 9:07 am

Cysgodi wrote:
February 23rd, 2025, 10:34 am
Battle pet breeds aren't "officially" part of the WoW battle pet data, so there aren't any API calls related to them. The only way to determine a pet's breed is by math. If you want to get into the details, the logic in the BattlePetBreedID addon is coded well, so it's easy to read.
That's actually not correct. Breeds are part of WoW. unfortunately they are not provided in the game API. However you can obtain them through the profile API. This is how Xu-Fu, Wowhead, and I guess WarcraftPets too, are getting them.

But it's correct that you can calculate the breed if you have the base stats and the in-game values (health, power, speed, quality, level, and wild status).

Cysgodi
Posts:2
Joined:December 31st, 1969
Pet Score:9807
Realm:Dalaran-us
Contact:

Re: Pet Breeds from the API

Post by Cysgodi » March 9th, 2025, 1:57 pm

Oh neat! I must not have dug deep enough into the Blizzard API docs to find it, so I assumed that it was hidden like in the in-game APIs. Thanks for the correction!

Jnichel
Posts:3
Joined:December 31st, 2015
Pet Score:10392
Realm:Korialstrasz-us
Contact:

Re: Pet Breeds from the API

Post by Jnichel » March 24th, 2025, 12:57 am

Mutanis wrote:
March 4th, 2025, 9:07 am
Cysgodi wrote:
February 23rd, 2025, 10:34 am
Battle pet breeds aren't "officially" part of the WoW battle pet data, so there aren't any API calls related to them. The only way to determine a pet's breed is by math. If you want to get into the details, the logic in the BattlePetBreedID addon is coded well, so it's easy to read.
That's actually not correct. Breeds are part of WoW. unfortunately they are not provided in the game API. However you can obtain them through the profile API. This is how Xu-Fu, Wowhead, and I guess WarcraftPets too, are getting them.

But it's correct that you can calculate the breed if you have the base stats and the in-game values (health, power, speed, quality, level, and wild status).
Mutanis, thank you for the reply. Which profile endpoint will give me that data? I tried Profile -> Character Pets Collection Summary and that will give me the breed id, but only for pets I've collected on my account. Example, the data returned will tell me that I have an H/B version of the Antoran Bilescourge, but that's it; it doesn't show me all the other possible breeds for that pet. Profile -> Account Pets Collection Summary returns the same data as the pet collection summary, but I don't have to pass realm and character name (I guess this was needed back when battle pets were character specific).

Basically, I'm trying to build a tool for myself that I can easily search (like this site), but I want it to spit out the 3 breeds I want (I have to have 3 battle pets of every pet to satisfy my OCD) to where I can search by pet or zone. Like if I'm currently in The Storm Peaks in Northred, I can select that zone and it will spit out a list of pets in that zone and show me only the breeds that I'm missing based on what breed I would want (that I can program in). This is the part I can't do on a site like this.

Post Reply