Skip to content
SoulFire LogoSoulFire

List nearby entities

GET
/v1/instances/{instance_id}/bots/{bot_id}/live/world/entities

Lists entities within a radius of the bot, optionally filtered by type.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string
Formatuuid
bot_id*string
Formatuuid

Query Parameters

radius*|

Maximum radius in blocks from the bot. Server clamps to an implementation-defined maximum.

entity_types?array<string>

Optional filter: if non-empty, only entities whose namespaced type is in this list are returned.

include_players?boolean

If true, include players in the result. Defaults to true.

Response Body

Successful response.

application/json
  1. response
entities?array<>

Entities ordered by ascending distance from the bot.

Example Request
curl -X GET 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/live/world/entities?radius=0.1'
Example Response
{
  "entities": [
    {
      "entityId": 0,
      "entityType": "string",
      "position": {
        "x": 0.1,
        "y": 0.1,
        "z": 0.1,
        "dimension": "string"
      },
      "distance": 0.1,
      "displayName": "string",
      "isPlayer": true,
      "health": 0.1
    }
  ]
}

Was this page helpful?