# M-lab Clients

This data call returns a set of all the hosts within a certain resource for which any network tests occurred. The maximum time window for this datacall is 7 days.

The data is based on active host measurements collected by the Measurement Lab platform (M-Lab (opens new window)).

The measurements are commonly ran using the M-Lab Network Detection Tool (NDT (opens new window)). Note there is typically at least a 24-hour delay between data collection and data publication

The results published, including host details are covered by the M-Lab acceptable use policy (opens new window).

GET /data/mlab-clients/data.json?resource=

# Parameters

Key Value Info Required Default value
resource IPv4 Prefix, IPv4 address, IPv6 prefix, IPv6 address, IP range or country code Defines the resource that the query is performed for. YES
starttime ISO8601 or Unix timestamp Defines the starttime for the query. NO endtime - 7d
endtime ISO8601 or Unix timestamp Defines the endtime for the query. NO today

# Data Output

Key Info
clients A key-value list of hosts with network activity, indexed by the host IP address. Each record has the following format.
num_entries The number of tests ran by the host during the query period.
country The country where the host is located.
city The city where the host is located.
latitude The host latitude.
longitude The host longitude.
measurement_time The time when the measurement was performed.
nr_clients Total number of hosts in the result.
perc_coverage (Only applicable for prefixes). The amount of address space coverage of the hosts. Equals to nr_clients/number of IPs in the prefix.
query_starttime Defines the start of the time interval covered in the query.
query_endtime Defines the end of the time interval covered in the query.
resource Defines the resource used in the query.

# Code Examples

Last Updated: Wednesday, 6 December 2023