Application programming interface

Application programming interfaces, or APIs, are what developers, fansite operators and bots use to retrieve information about the game and the wiki.

The RuneScape Wiki
The RuneScape Wiki's API can be accessed here. The API Explorer special page can be used in addition to the documentation that MediaWiki has. Some features are limited to logged in users, system operators, bureaucrats and Wikia staff. For more information, Wikia Inc. provides a wiki about their API and developer program here.

Grand Exchange Database API
The Grand Exchange Database, like the Bestiary API, is vast. It encompasses the Item Database which shows images of items not purchasable on the Grand Exchange itself and the catalogue information on tradeable items within the Grand Exchange. Queries in the API return (JavaScript Object Notation).

Configuration
returns the runedate of when the Grand Exchange Database was last updated. The URL for the info query is.

category
returns the number of items determined by the first letter. The URL for category queries is  where X is the category identification number as listed below for all possible types. For example, if we want to find all tradeable summoning familiars, we'd go to http://services.runescape.com/m=itemdb_rs/api/catalogue/category.json?category=9, which would result in

items
returns the first 12 items in the category given as shown below determined by the first letter. The URL for items queries are  where X is the category identification number, Y is the starting letter (lower case) for the items and Z is the page number beginning at 1. Note that any items that start with a number bust instead use "%23" instead of "#".

For example, if we want to find all tradeable summoning familiars that begin with "c", we'd go to http://services.runescape.com/m=itemdb_rs/api/catalogue/items.json?category=9&alpha=c&page=1, which would result in

detail
returns current price and price trends information on tradeable items in the Grand Exchange, the category, item image and examine for the given item. The URL for detail queries is  where X is the ItemID.

For example, if we want the information on steadfast boots, we'd go to http://services.runescape.com/m=itemdb_rs/api/catalogue/detail.json?item=21787, which would result in

Images
The Grand Exchange Database can return item images with  and. These images can sometimes be skewed since it includes items that might not necessarily be seen ingame such as placeholder graphics for most cosmetic overrides from Solomon's General Store, use the mtx pet icon for various pets and the achievement banner in other cases. Many items from Treasure Hunter and Solomon's General Store can be seen before being released in-game by sometimes over a month ahead.


 * The URL for obj_big queries is  where X is the ItemID.
 * The URL for obj_sprite queries is  where X is the ItemID.

For example, if we want to see the image for Mod Daze's homework, we'd go to http://services.runescape.com/m=itemdb_rs/obj_big.gif?id=34775 for a detailed image or http://services.runescape.com/m=itemdb_rs/obj_sprite.gif?id=34775 for the inventory icon. Unlike the images as seen in the game, the Grand Exchange Database images have a completely solid line surrounding items, which is different from ingame since there are breaks in images for borders.

Note that item images retrieved outside of the above place the most recent runedate before  and. When the next system update occurs and  is updated, the link no longer operates for those that had a runedate in the link.

Graph
Graph shows the prices each day of a given item for the previous 180 days. The timecode is the number of milliseconds that has passed since 1 January 1970 and the price is the market value of the item for the given day. When no price information is available, then a value of zero is returned.

The URL for a graph is  where X is the ItemID. For example, if we want to know the last 180 days for steadfast boots, we'd go to http://services.runescape.com/m=itemdb_rs/api/graph/21787.json, where the previous three days, truncated for this article, would start out as

Hiscores
The hiscores can show a players current ranking in their clan, any skill or activity and active and past seasonal events.

ranking
returns up to the top 50 players in a given skill or activity. The URL for ranking is  where Z is the current skill, overall level or activity, Y are skills or activities and Z is the amount requested up to the top 50 players.

For example, if we want to know the top 2 players in the Woodcutting skill we would go to http://services.runescape.com/m=hiscore/ranking.json?table=9&category=0&size=2, which would result in

userRanking
returns the current logged in player's rank in the overall hiscores table. The URL for userRanking is http://services.runescape.com/c=0/m=hiscore/userRanking.json where /c=0/ needs to be the current session of the player to view their overall rank.

Hiscores Lite
returns a player's rank, level and experience or score in an activity. The URL for index_lite is http://services.runescape.com/m=hiscore/index_lite.ws?player=X where X is the player's name.

Ironman Lite
returns a player's rank, level and experience or score in an activity. The URL for index_lite is http://services.runescape.com/m=hiscore_ironman/index_lite.ws?player=X where X is the player's name.

Hardcore Ironman Lite
returns a player's rank, level and experience or score in an activity. The URL for index_lite is http://services.runescape.com/m=hiscore_hardcore_ironman/index_lite.ws?player=X where X is the player's name.

getRankings
returns the player's current or previous scores in one or more Seasonal HiScores. The URL for getRankings is http://services.runescape.com/m=temp-hiscores/getRankings.json?player=X where X is the player's name. It can also be used to view previous scores for past seasonals with the URL http://services.runescape.com/m=temp-hiscores/getRankings.json?player=X&status=archived.

getHiscoreDetails
returns the current or previous Seasonal events. The URL for getHiscoreDetails is http://services.runescape.com/m=temp-hiscores/getHiscoreDetails.json and http://services.runescape.com/m=temp-hiscores/getHiscoreDetails.json?status=archived for previous events.

