Developer API & Embed Widget

Integrate Speedtest.now into your website or application. We offer a free embeddable speed test widget and a JSON REST API for client info and rankings data.

Usage Requirements

Attribution Requirement

By using the Speedtest.now embed or API, you agree to display the "Powered by Speedtest.now" attribution link. This is a required condition of use. The embed widget displays this attribution automatically and it cannot be removed or hidden. For API integrations, you must include a visible link to speedtest.now near any displayed data. See our Terms of Service for full details.

Embed Widget

Add a fully functional speed test to your website using either an iframe snippet or a single JavaScript tag. The widget is self-contained and always displays the required Speedtest.now attribution.

Live Preview

Option 1: iframe Embed

Copy and paste this HTML into your page. Set width and height as needed.

<iframe
  src="https://speedtest.now/widget"
  width="100%"
  height="320"
  frameborder="0"
  title="Internet Speed Test"
  style="border-radius: 8px;"
></iframe>

Query Parameters

Parameter Values Description
theme dark (default) Widget color theme
ref your-domain.com Optional referrer identifier for analytics

Option 2: JavaScript Snippet

Add a single script tag anywhere in your page. The widget renders automatically at the script location.

<div id="speedtest-widget"></div>
<script src="https://speedtest.now/embed.js"></script>

The script creates a responsive iframe and appends the required attribution below it automatically.

REST API

All endpoints return JSON. No authentication is required for public endpoints. Rate limiting applies: see individual endpoint notes. All API consumers must display a visible "Powered by Speedtest.now" attribution.

Base URL: https://speedtest.now/api

GET /api/client-info

Returns client IP address, ISP name, country, region, and city based on geolocation.

{
  "ip": "1.2.3.x",
  "isp": "Example ISP",
  "country": "US",
  "region": "California",
  "city": "Los Angeles"
}

GET /api/rankings/countries

Returns top 50 countries ranked by median download speed over the past 7 days.

[
  {
    "country_code": "KR",
    "country_name": "South Korea",
    "median_download_mbps": 280.5,
    "median_upload_mbps": 240.1,
    "median_ping_ms": 8.2,
    "sample_count": 1452,
    "rank": 1
  },
  ...
]

GET /api/leaderboard/weekly

Returns the current week's top 20 download speed entries. Requires verified user accounts to appear.

{
  "week": "Week of Apr 7, 2026",
  "entries": [
    {
      "rank": 1,
      "username": "speedracer99",
      "score": 9841.2,
      "country": "JP"
    },
    ...
  ]
}

GET /api/servers/nearest

Returns list of active test servers ordered by priority. Use client-side latency probing to select nearest.

[
  {
    "id": 1,
    "name": "US West - Los Angeles",
    "city": "Los Angeles",
    "country": "US",
    "hostname": "la.speedtest.now",
    "protocol": "https"
  }
]

GET /api/result/<public_id>

Returns a single public speed test result by its public ID. Returns 403 if the result is set to private.

{
  "public_id": "abc123xyz",
  "download_mbps": 482.3,
  "upload_mbps": 21.7,
  "ping_ms": 14.0,
  "jitter_ms": 2.1,
  "packet_loss_pct": 0.0,
  "isp": "Xfinity",
  "country": "US",
  "city": "Chicago",
  "completed_at": "2026-04-12T10:30:00"
}

By using this widget or API you agree to our Terms of Service and Privacy Policy. Questions? Contact us.