Node Speed API Documentation
The Node Speed API provides CORS-enabled endpoints to measure user network conditions (download throughput, latency).
Download Throughput Measurement
Streams ~150MB of dummy data. Please request with cache disabled (e.g., 'no-store') for accurate throughput calculation.
GET
/api/download
Example Request
// Fetch dummy data to measure throughput
const startTime = performance.now();
await fetch('https://speed.ndnx.workers.dev/api/download', {
cache: 'no-store'
});
const duration = performance.now() - startTime;
console.log('Download took ' + duration + ' ms');
Latency (Ping) Measurement
Ultra-lightweight endpoint for latency measurement. Returns the string 'pong' instantly.
GET
/api/ping
Example Request
// Quick latency check
const start = performance.now();
const res = await fetch('https://speed.ndnx.workers.dev/api/ping');
const text = await res.text();
console.log('Response: ' + text + ' | Latency: ' + (performance.now() - start) + ' ms');