Check Any Website's Performance with a Free API

2026-05-02 | Tags: [performance, api, speed, monitoring, web-vitals]

How fast is your website? The Page Performance Checker API tells you in one request: response time, page size, compression status, cache headers, redirect chain, and an overall grade.

Quick Check

curl -s "https://hermesforge.dev/api/perf?url=https://example.com" | python3 -m json.tool

Response:

{
  "url": "https://example.com",
  "final_url": "https://example.com/",
  "status_code": 200,
  "response_time_ms": 142.3,
  "size_bytes": 1256,
  "grade": "A+",
  "issues": ["No issues found"],
  "headers": {
    "Content-Type": "text/html; charset=UTF-8",
    "Content-Encoding": "gzip",
    "Cache-Control": "max-age=604800",
    "ETag": "\"3147526947\""
  }
}

What It Checks

The API analyzes several performance factors:

Factor Grade Impact
Response time < 200ms A+ eligible
Response time 200-500ms A
Response time 500-1000ms B
Response time 1-3 seconds C
Response time > 3 seconds F
Page size > 1MB Downgrade to B
Page size > 5MB Downgrade to C
No gzip/brotli compression Issue flagged
No cache headers Issue flagged

Monitor Multiple Sites

import requests

API = "https://hermesforge.dev/api/perf"

sites = [
    "https://yoursite.com",
    "https://api.yoursite.com",
    "https://docs.yoursite.com",
    "https://blog.yoursite.com",
]

for site in sites:
    result = requests.get(API, params={"url": site}).json()
    grade = result.get("grade", "?")
    time_ms = result.get("response_time_ms", 0)
    issues = result.get("issues", [])
    print(f"[{grade}] {site} — {time_ms}ms")
    for issue in issues:
        if issue != "No issues found":
            print(f"     ⚠ {issue}")

Output:

[A+] https://yoursite.com — 89.2ms
[B] https://api.yoursite.com — 742.1ms
     ⚠ Slow response (742.1ms)
[A] https://docs.yoursite.com — 210.5ms
[C] https://blog.yoursite.com — 1823.4ms
     ⚠ Very slow response (1823.4ms)
     ⚠ No compression (gzip/br)

Scheduled Performance Monitoring

Track performance over time with a cron job:

import requests
import json
from datetime import datetime

API = "https://hermesforge.dev/api/perf"
LOG_FILE = "/opt/monitoring/perf_log.jsonl"

sites = ["https://yoursite.com", "https://api.yoursite.com"]

for site in sites:
    result = requests.get(API, params={"url": site}).json()
    result["checked_at"] = datetime.utcnow().isoformat() + "Z"

    with open(LOG_FILE, "a") as f:
        f.write(json.dumps(result) + "\n")

    # Alert if grade drops below B
    if result.get("grade", "A") in ("C", "F"):
        print(f"ALERT: {site} grade is {result['grade']} ({result['response_time_ms']}ms)")

Crontab:

*/30 * * * *  python3 /opt/monitoring/check_perf.py  # Every 30 minutes

Track Redirect Chains

The API follows redirects by default and shows the full chain:

# Check if HTTP redirects to HTTPS properly
curl -s "https://hermesforge.dev/api/perf?url=http://yoursite.com" | python3 -m json.tool

The final_url field shows where the request ended up. If url and final_url differ, there was a redirect.

To skip following redirects:

curl -s "https://hermesforge.dev/api/perf?url=http://yoursite.com&follow_redirects=false" | python3 -m json.tool

CI/CD Integration

Fail your build if performance degrades:

#!/bin/bash
API="https://hermesforge.dev/api/perf"
URL="https://staging.yoursite.com"
MAX_MS=1000

RESULT=$(curl -s "${API}?url=${URL}")
TIME_MS=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('response_time_ms',0))")
GRADE=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('grade','?'))")

echo "Performance: ${GRADE} (${TIME_MS}ms)"

# Fail if response time exceeds threshold
if python3 -c "exit(0 if ${TIME_MS} < ${MAX_MS} else 1)"; then
  echo "PASS: Response time ${TIME_MS}ms < ${MAX_MS}ms"
else
  echo "FAIL: Response time ${TIME_MS}ms exceeds ${MAX_MS}ms threshold"
  exit 1
fi

Compare Competitors

Benchmark your site against competitors:

import requests

API = "https://hermesforge.dev/api/perf"

sites = {
    "Us": "https://yoursite.com",
    "Competitor A": "https://competitor-a.com",
    "Competitor B": "https://competitor-b.com",
}

print(f"{'Site':<20} {'Grade':<6} {'Time (ms)':<12} {'Size (KB)':<10}")
print("-" * 50)

for name, url in sites.items():
    result = requests.get(API, params={"url": url}).json()
    grade = result.get("grade", "?")
    time_ms = result.get("response_time_ms", 0)
    size_kb = result.get("size_bytes", 0) / 1024
    print(f"{name:<20} {grade:<6} {time_ms:<12.1f} {size_kb:<10.1f}")

Combine with Other APIs

Use the performance checker alongside other Hermes APIs for a complete audit:

import requests

BASE = "https://hermesforge.dev"
URL = "https://yoursite.com"

# Performance check
perf = requests.get(f"{BASE}/api/perf", params={"url": URL}).json()

# Dead link check
links = requests.get(f"{BASE}/api/deadlinks", params={"url": URL, "quick": "true"}).json()

# SEO audit
seo = requests.get(f"{BASE}/api/seo", params={"url": URL}).json()

# Tech stack detection
tech = requests.get(f"{BASE}/api/techstack", params={"url": URL}).json()

print(f"Site: {URL}")
print(f"Performance: {perf.get('grade', '?')} ({perf.get('response_time_ms', 0):.0f}ms)")
print(f"Broken links: {links.get('broken_links', 0)}/{links.get('total_links', 0)}")
print(f"SEO score: {seo.get('score', '?')}/100")
print(f"Tech stack: {', '.join(tech.get('technologies', [])[:5])}")

Getting Started

No signup needed:

curl -s "https://hermesforge.dev/api/perf?url=https://yoursite.com" | python3 -m json.tool

For higher rate limits in automated monitoring, get a free API key at /api. Full documentation at /tools/perf.