Data.lotro.com Usage Guide
Options
View source
History
What links here
Related changes
Special pages
Permanent link

Contents

Overview

This document explains how to use the LOTRO Web API and includes some sample responses with tips on parsing/using the data.

Obtaining an API KEY

Currently, you must request an API Key and developer identity via private message to one of the Turbine web developers -- Duwis, Bracket, Gharet (try Duwis first). No data is accessible without an identity and API key.

API Request

The LOTRO Web API currently uses a simple REST-ful URL interface to request XML formatted data about characters (both Free Peoples and monsters) and guilds (kinships and tribes). Every request follows the same pattern:

http://data.lotro.com/DEVELOPER-NAME/API-KEY/API-METHOD/Param1/Value1/Param2/Value2/...

The DEVELOPER_NAME and API_KEY are currently manually generated and distributed but will eventually have a self service component to easily request a key without any work from us developers. Each API method can define its own parameters and decide whether those parameters are require or optional. The method parameters can be passed in any order - keep in mind the developer ID, API key, and method name are not considered method parameters. More information on specific methods are documented below.

Issuing a request to the API is as simple as calling a properly formatted URL with any HTTP client (browser, cUrl, socket connection, etc) as a GET request (no POSTing required). The server will respond with an XML document (using the text/xml header).

API Response

All responses from the LOTRO Web API are wrapped in the <apiresponse> tag that has no attributes. If there is an error with the request or a server error, there will be an <error> child that contains various information about the error in the attributes (error code, message, details). The <error> will contain information, for example, if the API key does not match the developer name, required arguments were not included, no results were found from the query, etc.

A successful request will result in an XML response with structure that is unique for every method. The charactersheet method, for example, contains a <character> tag that then has various children tags such as <vocations>, <stats>, and <equipment>. In general, if one of these children elements contains no data, it will not be included in the document.

Caching

All API calls are cached for 24 hours to reduce load on our API servers. The cache expiration is not currently exposed to the client but will be included in a future version. Please respect our bandwidth and implement your own local caching - we do log usage of the system and can revoke access to abusers. Requesting the same API method more than once in a 24 hour period will not result in any updated data, so there's really no reason to do it anyway.

Maintenance / Site Down

Occasionally, data.lotro.com will need to be unavailable for any number of reasons (site updates, general maintenance, etc). Scheduled downtimes of data.lotro.com will usually be associated with my.lotro.com, forum, or Lorebook downtimes. During these times, the site will redirect to sitedown.turbine.com which is not a response from the XML API. Many HTTP libraries will allow you to control what happens when a redirect occurs. It is suggested you determine a method to detect the site down condition to avoid strange bugs and/or just let you know why your own application is not functioning properly.

API Method Documentation



charactersheet

Returns various public information about a character - this works for both free people and monsters. The XML structure is similar between them, but monsters have far less data accessible at this time.

Required arguments:
  • world name
    • URL parameter key: w
  • character name
    • URL parameter key: c

Optional arguments:
  • none

URL Format:
http://data.lotro.com/DEVELOPER/API-KEY/charactersheet/w/WORLD-NAME/c/CHARACTER-NAME/

