Skip to main content
The client query tools let you inspect devices connected to your UniFi network — both currently active clients and those in the historical record. All four tools are read-only and require only a site_id to scope the request. Clients are identified by their MAC address, which remains stable across reconnections and IP address changes.

list_active_clients

Returns all clients currently connected to the site — both wired and wireless. This is equivalent to the “Clients” view in UniFi Network showing active sessions.

Parameters

string
required
The site identifier. Use "default" for single-site deployments.
number
default:"100"
Maximum number of clients to return.
number
default:"0"
Number of clients to skip before returning results. Use with limit for pagination.

Response

Returns an array of client objects for currently connected clients.

Example response


get_client_details

Returns the full record for a single client identified by MAC address. The tool checks active clients first, then falls back to the historical client database if the client is not currently connected.

Parameters

string
required
The site identifier.
string
required
The client’s MAC address. Accepted formats include aa:bb:cc:dd:ee:ff, AA:BB:CC:DD:EE:FF, and aabbccddeeff. The tool normalizes the value before querying.

Response

Returns a single client object. Fields are the same as those in list_active_clients. Historical clients may have fewer real-time fields (such as signal) populated.

Example response

If the MAC address is not found in either the active or historical client list, the tool raises ResourceNotFoundError.

get_client_statistics

Returns bandwidth usage and connection quality statistics for a specific active client. This tool only succeeds for clients currently connected to the site.

Parameters

string
required
The site identifier.
string
required
The client’s MAC address.

Response

string
The client MAC address that was queried.
number
Total bytes transmitted by the client in the current session.
number
Total bytes received by the client in the current session.
number
Total packets transmitted by the client.
number
Total packets received by the client.
number
Current transmit rate in Kbps. May be null for wired clients.
number
Current receive rate in Kbps. May be null for wired clients.
number
WiFi signal strength in dBm. null for wired clients.
number
Received Signal Strength Indicator. null for wired clients.
number
RF noise floor in dBm. null for wired clients.
number
Current session duration in seconds.
boolean
true if the client is connected via Ethernet.

Example response

get_client_statistics queries the active client table only. If the client has disconnected, use get_client_details instead, which also checks the historical record.

search_clients

Searches both active and historical clients on a site by MAC address, IP address, hostname, or display name. Results from both sources are merged, with active client data taking priority when a MAC appears in both.

Parameters

string
required
The site identifier.
string
required
The search string. Matched (case-insensitively) against the client’s mac, ip, hostname, and name fields. Partial matches are returned.
number
default:"100"
Maximum number of results to return.
number
default:"0"
Number of results to skip for pagination.

Response

Returns an array of client objects matching the query. Both currently connected and historical clients may appear in the results.
search_clients queries both active and historical client tables concurrently, so it is the most complete way to find a client regardless of whether it is currently online.