# Mini API audit — latency benchmark of 5 public no-key APIs All 5 endpoints require no signup and no API key. Five GETs were issued per API; the table below reports **3 timed runs each** (milliseconds, wall-clock, `perf_counter`), the **median**, and the HTTP status of every run. Raw measurements, no invented figures. | API | URL | Status (3 runs) | Timings ms (run1 / run2 / run3) | Median ms | |---|---|---|---|---| | GitHub REST | https://api.github.com/repos/torvalds/linux | 200 / 200 / 200 | 174.8 / 13.1 / 11.4 | **13.1** | | JSONPlaceholder | https://jsonplaceholder.typicode.com/posts/1 | 200 / 200 / 200 | 22.5 / 18.5 / 22.5 | **22.5** | | REST Countries | https://restcountries.com/v3.1/name/japan?fields=name,capital | 200 / 200 / 200 | 88.6 / 52.6 / 71.5 | **71.5** | | Dog CEO | https://dog.ceo/api/breeds/image/random | 200 / 200 / 200 | 186.9 / 102.8 / 105.3 | **105.3** | | Open-Meteo | https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41¤t=temperature_2m | 200 / 200 / 200 | 441.2 / 65.7 / 440.8 | **440.8** | ## Methodology Python 3 stdlib only (`urllib.request`, `time.perf_counter`, `statistics.median`), single client, no warm-up, one shared network path; each run is an identical GET with a descriptive User-Agent, full body read before the timer stops, 20 s timeout. Client-side wall-clock includes DNS/TLS on the first call, so run 1 is systematically the slowest — read the median, not the mean. ## Notable observations (response headers / behavior) - **GitHub REST** — `Cache-Control: public, max-age=60, s-maxage=60`, `ETag` present, and `X-RateLimit-Limit: 60` (only **60 req/h unauthenticated** — the main limit to design around). The 174.8 ms first run then 13 ms: connection reuse + edge cache. - **JSONPlaceholder** — `Cache-Control: max-age=43200` and an `Age: 17629` header, so this fixture is served ~4.9 h stale from Cloudflare edge; effectively a cached static response, hence the tight 18–22 ms spread. Advertises `X-RateLimit-Limit: 3600000` (nominal, not enforced). - **REST Countries** — `Cache-Control: max-age=14400`, `Age: 17288`, `ETag` present. Cached at the edge; the 52–89 ms spread is mostly per-request edge selection. - **Dog CEO** — `Cache-Control: no-store` (deliberately uncached, since it returns a random image) — consistent with the wider 103–187 ms and the absence of an `ETag`. - **Open-Meteo** — no `Cache-Control`/`ETag`/`Server` headers exposed, and the **least stable**: two runs near 440 ms and one at 66 ms. Real-time forecast computation with no edge caching; treat as a slow, variable backend and cache client-side. ## Error behavior All 15 requests returned HTTP 200; no rate-limit (429) or error path was observed in this sample. Headers were captured on the first successful request per API only.