Page last updated: 14 November 2021 10:22

Diablo 2 API

Welcome to www.diablo-2.net's API.

Currently this API is exposing only the items endpoint. Others will come soon or when appropriate.

Authentication

Authentication is happening via a request header - X-D2API-KEY and with an api key as a value

Currently, as we are in BETA, If you want a key for yourself, you need to contact me personally via the Contact Form but I have left a key for general use:

X-D2API-KEY : 004fabdaa2a38c2a7a2f9df2e886e1a2f093eb64cea418da9b

Limits

The API enforces the following limits (number of requests made to the endpoint):

Daily1000
Total100000

Methods

Depending on the endpoint. Check individual endpoints for methods

Response

Response is in JSON Pretty format and looks like this (query for white normal Colossus Sword):

{ "class": "Paladin", "type": "two-handed sword", "weapon_class": "sword", "damage_bonus": "100 Str", "image_class_d2r": "d2r-two-handed-sword", "image_class_classic": "two-handed-sword", "name": "Colossus Sword", "ethereal": false, "one_hand_damage_min": 26, "one_hand_damage_max": 70, "two_hand_damage_min": 61, "two_hand_damage_max": 121, "max_durability": 50, "required_dexterity": 95, "required_strength": 182, "required_level": 60, "quality_level": 80, "weapon_speed": 10, "weapon_class_speed": "Normal Attack Speed", "weapon_class_speed_1": "Fast Attack Speed (Ass/Pal)", "weapon_class_speed_2": "Normal Attack Speed (Ama/Bar/Dru/Nec/Sor)", "melee_range": 3, "max_sockets": 5, "image": "/images/items/weaponary/two-handed-swords/flamberge.gif", "image_d2r": "/images/d2r/items/weaponary/two-handed-swords/flamberge.webp", "tier": "elite", "unique_version": null, "set_version": null }

Endpoints

Here is how you can use the items API.

GET method request to the endpoint https://www.diablo-2.net/api/items

White Items

Let's say you want to get the stats for white normal Colossus Sword. In this API, Colossus Sword becomes ColossusSword. If you want to recieve a white item the synthax is the following:

https://www.diablo-2.net/api/items?item=ColossusSword&class=Barbarian&level=99
* Make sure that you have the authentication header present

Query parameters

Try the API call. Also i will use the response of the API to build an image and tooltip and visualize the item

Loading...

Unique Items

Let's say you want to get the stats for the unique item - The Gladiator's Bane (Wire Fleece). The synthax is very similar to white items and is this:

The Gladiator's Bane becomes TheGladiatorsBane. So your query parameter will be item=GladiatorsBane

But we need a base item too. In this API the base items are underscored. For example Wire Fleece becomes wire_fleece. If base item is Shako - shako. So in our case, wire_fleece. We need to append another query parameter called base-item and add the value. Example: base-item=wire_fleece

So our entire call will look like this

https://www.diablo-2.net/api/unique-items?item=TheGladiatorsBane&base-item=wire_fleece&class=Barbarian&level=99
* Make sure that you have the authentication header present

Query parameters

I have not restricted the base items :D This means you can try TheGrandFather sacred_armor (not very meaningful) or TyraelsMight quilted_armor, which is a lot of fun :)

Try the API call. Also i will use the response of the API to build an image and tooltip and visualize the item

Loading...

Page link: https://www.diablo-2.net/api/