Get top locations by speed test results
client.radar.quality.speed.top.locations(TopLocationsParams { asn, continent, dateEnd, 6 more } query?, RequestOptionsoptions?): TopLocationsResponse { meta, top_0 }
GET/radar/quality/speed/top/locations
Retrieves the top locations by bandwidth, latency, jitter, or packet loss, from the previous 90 days of Cloudflare Speed Test data.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get top locations by speed test results
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.radar.quality.speed.top.locations();
console.log(response.meta);{
"result": {
"meta": {
"confidenceInfo": {
"annotations": [
{
"dataSource": "ALL",
"description": "Cable cut in Tonga",
"endDate": "2019-12-27T18:11:19.117Z",
"eventType": "EVENT",
"isInstantaneous": true,
"linkedUrl": "https://example.com",
"startDate": "2019-12-27T18:11:19.117Z"
}
],
"level": 0
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"lastUpdated": "2019-12-27T18:11:19.117Z",
"normalization": "PERCENTAGE",
"units": [
{
"name": "*",
"value": "requests"
}
]
},
"top_0": [
{
"bandwidthDownload": "295.886073",
"bandwidthUpload": "158.85269",
"clientCountryAlpha2": "IS",
"clientCountryName": "Iceland",
"jitterIdle": "9.640685",
"jitterLoaded": "46.480023",
"latencyIdle": "15.208124",
"latencyLoaded": "114.758887",
"numTests": 13123,
"rankPower": 0.77
}
]
},
"success": true
}Returns Examples
{
"result": {
"meta": {
"confidenceInfo": {
"annotations": [
{
"dataSource": "ALL",
"description": "Cable cut in Tonga",
"endDate": "2019-12-27T18:11:19.117Z",
"eventType": "EVENT",
"isInstantaneous": true,
"linkedUrl": "https://example.com",
"startDate": "2019-12-27T18:11:19.117Z"
}
],
"level": 0
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"lastUpdated": "2019-12-27T18:11:19.117Z",
"normalization": "PERCENTAGE",
"units": [
{
"name": "*",
"value": "requests"
}
]
},
"top_0": [
{
"bandwidthDownload": "295.886073",
"bandwidthUpload": "158.85269",
"clientCountryAlpha2": "IS",
"clientCountryName": "Iceland",
"jitterIdle": "9.640685",
"jitterLoaded": "46.480023",
"latencyIdle": "15.208124",
"latencyLoaded": "114.758887",
"numTests": 13123,
"rankPower": 0.77
}
]
},
"success": true
}