RuneScape API

RuneScape API SDK

runescape-api is a Node.js library for the unofficial API endpoints of the popular MMORPG game RuneScape and Oldschool RuneScape.

Requests are made using the Got library and will not work in a browser. This is a known limitation. The APIs Jagex expose do not allow Cross-Origin Resource Sharing (CORS) so browsers have their requests blocked, backend processes such an Node APIs do not experience these restrictions. You'd need to use a server-side request even if this package supported browser requests.

Installation

npm install runescape-api
# OR
yarn add runescape-api

RuneScape Usage

Bestiary

import { bestiary } from 'runescape-api';

getAreas()

List all bestiary areas

bestiary.getAreas().then((data) => {
  console.log(data);
});

getBeast(:id)

bestiary.getBeast(16705).then((data) => {
  console.log(data);
});

Retrieve a beast

ParameterType
idnumber

getBeastsByArea(:area)

List all beasts within a given area

bestiary.getBeastsByArea("Glarial's tomb").then((data) => {
  console.log(data);
});
ParameterType
area`string

getBeastsByTerms(:term)

List all beasts by a given term

bestiary.getBeastsByTerms('cow').then((data) => {
  console.log(data);
});
ParameterType
termstring

getBeastsByFirstLetter(:letter)

List all beasts starting with a given letter

bestiary.getBeastsByFirstLetter('c').then((data) => {
  console.log(data);
});
ParameterType
letterstring

getBeastsBySlayerCategory(:categoryId)

List all beasts within a given slayer category

bestiary.getBeastsBySlayerCategory(45).then((data) => {
  console.log(data);
});
ParameterType
categoryIdnumber

getBeastsByWeakness(:weaknessId)

List all beasts with a given weakness

bestiary.getBeastsByWeakness(7).then((data) => {
  console.log(data);
});
ParameterType
weaknessIdnumber

getSlayerCategories()

List all slayer categories

bestiary.getSlayerCategories().then((data) => {
  console.log(data);
});

getWeaknesses()

List all weaknesses

bestiary.getWeaknesses().then((data) => {
  console.log(data);
});

Clan

import { clan } from 'runescape-api';

getMembers(:clanName)

List all clan members for a given clan

clan.getMembers('Royal 58').then((data) => {
  console.log(data);
});
ParameterType
clanNamestring

Grand Exchange

import { grandexchange } from 'runescape-api';

getCategories()

List all categories

grandexchange.getCategories().then((data) => {
  console.log(data);
});

getCategoryCounts(:categoryId)

List the number of items in a category, grouped by starting character

grandexchange.getCategoryCounts(24).then((data) => {
  console.log(data);
});
ParameterType
categoryIdnumber

getCategoryCountsByPrefix(:categoryId, :prefix, :page?)

List the number of items in a category, starting with a specific character

grandexchange.getCategoryCountsByPrefix(24, 'b').then((data) => {
  console.log(data);
});
ParameterType
categoryIdnumber
prefixstring
page (optional)number

getItem(:itemId)

Retrieve an item

grandexchange.getItem(4151).then((data) => {
  console.log(data);
});
ParameterType
itemIdnumber

getItemGraph(:itemId)

Retrieve an item's price history graph data

grandexchange.getItemGraph(4151).then((data) => {
  console.log(data);
});
ParameterType
itemIdnumber

Hiscores

import { hiscores } from 'runescape-api';

Miscellaneous

import { miscellaneous } from 'runescape-api';

RuneMetrics

import { runemetrics } from 'runescape-api';

Oldschool Usage

Grand Exchange

import { grandexchange } from 'runescape-api/osrs';

Hiscores

import { hiscores } from 'runescape-api/osrs';

Learn more about RuneScape API

Node.js library for the unofficial API endpoints of the popular MMORPG game RuneScape and Oldschool.

Primary Language
TypeScript
Latest Release
v2.1.1
Start Date
June 2nd, 2015 at 10:00 AM
Last Updated
10 days ago
NPM Downloads
~10K
View SourceView Source