> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Speed test

Run an ad-hoc multi-region HTTP test against any URL.

# Speed test

Public endpoint that runs an HTTP GET from all 6 regions in parallel and returns timing waterfalls.

## Run test

POST `/speed-test`

URL to test. Must be `http://` or `https://`, public reachable.

Subset of regions. Default: all 6.

```bash
curl -X POST https://happyuptime.com/api/v1/speed-test \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com" }'
```

```json
{
  "data": {
    "id": "spd_xyz",
    "url": "https://example.com",
    "results": [
      {
        "region": "us-east",
        "status_code": 200,
        "response_time_ms": 287,
        "timing": {
          "dns_ms": 12,
          "connect_ms": 24,
          "tls_ms": 38,
          "ttfb_ms": 142,
          "transfer_ms": 71
        }
      }
    ],
    "share_url": "https://happyuptime.com/speed-test/spd_xyz",
    "expires_at": "2026-04-18T20:00:00Z"
  }
}
```

## Get shared result

GET `/speed-test/{id}`

Returns a previously-run test. Cached in KV for 24 hours, then expires.

## Rate limits

Public, unauthenticated:

- 5 tests/min per IP
- 50 tests/day per IP

Authenticated (`Authorization: Bearer hu_...`):

- Subject to your plan's API rate limits
- No daily cap

## CLI

```bash
happy speed-test https://example.com --share
```

Returns the same data with a shareable URL.