Blizzard Entertainment offers players a sneak peek into the Diablo III API for fansites. In addition, there’s a Q&A from fans and developers after the preview was posted.
With the release of Diablo 3, we are working hard to make career and hero profiles available to the community. With career and hero profiles, we are excited to also release a set of API resources specific to Diablo 3 for community fansites and developers to consume. I’d like to take this opportunity to give a preview of the progress we’ve made to the community and open up discussions around what data will be available.
Please keep in mind that this is an early preview and there will likely be many changes to the D3 API by the time it is released. Also note that we haven’t finalized several key pieces of information including artisan recipes, hero and follower spells and powers and achievements.
Career Profile
The career profile API provides top level (account) career information. This API resource is meant to provide a way to discover the heroes associated with an account as well as the artisan and game progression information for the account. To use the career profile API resource, a URL containing a battletag is crafted and a request is made. An example request for the Battletag “Straton#1” would be:
/api/d3/account/Straton/1
The following data structure is then returned:
{
"account": "Straton#1",
"heroes": [182, 183, 184, 185, 186],
"artisan": [{
"slug": "Blacksmith",
"level": 3,
"step": { "current": 4, "max": 5 }
},{
"slug": "Jeweler",
"level": 1,
"step": { "current": 0, "max": 1 }
}],
"progression": [{
"act": 1,
"difficulty": 0
},{
"act": 2,
"difficulty": -1
},{
"act": 3,
"difficulty": -1
},{
"act": 4,
"difficulty": -1
}],
"kills": {
"monsters": 4280,
"elites": 241,
"hardcore_monsters": 0
},
"time-played": {
"barbarian": 1.0,
"demon-hunter": 0.6,
"monk": 0.3,
"witch-doctor": 0.1,
"wizard": 0.0
},
"last_modified ": 1666805944000,
}
As you can see, there are several account specific data points to reference. The heroes attribute contains a list of all of the active heroes for the account. This list does not include fallen heroes. The artisans dataset includes a list of the artisans and the id, label, level and progression of each. Next are several progression attributes that can be used to determine the highest difficulty boss for each act. Last are several stats on the number of monsters and elites killed.
Hero Profile API
Hero profile API resources provide hero specific information including basic information like the name, class, gender and level as well as more complex information like follower information, hero statistics, active skills/powers and items. Unlike the career profile API resource, a hero id is used to craft a URL instead of a battletag. An example for hero 182 would be:
/api/d3/hero/182
The following data structure is then returned:
{
"id": 182,
"name": "Yharr",
"hardcore": false,
"hero_class": 1,
"level": 21,
"gender": 0,
"create_time": 1351949944,
"update_time": 1666805944,
"hireling": [{
"hireling_class": 1,
"level": 18
}, {
"hireling_class": 2,
"level": 20,
"active": true
}],
"skills": {
"active": [{
"slug": "barbarian-overpower",
"name": "Overpower",
"icon": "https://us.media.blizzard.com/d3/icons/skills/64/barbarian_overpower.png",
"rune": { "type": 5, "name": "Revel" }
}],
"passive": [{
"slug": "barbarian-brawler",
"name": "Brawler",
"icon": " https://us.media.blizzard.com/d3/icons/skills/64/barbarian_passive_brawler.png"
}]
},
"elites_killed": 241,
"attributes": {
"life": 1510,
"dps": 58.8255,
"armor": 345,
"strength": 129,
"dexterity": 43,
"intelligence": 50,
"vitality": 139,
"resist_arcane": 0,
"resist_fire": 0,
"resist_lightning": 0,
"resist_poison": 0,
"resist_cold": 0,
"crit_chance": 0.08,
"damage_reduction": 0.333756,
"magic-find": 15,
"gold-find": 14
}
}
The first set of information provided includes the name, level and class information. Following that is a list of the hirelings the hero has unlocked. Lastly, a block of statistics is returned that includes stats, resistances and kills.
Q&A
Will the AH have API access in a similar manner to WoW?
- There are no plans to create an AH API (even read-only) for gold, hardcore gold or real money.
What about achievements?
- We do plan on providing all achievement information much like we do with the WoW API. The difference being that achievements are account bound.
How will the request limits work? Is the “~3000” requests per day going to be shared between the D3 API and the WoW API?
- The same as with the WoW API. The requests per-day limits will be shared between the APIs as most fansites and applications are game specific (with a few exceptions).
Will you be implementing an API that is similar to the realm status API for WoW?
- Yes. We will have an API resource that provides the status data as we do on https://us.battle.net/d3/en/status .
Any plans for a search API? Any way we could crawl for accounts to do aggregate statistics?
- We haven’t really come up with a good way to provide an index that doesn’t compromise privacy or data that we don’t want to expose. This is something we are thinking about though.
Any plans for giving us information about quest completion? Like how long it took them to clear a quest, perhaps including historical data if they’ve done a quest multiple times, and including party members involved in the kill?
- I believe that some of this information will or should be available with achievement data and statistics. I don’t believe that we have the ability to support multiple data sets like how many times you’ve completed a given quest or how long it took. It is something we can look into further, but will be lower in priority.
What about events like “Killed Belial (Inferno) on
- This data will also likely be made available with achievement data and statistics. Again, the information that I believe we can provide is the first instance of said kills.
It seems as if thus far, we’ll have the following: Career Profile API, Hero Profile API, Achievement API, Realm Status API, possible Search API. What about an Item API, Quest API, and just generic Data API (for classes, followers, achievement structure, item classes, etc)? Also, how come this wasn’t posted on the D3 Forums at all? I understand this is just a preview, but there are Diablo III fan-devs out there that cannot comment on this thread
- A lot of the data APIs are still being worked out, but we are confident that we can provide some basic API resources for quests, classes, artisans, recipes, achievements and skills.
As for why this is on the WoW developer forum, that was just timing. I’m hesitant to create an entire forum and rev up that machine before the D3 API is actually ready for release. When we get closer to launch, I’ll create a forum and update public documentation.
Exposing raw time played to the world at large makes me uncomfortable personally. If it’s a percentage of total time played split amongst classes as Delritha is suggesting, it would not bother me though. Could we get a clarification on which it is?
- What part of the API example or previous questions and responses is confusing? I’m not sure what your question actually is.
I suggested that it was percent based time played (1.0 = 100%, .6 = 60%, etc), but some people are thinking it’s actual time played.
- Yes, to confirm what Delritha is saying, we are not planning on exposing raw play time information, but rather percentages to allow websites to determine what class is played the most.
It would be great if the Hero API included the Player ID in it so you could reference it back.
- That would lead to a degree of data-mining that I am not comfortable with.
Somewhat off topic, but what does that mean for linking characters to a player’s BattleTag via the WoW API when support is added? It would be amazing to be able to filter out alts in data.
- We’ll cross that bridge when we get there.
Could we get a percentage of total time played for each hero in the Hero API? I could see wanting to know that I have played my barbarian the most, but that I have played one of the two barbarians I have more then the other.
- Although it may be available somewhere, the only information we currently have readily available to use is the aggregate class information. For what it is worth, adding hero play time is something we’d like to do.
Are there any plans to allow battle.net Chat to an external client?
- Chaud is correct, we have no plans to provide API resources that require authentication or request scope.
Is it possible to keep the server status page up to date? I have an Android app sc*##!*% that page until an API is available and I’m finding that the server status page is very often out of date. Its especially frustrating to have users one starring my app and leaving bad reviews because of this. The users don’t realize its an issue on your end and blame the messenger. Can you offer any insight as to why that page is often not correct? My app aside that page should be accurate anyway or there is no point to its existence.
- the HTML of the D3 server status page is strictly prohibited.
With regards to the item API I’d really love to have access to:
– equipped items
– items in inventory
– items in storage
Don’t know if it makes sense to add this information to the hero/career API since that would be quite some overhead and not everyone is looking for that information. I’d prefer to have 3 separate calls where you pass the hero/account ID. Would love to hear your feedback!
- We are not planning on exposing the items in your account stash or inventory.
It was a great hassle to give my feedback on this topic. Please post it on the D3 forums.
- We aren’t ready to spin up an entire developer community forum on the D3 game site quite yet. Creating a preview thread here, where it has been requested and discussed before, made the most sense.
Would it be possible to get time played for each character instead of having it be a ratio? possibly when doing a request to the hero api?
- That isn’t something we are planning on supporting at this time.
There are no timestamps for progression. Can you please provide timestamps for each milestone in progression?
- We aren’t able to provide that information at this time.
Did I miss anything about image renders of Diablo characters?
- No, we aren’t able to support character renders at this time. Sorry.
Also please consider adding official talent calculator hash in the hero API skills so we can link to the official talent calculator for builds.
- This is something that we plan on providing.
Is the career profile API the only source for the hero ids or will it be possible to get the id via battle.net Armory or even ingame?
- Right now, the only way to get hero ids will be through the career API resource. As far as I can tell, there are no ids provided in-game or through any other battle.net services.
Could you please add the icon for runes and the id for skills and runes?
- If this wasn’t included in the original preview data structure then it was a simple oversight.
It is nice to get the (localized?) artisan slug, but what’s about the id?
- We are in the process of evaluating localized data vs non-localized data. We will expose what makes the most sense.
If the icon will contain the full URL, would you mind to update the icon values for the WoW API?
- I believe this is already on the backlog, although I have no idea when it’ll get resourced. Maybe around MoP.
The returned array keys are not consistent. For the WoW API you used lower camel case and now you use a mix of dashes and underscores to join words. Example: “last_modified” should be “lastModified”.
- We are in the process of switching to a more consistant naming scheme for the attributes in our data structures. And again, this is very early in the process so attribute names haven’t been scrubbed or cleaned up.
If both APIs share the same request limit, am I correct if I assume that they also share the same error handling?
- That is correct. I could go more into the larger API changes that we’d like to make, but perhaps in another post.
No item information from the stash or inventory? That was the most useful thing possible with this in my opinion, D3 is all about items after all. Sad to hear it’s not even on the table for consideration.
- How could the items in your inventory or stash be less useful than the items your heroes are wearing and wielding?
I just would find being able to see them very useful. As an example: I generally know what I’m wearing and have an idea on what my friends are. But maybe they have a sword they plan on using next level and I don’t need to hang onto one I found I think may be an upgrade for them, but turns out it isn’t.
Or maybe they have something just taking up space I want.
Or for that matter just being able to see my stash/inventory of my own characters out of game would be awesome.
- I’ll make a note to bring it up with the team and have a discussion around it. Generally, things that are “private” in-game are also private on the web. I can inspect your hero in-game, thus we justify having profile pages outside of the game. I can’t look in your stash or inventory, or see the amount of gold you have, thus we generally don’t make that available through the website or API. If there is a good argument for changing that, then it is something we can look at doing. With that said, I don’t think there are any compelling reasons to change the visibility of that data. — source
My son is awaiting for this game, he will be happy to play again.