I've had several requests for the details on the public API (Application Programming Interface) for the D&DI Compendium. Over the next two articles I will cover the basic and advanced methods for accessing the Compendium without using the official UI. First the basics. Any search that can be performed on the Compendium can be represented by a querystring attached to the end of the url. The base url for the search page is www.wizards.com/dndinsider/compendium/da... To do a querystring search you will take the url, add a question mark (?) to the end of it and then a list of parameters in name=value syntax delimited by the ampersand (&). This may sound like a bunch of technobabbly jargon, but I'll explain better below. The response will be the HTML of the page to show in a browser window. There are three primary types of searches that can be done from this page: keyword, view all and filtered. Keyword Search To search by keyword, use the parameter searchterm= followed by the word(s) or phrase you want to search on. By default, the category that has the highest number of results will show up and you will need to click on a different category to see its results. This can be overridden by using the tab= parameter. For value put in the corresponding text based upon which category to bring to front:
| Value | Category |
|---|---|
| races | Race |
| classes | Class |
| powers | Power |
| feats | Feat |
| items | Item |
| skills | Skill |
| rituals | Ritual |
| paths | Paragon Path |
| destinies | Epic Destiny |
| monsters | Monster |
| glossary | Glossary |
| deity | Deity |
Keyword searches can be combined with filtered searches. After the keywords put an ampersand and whatever filters you want as defined below in the filtered search section. View All If you want to get back a page that shows all the results for one particular category, use a view all search. To do this, put in sa= and a number based on a category. If you include the view all parameter in your search, all other parameters will be ignored and only the view all results for the category will be shown. This parameter is therefore meant to be used by itself. The values and corresponding categories are:
| Value | Category |
|---|---|
| 1 | Race |
| 2 | Class |
| 3 | Power |
| 4 | Feat |
| 5 | Item |
| 6 | Skill |
| 7 | Ritual |
| 8 | Paragon Path |
| 9 | Epic Destiny |
| 10 | Monster |
| 11 | Glossary |
| 12 | Deity |
Filtered Search Filtered searches allow you to really refine the details of what you are looking for. Not all categories have filtered searches yet, mainly because there just isn't enough data to necessitate it. To do a filtered search, after defining the searchterm, if any, put in the parameter ff= followed by a number for the category. Note, not all category numbers are the same as the numbers for view all searches (legacy code is always a joy). The values for filtered search categories are:
| Value | Category |
|---|---|
| 4 | Feat |
| 5 | Item |
| 6 | Power |
| 7 | Ritual |
| 8 | Paragon Path |
| 10 | Monster |
| 11 | Glossary |
| 12 | Deity |
Each category has its own set of parameters as shown below:
| Category | Parameter | Definition | Data type |
|---|---|---|---|
| Monster | mcr | Combat Role | string |
| Monster | mgr | Group Role | string |
| Monster | mk | Keywords | string |
| Monster | msb | Source Book | string |
| Monster | xpm | XP Range, low end | number |
| Monster | xpx | XP Range, high end | number |
| Monster | mln | Monster Level, low end | number |
| Monster | mlx | Monster Level, high end | number |
| Item | icat | Category | string |
| Item | isb | Source Book | string |
| Item | icn | Item Cost, low end | number |
| Item | icx | Item Cost, high end | number |
| Item | iem | Item Enhancement, low end | number |
| Item | iex | Item Enhancement, high end | number |
| Item | iln | Item Level, low end | number |
| Item | ilx | Item Level, high end | number |
| Power | pac | Class | string |
| Power | pat | action to use power | string |
| Power | pk | kind of power | string |
| Power | ps | power usage | string |
| Power | psb | Source Book | string |
| Power | pln | Power Level, low end | number |
| Power | plx | Power Level, high end | number |
| Glossary | gc | Category | string |
| Glossary | gt | Type | string |
| Glossary | gs | Source Book | string |
| Feats | ft | Tier of feat | string |
| Feats | fs | Source Book | string |
| Rituals | rks | Key Skill | string |
| Rituals | rs | Source Book | string |
| Rituals | rlm | Ritual Level, low end | number |
| Rituals | rlx | Ritual level, high end | number |
| Rituals | rcm | Ritual Cost, low end | number |
| Rituals | rcx | Ritual Cost, high end | number |
| Paragon Paths | ppc | Class prerequisite | string |
| Paragon Paths | ppr | Race prerequisite | string |
| Paragon Paths | pps | Source Book | string |
| Deities | da | Deity Alignment | string |
| Deities | ds | Source Book | string |
Putting all this together, here are some example querystrings:
- To search for the keyword "orc" enter www.wizards.com/dndinsider/compendium/da...
- To search for the keywords orc and goblin enter www.wizards.com/dndinsider/compendium/da... goblin
- To search for the keywords orc and goblin and show the paragon path tab enter www.wizards.com/dndinsider/compendium/da...
- To view all classes enter www.wizards.com/dndinsider/compendium/da...
- To view all powers enter www.wizards.com/dndinsider/compendium/da...
- To view all fighter powers enter www.wizards.com/dndinsider/compendium/da...
- To view all fighter powers in Martial Power enter www.wizards.com/dndinsider/compendium/da... Power
In part two I will go over calling the web service directly to get the data.










Very interesting, thanks.
NjxtBut the exemple querystrings can't be read or clicked (in Chrome at least).It shows "http://www.wizards.com/dndinsider/compendium/da..." for example and ... the URL is really "http://www.wizards.com/dndinsider/compendium/da..." when clicked)
02:37 AM PST