Commands › Objects
nearbyavatars_scan
Avatars in the bot's region
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "nearbyavatars_scan",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
None besides authentication.
Returns
| Field | Type | Description |
|---|---|---|
avatars | object | Keyed by avatar UUID. Far-away avatars have rough positions and Heading 0. |
Example response
{
"result": "OK",
"action": "nearbyavatars_scan",
"avatars": {
"a2e76fcd-9360-4f6d-a924-000000000000": {
"Name": "Jane Resident",
"UUID": "a2e76fcd-9360-4f6d-a924-000000000000",
"Position": {
"X": 130,
"Y": 127,
"Z": 25
},
"LocalPosition": {
"X": 130,
"Y": 127,
"Z": 25
},
"Heading": 90,
"LocalHeading": 90,
"Distance": 4.2,
"Sitting": false,
"SeenSince": "2026-10-03T12:00:00Z",
"SeenSeconds": 42
}
}
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Covers the whole region; there is no radius filter — use Distance.