clanRanking
returns the top three clans. The URL for clanRanking is http://services.runescape.com/m=clan-hiscores/clanRanking.json.

userClanRanking
returns the current logged in player's clan and the rank of the clan. The URL for userClanRanking is http://services.runescape.com/c=0/m=clan-hiscores/userClanRanking.json where /c=0/ needs to be the current session of the player to view their clan's rank.

Clan Members Lite
returns a CSV file with a list of clan members, their rank in the clan, their total experience and total kills. The URL for members_lite.ws is http://services.runescape.com/m=clan-hiscores/members_lite.ws?clanName=X where X is the name of the clan. The list is sorted by clan ranking starting with Owner and ending with Recruit.

Hiscores Lite
returns a player's rank, level and experience or score in an activity. The URL for index_lite is http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=X where X is the player's name.

Ironman Lite
returns a player's rank, level and experience or score in an activity. The URL for index_lite is http://services.runescape.com/m=hiscore_oldschool_ironman/index_lite.ws?player=X where X is the player's name.

Ultimate Ironman Lite
returns a player's rank, level and experience or score in an activity. The URL for index_lite is http://services.runescape.com/m=hiscore_oldschool_ultimate/index_lite.ws?player=X where X is the player's name.

Solomon's General Store
Solomon's General Store's configuration API lists every past, current and upcoming items for the store. The URL for the configuration query is  where context[0]=0 allows players to view the media in the store. It is unsorted without help from secondary programs such as Google Chrome's developer tools to organize the list.

The version number in the API represents the last time the store was updated in milliseconds since 1 January 1970. There are several other API's that the store uses, however as they require players to be logged in to the RuneScape site.

Website Data
Website data can provide information on a player's friends, their titles and what clan they are in.

playerDetails
returns multiple players' titles, their clan, their name and if the clan they are in is recruiting. The URL for playerDetails is http://services.runescape.com/m=website-data/playerDetails.ws?names=%5B%22X%22%5D&callback=jQuery000000000000000_0000000000&_=0 where X is the first players name and addition names can be provided by using a comma after X and surrounding them with quotes inside the brackets.

If the request is performed as a JSONP object on the RuneScape site, it can give the world the player is on if the online status is true.

playerFriendsDetails
returns the logged-in player's own friends list. The URL for playerFriendsDetails is http://services.runescape.com/c=0/m=website-data/playerFriendsDetails.json?resultsPerPage=24&currentPage=1&callback=jQuery000000000000000_0000000000&_=0 where you must be logged in to view, the max results per request is 24 and the current page shows up to 24 players. It cannot be viewed as a web page. Depending on in-game settings, even when a player is online they might not appear to be online if Private is set to off.

avatardetails
returns a player's item information worn when taking a picture at the Photo booth for their Adventurer's Log. The URL for avatardetails is http://services.runescape.com/m=adventurers-log/avatardetails.json?details=X where X is the content of the  for the player being viewed. The URL for appearance.dat is http://services.runescape.com/m=avatar-rs/X/appearance.dat where X is the player's name.

NPCs
Using appearance.dat, players can view the appearances of Jagex Moderators and other players easily. It allows anyone to see any monster, override, equipable items and the item information as an indirect item API. Strings are in the form of bits from 0 to 63 where the order is A-Z, a-z, 0-9, then - and *.

When an NPC is viewed, there is no information in avatardetails.json and the animation for the NPC. In a javascript console, players can view any NPC that is in the game with:

Where AAA is the NPC ID starting at 0 (Hans) and the next NPC starting at AAE as each NPC takes up four bits. The seventeen dashes following the ID are necessary to prevent from getting bad request messages in their console.

In a javascript console, when clicking on 'Idle' does not work, players can fix the animation of any NPC by using:

Where 0 is the default structure of every NPC. It can sometimes be substituted for the animation IDs for that NPC if they are shown in their bestiary entry. Players might have to re-enter the SetAppearance string again to correct any issues.

Players
In a javascript console, players can view any other player with:

Where X is the other players' character name. This allows a player to view Jagex Moderators and other players that have privacy settings activated. Regardless of privacy settings, along with the full character image and chathead for the forums, the appearance.dat file is always viewable.

Each string can be changed to show equipable items that were not worn during the usage of the Photo Booth. The only way to use a custom string is in a javascript console by using:

Where the string of letters and numbers can be modified to show different hair styles, default clothing, and worn items. In this string,  refers to the curtains long hairstyle of the player and can be changed to  ' for a bald hairstyle as 'AWE' are the long curtains hairstyle.

The only item worn in this string is an aura, Daemonheim aura 4, noted by the string. Not all strings are four letters and numbers as many are three letters and numbers. It changes the more items that are visible and whether or not they are recolourable can add complexity to the string.

player_count
returns the number of players currently online in RuneScape, Old School RuneScape, and RuneScape Classic. The URL for player_count is http://www.runescape.com/player_count.js?varname=iPlayerCount&callback=jQuery000000000000000_0000000000&_=0 where the varname is always.

rsusertotal
returns the current amount of accounts created that can access any form of RuneScape. This includes accounts made on FunOrb or a particular version of RuneScape. The URL for rsusertotal is http://services.runescape.com/m=account-creation-reports/rsusertotal.ws?callback=jQuery000000000000000_0000000000&_=0.