Developer_API
Old: chuanhsing#2097 2025-02-21 15:01:56
New: chuanhsing#2097 2025-02-21 15:04:09
| Old | New | Differences | |
|---|---|---|---|
| 1 | - | # | |
| 1 | + | # Developer API | |
| 2 | 2 | ||
| 3 | - | ## GGPK schema | |
| 3 | + | There are 2 api sets: | |
| 4 | + | * POESESSID used in the website API is not officially supported. | |
| 5 | + | * [OAuth](https://www.pathofexile.com/developer/docs) apis are officially supported, but less functions. | |
| 4 | 6 | ||
| 5 | - | ## | |
| 7 | + | ## Development Tool | |
| 6 | 8 | ||
| 7 | - | ``` | |
| 8 | - | struct GGPK { | |
| 9 | - | uint32 Length; | |
| 10 | - | char[4] Tag; // ="GGPK" | |
| 11 | - | uint32 Version; | |
| 12 | - | GgpkEntry[2] Entries; | |
| 13 | - | } | |
| 14 | - | struct GgpkEntry { | |
| 15 | - | uint64 offset; | |
| 16 | - | } | |
| 17 | - | struct FREE { | |
| 18 | - | uint32 Length; | |
| 19 | - | char[4] Tag; // = "FREE" | |
| 20 | - | Byte[Length-8] Data; | |
| 21 | - | } | |
| 22 | - | struct PDIR { | |
| 23 | - | uint32 Length; | |
| 24 | - | char[4] Tag; // ="PDIR" | |
| 25 | - | uint32 NameLength; | |
| 26 | - | uint32 TotalEntries; | |
| 27 | - | byte[32] SHA256Hash; | |
| 28 | - | wchar_t[NameLength] Name; | |
| 29 | - | DirectoryEntry[TotalEntries]; | |
| 30 | - | } | |
| 31 | - | struct DirectoryEntry { | |
| 32 | - | int32 entryNameHash; | |
| 33 | - | uint64 offset; | |
| 34 | - | } | |
| 35 | - | struct FILE { | |
| 36 | - | uint32 Length; | |
| 37 | - | char[4] Tag; // ="FILE" | |
| 38 | - | uint32 NameLength; | |
| 39 | - | byte[32] SHA256Hash; | |
| 40 | - | wchar_t[NameLength] Name; | |
| 41 | - | byte[reminder] Data; | |
| 42 | - | } | |
| 43 | - | ``` | |
| 44 | - | ||
| 45 | - | <a href="https://i.imgur.com/VRBetTX.png" data-lightbox="panel"></a> | |
| 46 | - | ||
| 47 | - | ### Sample Tree | |
| 48 | - | <a href="https://i.imgur.com/EP7QRal.png" data-lightbox="panel"></a> | |
| 9 | + | Site | Description | |
| 10 | + | - | - | |
| 11 | + | [Tooldev Discord Channel](https://discord.gg/pathofexile) | #tooldev-general | |
| 12 | + | [PoeSharp](https://github.com/andreandersen/PoeSharp) | C# Library to deal with PoE stuff | |
| 13 | + | [PoE Go](https://github.com/ccbrown/poe-go) | an entry-level guide to writing tools for PoE in the Go programming language. | |
| 49 | 14 | ||
| 50 | 15 | ||
| 51 | - | ## | |
| 16 | + | ## APIs | |
| 52 | 17 | Site | Description | |
| 53 | 18 | - | - | |
| 54 | - | [Path of Go](https://github.com/oriath-net/pogo) | Golang tools for reading PoE data files | |
| 55 | - | [LibGGPK3](https://github.com/aianlinb/LibGGPK3) | Windows GUI tool to view Content.ggpk and export | |
| 56 | - | [libbun](https://github.com/zao/ooz) | Ooz shared library (libooz.dll/liblibooz.so) for Oodle decompression and Bun library/tool with a C API suitable for FFI/interop - reads and extracts bundle contents from a Steam game directory or a PC Standalone GGPK. Tested on x64 Windows and Debian. <br>Original Ooz code by powzix/rarten, adapted into a library. | |
| 19 | + | [PoE API swagger](https://poedb.tw/us/poe-api) | PoEDB collections of POESESSID and OAuth API | |
| 20 | + | [Official Website API](https://www.pathofexile.com/developer/docs) | OAuth API endpoints of Path of Exile | |
| 21 | + | [POESESSID](POESESSID) | how to get your POESESSID | |
| 22 | + | [API:Passive_Skill_Tree](API%3APassive_Skill_Tree) | |
| 23 | + | [API:OAuth](API%3AOAuth) | how to use OAuth | |
| 24 | + | [API:Ladder](API%3ALadder) | |
| 25 | + | [API:Trade](API%3ATrade) | Official Trade API (POESESSID) | |
| 26 | + | [API:Public_Stashes](API%3APublic_Stashes) | OAuth Public Stashes API | |
| 27 | + | [GGPK](GGPK) | Content.ggpk file format | |
| 28 | + | [Atlas Tree Export](https://github.com/grindinggear/atlastree-export) | |
| 57 | 29 | ||
| 58 | - | ## | |
| 30 | + | ## Path Of Building Fork schema | |
| 59 | 31 | ||
| 60 | - | [Bundle schema](Bundle_schema) | |
| 61 | - | ||
| 62 | - | ## Dat schema | |
| 63 | - | ||
| 64 | - | ``` | |
| 65 | - | struct DAT { | |
| 66 | - | uint32 rowCounts; | |
| 67 | - | Data[rowCounts] rows; | |
| 68 | - | REFERENCE refer; | |
| 69 | - | } | |
| 70 | - | ||
| 71 | - | struct Data { | |
| 72 | - | blob row; | |
| 73 | - | } | |
| 74 | - | ||
| 75 | - | struct REFERENCE { | |
| 76 | - | char[8]; // 0xBB * 8 | |
| 77 | - | blob reference; | |
| 78 | - | } | |
| 79 | - | ``` | |
| 80 | - | ||
| 81 | - | ### Data Export | |
| 82 | - | ||
| 83 | - | The game data does not have any official API, and only possible data can be analyzed from the game files. | |
| 84 | - | ||
| 85 | - | Almost all data is stored in .dat64 files within Content.ggpk. But they only have data, no headers. You can start with the .dat64 format, the [PoE dat schema](https://github.com/poe-tool-dev/dat-schema) project is the latest format. Or try to parse the .dat format from [PoE Dat Viewer](https://snosme.github.io/poe-dat-viewer/) yourself. [RePoE](https://github.com/lvlvllvlvllvlvl/RePoE) collects many common and processed .dat files and exports them to .json format. | |
| 86 | - | ||
| 87 | - | ### Reference | |
| 88 | 32 | Site | Description | |
| 89 | 33 | - | - | |
| 90 | - | [PyPoE](https://github.com/Project-Path-of-Exile-Wiki/PyPoE) | Collection of Python Tools for Path of Exile, mostly used by wiki | |
| 91 | - | [RePoE](https://github.com/lvlvllvlvllvlvl/RePoE) | Repository of Path of Exile resources for tool developers. | |
| 92 | - | [Poe Dat Viewer](https://snosme.github.io/poe-dat-viewer/) | Web-base Poe Dat Viewer | |
| 93 | - | [PoE dat schema](https://github.com/poe-tool-dev/dat-schema) | Source of truth schema for dat files. | |
| 94 | - | [Path Of Building Fork schema](https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/dev/src/Export/spec.lua) | Source of Path Of Building Fork schema | |
| 95 | - | ||
| 96 | - | ### PyPoe stable.py to spec.json | |
| 97 | - | ``` | |
| 98 | - | from PyPoE.poe.file.specification.data import stable | |
| 99 | - | from json import dump | |
| 100 | - | with open('D:/spec.json', 'w') as f: | |
| 101 | - | dump(stable.specification.as_dict(), f) | |
| 102 | - | ``` | |
| 34 | + | [Pastebin](Pastebin) | |
| 35 | + | [Pobbin](Pobbin) |