GET /devices/{id}/nearbyDevices​
Returns nearby devices detected by a tracker, including ZeroN devices and BleTag beacons; results are not restricted to BleTag.
Use GET https://api.lightbug.cloud/api/devices/{trackerId}/nearbyDevices, where trackerId is the detecting tracker's ID (the id path parameter). Send your API token in the Authorization header.
Supply either a correlationId from a location point or dateRange, a JSON array of two Unix-millisecond timestamps. At least one filter is needed: supplying neither returns an empty array. If both are supplied, correlationId takes precedence.
Requests
Replace the placeholders with your token, tracker ID and location point's correlation ID. The date range below is illustrative.
curl --get 'https://api.lightbug.cloud/api/devices/TRACKER_ID/nearbyDevices' \
--header 'Authorization: YOUR_API_TOKEN' \
--data-urlencode 'correlationId=POINT_CORRELATION_ID'
curl --get 'https://api.lightbug.cloud/api/devices/TRACKER_ID/nearbyDevices' \
--header 'Authorization: YOUR_API_TOKEN' \
--data-urlencode 'dateRange=[1735689600000,1735693200000]'
Response
Each array entry contains device metadata (id, name, btMac, ownerId, tags, type, meta) and readings keyed by reading type. Metadata fields can be null or omitted; availability also depends on ownership. Non-BleTag devices are returned only for their owner.
Reading timestamps are Unix milliseconds. For ble_seen, rssi is BLE signal strength in dBm and value mirrors rssi. The example below is entirely synthetic and illustrates only this reading type.
Date-range results contain the latest reading per nearby device and reading type, not every historical observation. Use nearbyDeviceData for a nearby device's time series.
Clients can map detections to their own known fixed beacon locations. This endpoint returns detections; it does not calculate an indoor position.
Authorizations​
API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Parameters​
Path Parameters
The detecting tracker ID.
"integer"Query Parameters
JSON array [start, end] of Unix-millisecond timestamps. Returns the latest reading per nearby device and reading type. Required unless correlationId is supplied.
"JSON"Correlation ID from a tracker location point. Takes precedence over dateRange. Required unless dateRange is supplied.
Request example
Responses​
Request was successful