A large portion of relevant modules/templates have now been switched to cargo. Various usages of SMW throughout the wiki need to be replaced by the new functions, in particular item tables. If some pages do not show up but contain no errors, please null-edit them. To see how you can help with the port check out Path_of_Exile_Wiki:To-do_list/SMW_migration (and leave a comment on the talk page if you have questions).

Path of Exile Wiki:Data query API

From Path of Exile Wiki
Jump to: navigation, search

Overview

Just like other wikis the Path of Exile wiki can be accessed through the Mediawiki API. This allows for much faster page editing as well as data retrieval.

In addition the Semantic Mediawiki API can be used to execute powerful queries and retrieve properties from pages.

Using the API to retrieve Path of Exile data

If you need certain data such as item or mod data for your tools it is highly advised to use the semantic API to retrieve it. It will be much faster then scraping the wiki pages and reduce the overhead significantly on both your script and the wiki server.

When using properties, it's advisable to check the documentation of the module or template that adds them or the page of the property. You can also check the list of all properties for some information. There's also Special:Browse where it is possible to see what properties a page have.

Items

All items on the wiki are exposed by Template:Item and are fully powered by semantic media wiki - this means you can query just about any property of an item to create convenient item lists.

Examples

Browse by subject

To take a look at what properties are available on the an item page you can use Special:Browse or the API equivalent browsebysubject, for example:

https://pathofexile.gamepedia.com/api.php?action=browsebysubject&subject=Rebuke%20of%20the%20Vaal

This will return a json list containing the properties and their associated values on the page Rebuke of the Vaal

Askargs

If you just need specific properties from a page you can use askargs - it takes a ask queries and properties as arguments, for example:

https://pathofexile.gamepedia.com/api.php?action=askargs&conditions=Has%20rarity::Unique%7CHas%20base%20item::Imbued%20Wand&printouts=Has%20name

This has a query with two conditions, it searches for any items that have the unique rarity (Has rarity::Unique) and that have a base item with the name "Imbued Wand" (Has base item::Imbued Wand).

For any results found, it will print out Property:Has name.