osrs-data-hub
Events

Event cursor feed

GET
/events

Loot, level-ups, deaths, collection log, diaries, combat tasks and superiors of the accounts whose events the key may read, ordered by the order the hub stored them, for the Discord bot and Home Assistant automations.

Cursor semantics. Start with cursor=now (no events, just the current cursor) or without a cursor (the newest limit events, default 100, at most 500). Then always pass the previous meta.next_cursor: you get the events after it, oldest first, and a new cursor. Fewer than limit events means "caught up for now". The cursor always moves forward, also past events your filters leave out, and is unchanged while nothing new has arrived. Cursors are opaque; keep them as strings.

The feed only serves events stored at least 10 s ago, so a cursor can never skip an event that is still being committed: expect an event 10–15 s after the hub received it. occurred_at is when it happened in game, received_at when the hub got it (the plugin may resend events up to ~10 minutes late).

Authorization

bearerAuth
AuthorizationBearer <token>

An API key from the hub’s API keys page.

In: header

Query Parameters

cursor?string

Omitted: the newest limit events and a cursor after them. now: no events, only the current cursor (start following from here). Otherwise a meta.next_cursor from an earlier response: the events after it, oldest first. Cursors are opaque.

types?string

Comma-separated event types: loot, pk_loot, death, level_up, collection_log, superior_spawn, achievement_diary, combat_task, or an unknown plugin type as sent. Default: every type.

accounts?string

Comma-separated account ids (at most 100); each must be one whose events the key may read, else 404. Default: every such account.

min_value?string

Only events with value_gp ≥ this (events without a value are left out).

Match^\d{1,16}$
limit?string

Events per page, 1 to 500. Default 100.

Match^\d{1,16}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/events?types=loot%2Clevel_up"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "string",      "account": {        "id": "string",        "name": "string"      },      "occurred_at": "2019-08-24T14:15:22Z",      "received_at": "2019-08-24T14:15:22Z",      "value_gp": 0,      "item_id": 0,      "npc_id": 0,      "skill": "string",      "level": 0,      "tier": "string",      "points": 0,      "special_world": true,      "data": {        "property1": null,        "property2": null      },      "title": "string",      "line": "string"    }  ],  "meta": {    "generated_at": "2019-08-24T14:15:22Z",    "count": 0,    "next_cursor": "string"  }}