SpeedOf.Me

Speed Test API for JavaScript

A speed test API you call from JavaScript

Load api.js, set your key, call startTest(). Your callback receives download, upload, latency and jitter as numbers, measured in the visitor's own browser. Run it below, then paste the snippet into your page.

30-day free trial · 100 API calls · No credit card · Plans from $49/month

Tap Start to measure your speed.
-
Mbps
Download
-
Mbps
Upload
-
ms
Latency
-
ms
Jitter

This page runs the same test the API runs. An integration gets these four numbers back as a JavaScript object.

<script src="https://speedof.me/api/api.js"></script>
<script>
  SomApi.account = 'YOUR_API_KEY';
  SomApi.domainName = 'yourdomain.com';
  SomApi.onTestCompleted = function (r) {
    console.log(r.download, r.upload,
                r.latency, r.jitter);
  };
  SomApi.startTest();
</script>
useEffect(() => {
  const s = document.createElement('script');
  s.src = 'https://speedof.me/api/api.js';
  s.onload = () => {
    SomApi.account = 'YOUR_API_KEY';
    SomApi.domainName = 'yourdomain.com';
    SomApi.onTestCompleted = setResult;
  };
  document.body.appendChild(s);
}, []);
// then: <button onClick={() => SomApi.startTest()}>
import { SpeedTest } from '@speedofme/mcp';

const test = new SpeedTest({
  apiSecret: process.env.SOM_API_SECRET
});
const r = await test.run();
console.log(r.download, r.upload,
            r.latency, r.jitter);
{
  "mcpServers": {
    "speedofme": {
      "command": "npx",
      "args": ["-y", "@speedofme/mcp"],
      "env": { "SOM_API_SECRET": "..." }
    }
  }
}

What the API returns

Every completed test hands your onTestCompleted callback one object:

PropertyTypeWhat it means
downloadnumberAverage download speed in Mbps
uploadnumberAverage upload speed in Mbps
maxDownload, maxUploadnumberPeak speeds in Mbps
latencynumberMinimum round trip in milliseconds
jitternumberLatency variance in milliseconds
testServerstringWhich test server the browser reached
ip_address, hostname, userAgentstringWho ran it, for your records

The same numbers land in your analytics dashboard with the date, location and device, so you can read results before you build any storage. onProgress fires while the test runs with the phase and the current speed, and onError gives you a code and a message when a test cannot complete.

How the measurement works

The browser downloads and then uploads real files over HTTPS to the nearest of our test servers, one stream at a time, in progressively larger samples until the speed holds steady. That is the Real-World Speed method: what a single connection delivers to an application, rather than a multi-stream burst. Nothing runs on your side, there is no plugin, and there is no app for the visitor to install.

Frameworks and platforms

The script tag works in any page, and the runnable examples cover the places people actually put it:

Node.js, the CLI and MCP

The @speedofme/mcp package (Node.js 18 or newer) gives you the same measurement outside the browser. The SDK's SpeedTest class returns the same result shape from run(); the CLI prints it as JSON for scripts and monitoring (npx -y @speedofme/mcp --json); and the MCP server exposes run_speed_test and get_test_history to Claude Code, Cursor, VS Code and the other clients listed in the integration docs. One API secret works for all three.

Keys, domains and local development

A key is bound to the domains you register in the portal, so a snippet copied off your page does not work anywhere else. Localhost is enabled on every account from the start, so you can build before you deploy. Full configuration, every callback and the complete result schema are in the API documentation.

Hiring platforms, contact centres and ISPs have run their connection checks on this API since 2013.

What it costs

Every completed test is one API call. The 30-day trial includes 100 calls and needs no card. Paid plans start at $49 a month for 1,000 calls (Startup), then $149 for 10,000 (Business) and $599 for 100,000 (Pro); enterprise volume is priced on request. The full table is on the API page.

Questions people ask

Do I need a server to run the test?

No. The browser talks directly to our test servers over HTTPS, and the result comes back to your JavaScript callback. You add one script tag and a key; there are no test files to host and nothing to deploy on your side.

Does it work on phones?

Yes. Any modern mobile browser runs it, including inside a WebView, with no app for the user to install. The native iOS, Android, Flutter and React Native examples show the usual wrappers.

Can I run it outside the browser?

Yes, through the @speedofme/mcp package: a promise-based SDK for Node.js, a CLI with JSON output, and an MCP server for AI agents. All three return the same download, upload, latency and jitter numbers as the JavaScript API.

How long does a test take?

Typically under a minute on a normal connection. The sustain time per sample is configurable (1 to 8 seconds), so you can trade a little accuracy for speed when the check has to be quick.

Is there a free plan?

There is a free 30-day trial with 100 API calls and no card required. After that, plans start at $49 a month for 1,000 calls. If you only want to test your own connection, the free speed test on our homepage is the right tool and needs no account.

Get your API key

30-day free trial · 100 API calls · No credit card · Plans from $49/month

Related