# Old School RuneScape API
> The Old School RuneScape Grand Exchange and Hiscores as an API. Get live item buy and sell prices straight from the OSRS Wiki real-time prices feed, with flip margins and the 2% GE sales tax already calculated (profit_after_tax), search the full item catalogue by name for ids, buy limits, alchemy values and examine text, pull price-and-volume history time series (5m, 1h, 6h or 24h steps), and look up any player on the official hiscores — all 24 skill levels, XP and ranks plus boss kill-counts and minigame scores. Perfect for Grand Exchange flipping tools and trade bots, price trackers and Discord bots, player progress trackers and clan dashboards. No accounts, no upstream key.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/osrs-api/..."
```

## Pricing
- **Free** (Free) — 3,400 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 44,000 calls/Mo, 5 req/s
- **Pro** ($15/Mo) — 215,000 calls/Mo, 15 req/s
- **Mega** ($40/Mo) — 1,050,000 calls/Mo, 40 req/s

## Endpoints

### Items

#### `GET /v1/item` — Search items / get item metadata

**Parameters:**
- `query` (query, optional, string) — Item name Example: `abyssal whip`
- `id` (query, optional, string) — Item id Example: `4151`
- `limit` (query, optional, string) — Max results 1-100 Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/osrs-api/v1/item?query=abyssal+whip&id=4151&limit=25"
```

**Response:**
```json
{
    "data": {
        "item": {
            "id": 4151,
            "icon": "https://oldschool.runescape.wiki/images/Abyssal_whip.png",
            "name": "Abyssal whip",
            "value": 120001,
            "examine": "A weapon from the Abyss.",
            "lowalch": 48000,
            "members": true,
            "ge_limit": 70,
            "highalch": 72000
        }
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:07.407Z",
        "request_id": "d39e8eba-f742-40e8-8090-6108b9c533b9"
    },
    "status": "ok",
    "message": "Item retrieved",
    "success": true
}
```

### Prices

#### `GET /v1/history` — Price & volume time series

**Parameters:**
- `id` (query, required, string) — Item id Example: `4151`
- `timestep` (query, optional, string) — 5m|1h|6h|24h Example: `6h`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/osrs-api/v1/history?id=4151&timestep=6h"
```

**Response:**
```json
{
    "data": {
        "id": 4151,
        "count": 365,
        "series": [
            {
                "avg_low": 1305268,
                "avg_high": 1324593,
                "timestamp": 1772388000,
                "low_volume": 1200,
                "high_volume": 1070
            },
            {
                "avg_low": 1302308,
                "avg_high": 1320794,
                "timestamp": 1772409600,
                "low_volume": 1036,
                "high_volume": 833
            },
            {
                "avg_low": 1303157,
                "avg_high": 1320682,
                "timestamp": 1772431200,
                "low_volume": 454,
                "high_volume": 514
            },
            {
                "avg_low": 1299631,
                "avg_high": 1318544,
                "timestamp": 1772452800,
                "low_volume": 521,
                "high_volume": 544
            },
            {
                "avg_low": 1298048,
                "avg_high": 1318528,
                "timestamp": 1772474400,
                "low_volume": 882,
                "high_volume": 733
            },
            {
                "avg_low": 1295067,
                "avg_high": 1315121,
                "timestamp": 1772496000,
                "low_volume": 871,
                "high_volume": 709
            },
            {
                "avg_low": 1282752,
                "avg_high": 1310146,
                "timestamp": 1772517600,
             
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/price` — Latest GE price + flip margin

**Parameters:**
- `id` (query, optional, string) — Item id Example: `4151`
- `name` (query, optional, string) — Item name Example: `twisted bow`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/osrs-api/v1/price?id=4151&name=twisted+bow"
```

**Response:**
```json
{
    "data": {
        "id": 4151,
        "low": 1133313,
        "high": 1145000,
        "name": null,
        "note": "Pass name= to include the item name & buy limit.",
        "ge_tax": 22900,
        "margin": 11687,
        "ge_limit": null,
        "low_time": 1780272130,
        "high_time": 1780272192,
        "profit_after_tax": -11213
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:07.771Z",
        "request_id": "c16c7915-d5eb-4f71-9596-a00e30086026"
    },
    "status": "ok",
    "message": "Price retrieved",
    "success": true
}
```

### Players

#### `GET /v1/hiscore` — Player skills & activity scores

**Parameters:**
- `player` (query, required, string) — RuneScape name Example: `zezima`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/osrs-api/v1/hiscore?player=zezima"
```

**Response:**
```json
{
    "data": {
        "player": "zezima",
        "skills": [
            {
                "id": 0,
                "xp": 27957906,
                "name": "Overall",
                "rank": 1583674,
                "level": 1466
            },
            {
                "id": 1,
                "xp": 1343681,
                "name": "Attack",
                "rank": 1567248,
                "level": 76
            },
            {
                "id": 2,
                "xp": 1342072,
                "name": "Defence",
                "rank": 1430417,
                "level": 76
            },
            {
                "id": 3,
                "xp": 1271864,
                "name": "Strength",
                "rank": null,
                "level": 75
            },
            {
                "id": 4,
                "xp": null,
                "name": "Hitpoints",
                "rank": null,
                "level": 1
            },
            {
                "id": 5,
                "xp": null,
                "name": "Ranged",
                "rank": null,
                "level": 1
            },
            {
                "id": 6,
                "xp": null,
                "name": "Prayer",
                "rank": null,
                "level": 1
            },
            {
                "id": 7,
                "xp": null,
                "name": "Magic",
                "rank": null,
                "level": 1
            },
            {
    
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/osrs-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Old School RuneScape Grand Exchange & Hiscores. /v1/item?query=abyssal whip = search items (id, name, members, GE buy-limit, alch values, examine, icon); /v1/price?id=4151 or name=abyssal whip = latest buy/sell price with flip margin and 2% GE tax (profit_after_tax); /v1/history?id=4151&timestep=5m|1h|6h|24h = price & volume time series; /v1/hiscore?player=zezima = a player's 24 skill levels/XP/ranks plus activity & boss scores. mapping fetched live per request (no cache). No upstream key.",
        "source": "OSRS Wiki real-time prices (prices.runescape.wiki) + official hiscores (secure.runescape.com)",
        "endpoints": [
            "/v1/item",
            "/v1/price",
            "/v1/history",
            "/v1/hiscore",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:08.555Z",
        "request_id": "15dbadfb-6093-434d-8671-f9ed5efadbac"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/osrs-api
OpenAPI spec: https://www.oanor.com/api/osrs-api/openapi.json