Sample URL and Response:
http://data.lotro.com/DEVELOPER/API_KEY/charactersheet/w/Landroval/c/Valdidar/
  <?xml version="1.0" encoding="UTF-8" ?> 
  <apiresponse>
  <character name="Valdidar" world="Landroval" monster="0" race="Race of Man" class="Lore-master" level="53" origin="Gondor">
    <guild name="Knights of the White Lady" rank="Member" type="Mixed Kinship Theme" /> 
    <vocation name="Armsman">
      <professions>
        <profession name="Weaponsmith" proficiency="5" mastery="5" /> 
        <profession name="Woodworker" proficiency="4" mastery="3" /> 
        <profession name="Prospector" proficiency="6" mastery="5" /> 
      </professions>
    </vocation>
    <pvmp ratingPoints="1111.44" gloryPoints="4789" gloryRank="3" /> 
    <stats>
      <stat name="morale" value="2996" /> 
      <stat name="power" value="2206" /> 
      <stat name="armour" value="1987" /> 
      <stat name="might" value="117" /> 
      <stat name="agility" value="194" /> 
      <stat name="vitality" value="318" /> 
      <stat name="will" value="277" /> 
      <stat name="fate" value="286" /> 
      <stat name="radiance" value="0" /> 
      <stat name="meleeCrit" value="920" /> 
      <stat name="rangedCrit" value="388" /> 
      <stat name="tacticalCrit" value="784" /> 
      <stat name="fearResistance" value="554" /> 
      <stat name="woundResistance" value="636" /> 
      <stat name="diseaseResistance" value="636" /> 
      <stat name="poisonResistance" value="636" /> 
      <stat name="commonDef" value="2104" /> 
      <stat name="fireDef" value="715" /> 
      <stat name="frostDef" value="715" /> 
      <stat name="shadowDef" value="1254" /> 
      <stat name="lightningDef" value="715" /> 
      <stat name="acidDef" value="715" /> 
      <stat name="block" value="N/A" /> 
      <stat name="evade" value="1660" /> 
      <stat name="parry" value="1880" /> 
    </stats>
    <equipment>
      <item name="Hat of the Elder Days" slot="Head" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879094671" /> 
      <item name="Survivor's Robe" slot="Chest" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879145632" /> 
      <item name="Feldskyn Leggings" slot="Legs" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879102465" /> 
      <item name="Gloves of the Elder Days" slot="Gloves" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879094666" /> 
      <item name="Scholar of Nâr-khelab" slot="Boots" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879145637" /> 
      <item name="Tathredhranc" slot="Shoulder" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879115954" /> 
      <item name="Elrond's Radiant Cloak" slot="Back" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879103587" /> 
      <item name="Polished Beryl Bracelet" slot="Bracelet1" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879093015" /> 
      <item name="Polished Beryl Bracelet" slot="Bracelet2" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879093015" /> 
      <item name="Geirfast's Rejoice" slot="Necklace" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879139246" /> 
      <item name="Thick Gold Ring" slot="Ring1" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879097424" /> 
      <item name="Bróin's Ring" slot="Ring2" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879145663" /> 
      <item name="Stíling's Reward" slot="Earring1" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879139233" /> 
      <item name="Etched Beryl Earring" slot="Earring2" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879093020" /> 
      <item name="Phial of the Swirling Waters" slot="Pocket1" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879052728" /> 
      <item name="Loremaster's Staff of the Third Age" slot="Weapon_Primary" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879146805" /> 
      <item name="Blade of Keriä" slot="Weapon_Secondary" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879115253" /> 
      <item name="Ancient Iron Prospector's Tools" slot="CraftTool" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879055274" /> 
      <item name="Lore-master's Book" slot="Last" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879145850" /> 
    </equipment>
  </character>
  </apiresponse>

guildroster

Returns basic information about the kinship or tribe as well as a basic roster. There are no substantial differences between a Free People guild (kinship) or a monster guild (tribe).

Required arguments:
  • world name
    • URL parameter key: w
  • kinship/tribe name
    • URL parameter key: g

Optional arguments:
  • none

URL Format:
http://data.lotro.com/DEVELOPER/API-KEY/guildroster/w/WORLD-NAME/g/GUILD-NAME/

Sample URL and Response:
http://data.lotro.com/DEVELOPER/API-KEY/guildroster/w/Landroval/g/The crafting union/
<?xml version="1.0" encoding="UTF-8" ?>
  <apiresponse>
    <guild name="The crafting union" world="Landroval" theme="Mixed Kinship Theme" memberCount="148">
      <characters>
        <character name="Drahc" level="13" class="Champion" race="Dwarf" rank="Recruit"/>
        <character name="Kimwen" level="17" class="Rune-keeper" race="Elf" rank="Recruit"/>
        <character name="Lorrow" level="22" class="Lore-master" race="Race of Man" rank="Recruit"/>
        <character name="Lycaeum" level="50" class="Champion" race="Dwarf" rank="Recruit"/>
        <character name="Ronarin" level="10" class="Guardian" race="Race of Man" rank="Recruit"/>
        <character name="Alishana" level="60" class="Hunter" race="Race of Man" rank="Officer"/>
        <character name="Areyona" level="51" class="Hunter" race="Elf" rank="Officer"/>
        ...
        <character name="Artemisia" level="52" class="Minstrel" race="Hobbit" rank="Officer"/>
        <character name="Auroriana" level="50" class="Guardian" race="Race of Man" rank="Officer"/>
        <character name="Eluithil" level="50" class="Captain" race="Race of Man" rank="Officer"/>
        <character name="Eotain" level="60" class="Captain" race="Race of Man" rank="Officer"/>
        <character name="Esidora" level="60" class="Burglar" race="Hobbit" rank="Officer"/>
        <character name="Faradae" level="30" class="Warden" race="Elf" rank="Officer"/>
      </characters>
    </guild>
  </apiresponse>

item

Returns information about an item. The response will vary depending on the type of item. We do not have full documentation of the XML tag structure for each type of item but it should be fairly self-evident when looking at various types.

Required arguments:
  • item ID
    • URL parameter key: id

Optional arguments:
  • none

URL Format:
http://data.lotro.com/DEVELOPER/API-KEY/item/id/ITEM-ID/

Sample URL and Response:
http://data.lotro.com/DEVELOPER/API-KEY/item/id/1879094683/
<?xml version="1.0" encoding="UTF-8"?>
<apiresponse>
  <item id="1879094683" name="Doom-hunter's Helm" level="50" type="Medium Armour" quality="Incomparable" unique="1" isItemAdvancement="0" stackSize="1" bindOnAcquire="1" bindOnEquip="0" consumedOnUse="0" cooldown="" iconUrl="http://content.turbine.com/sites/lorebook.lotro.com/images/icons/item/head/eq_head_med_rift_set_1_hunter.png" decoration="" instrument="">
    <requirements>
      <level minimum="50"/>
      <gloryRank/>
      <traits/>
      <races/>
      <classes>
      <class name="Hunter"/>
      </classes>
      <factions/>
    </requirements>
    <value baseCopperValue="1320" gold="0" silver="13" copper="20"/>
    <durability points="50" type="Tough"/>
    <damage/>
    <armour value="218"/>
    <effects>
      <effect value="+30 Will"/>
      <effect value="+8 Might"/>
      <effect value="+22 Maximum Morale"/>
      <effect value="+30 Agility"/>
      <effect value="+30 Vitality"/>
    </effects>
    <set name="Doom-hunter's Armour" level="50">
      <piece id="1879094678"/>
      <piece id="1879094679"/>
      <piece id="1879094680"/>
      <piece id="1879094681"/>
      <piece id="1879094682"/>
      <piece id="1879094683"/>
      <effect pieceCount="6" value="25% Disperse Shadow Chance"/>
      <effect pieceCount="6" value="-18% Penetrating Shot Power Cost"/>
      <effect pieceCount="4" value="-50% Heart Seeker Power Cost"/>
      <effect pieceCount="4" value="10% Disperse Shadow Chance"/>
      <effect pieceCount="2" value="+15 Agility"/>
      <effect pieceCount="2" value="3% Disperse Shadow Chance"/>
      <description><![CDATA[This armour was granted as a reward for defending Eriador from the terror of Nûrz Gâshu.]]></description>
    </set>
    <description/>
  </item>
  <cache_info cached_until_gmt="2009-12-10 20:02"/>
</apiresponse>

Player Entry
 

Hi you need to URL encode "spaces" with a %20, but it only works if the kinship has no "dead" acounts which were never transfered to Turbine.

16 comments [hide]
Post comment Options
You need JavaScript enabled for viewing comments