runescape-api v0.0.0-0fa4b81
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-apiRuneScape 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
| Parameter | Type |
|---|---|
id | number |
getBeastsByArea(:area)
List all beasts within a given area
bestiary.getBeastsByArea("Glarial's tomb").then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
area | string | Area |
getBeastsByTerms(:term)
List all beasts by a given term
bestiary.getBeastsByTerms("cow").then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
term | string |
getBeastsByFirstLetter(:letter)
List all beasts starting with a given letter
bestiary.getBeastsByFirstLetter("c").then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
letter | string |
getBeastsBySlayerCategory(:categoryId)
List all beasts within a given slayer category
bestiary.getBeastsBySlayerCategory(45).then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
categoryId | number |
getBeastsByWeakness(:weaknessId)
List all beasts with a given weakness
bestiary.getBeastsByWeakness(7).then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
weaknessId | number |
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)
})| Parameter | Type |
|---|---|
clanName | string |
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)
})| Parameter | Type |
|---|---|
categoryId | number |
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)
})| Parameter | Type |
|---|---|
categoryId | number |
prefix | string |
page (optional) | number |
getItem(:itemId)
Retrieve an item
grandexchange.getItem(4151).then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
itemId | number |
getItemGraph(:itemId)
Retrieve an item's price history graph data
grandexchange.getItemGraph(4151).then(data => {
console.log(data)
})| Parameter | Type |
|---|---|
itemId | number |
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"5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
9 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago