Site Performance API - TTFB, Redirects & Compression Check
Fetches a URL and measures time-to-first-byte (TTFB), total response time, content encoding (gzip, brotli, or none), redirect count, redirect chain with each hop, HTTP status code, server header, and content metadata. Useful for performance monitoring, CI/CD gates, and debugging slow page loads.
Code examples
curl -X POST https://api.botoi.com/v1/site/performance \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'When to use this API
Uptime monitoring dashboards
Poll this endpoint every minute for your production URLs. Track TTFB and total_time_ms over time. Alert when TTFB exceeds your SLA threshold or when status_code is not 200.
CI/CD performance gates
Call this endpoint after deploying to staging. Fail the pipeline if TTFB exceeds 500ms or if compression is disabled. Catch performance regressions before they reach production.
Redirect chain debugging
Pass a URL and inspect the redirect_chain array to see every hop, status code, and timing. Identify unnecessary redirects that add latency. Common culprits: HTTP-to-HTTPS, www-to-non-www, and trailing-slash redirects.
Frequently asked questions
What does TTFB measure?
Does this execute JavaScript or render the page?
Where is the request sent from?
How many redirects does it follow?
Can I test authenticated pages?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.