osrs-data-hub
Histories

Location trails of several accounts

GET
/locations

The location trails of several accounts in one call, in request order (location_history): up to 10 accounts with a user key, 50 with a service key, each trail what /accounts/{id}/locations returns for the same range (every tile visited, oldest first, kept 30 days). One response holds at most 100,000 points, shared equally between its accounts, so with more than 5 accounts a long trail is truncated sooner. An account the key can’t read makes the whole request 404. Default: the last 24 hours.

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Query Parameters

accounts*string

Comma-separated account ids: 1 to 10 with a user key, 1 to 50 with a service key. Each must be one whose location_history the key may read, else 404.

from?string

Start of the range (ISO-8601 date-time). Default: to − 24 hours.

Formatdate-time
to?string

End of the range (ISO-8601 date-time). Default: now.

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/locations?accounts=string"
{  "data": {    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z",    "accounts": [      {        "account": {          "id": "string",          "name": "string"        },        "points": [          {            "at": "2019-08-24T14:15:22Z",            "x": 0,            "y": 0,            "plane": 0,            "world": 0,            "is_on_boat": true,            "region": "string",            "via": "move"          }        ],        "truncated": true      }    ]  },  "meta": {    "generated_at": "2019-08-24T14:15:22Z"  }}