Aller au contenu
POST AI agent ready /v1/site/check

Site Check API - Quick HTTP Status, TTFB & Compression

Fetches a single URL with a 15-second timeout and returns the HTTP status code, TTFB in milliseconds, content type, content length (when the server sends it), compression encoding (gzip, brotli, or null), server header, and total response time. Faster and cheaper than /v1/site/performance for basic uptime or compression audits because it skips the redirect chain trace.

Parameters

stringrequired

Fully qualified URL to probe. Must include http:// or https://.

Code examples

curl -X POST https://api.botoi.com/v1/site/check \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

When to use this API

Low-cost uptime pings from a cron job

Call /site/check every minute for each monitored URL. Alert when status_code is outside 200-299 or when response_time_ms exceeds your SLA. Cheaper than /site/performance when you do not need redirect tracing.

Compression audits across a domain list

Feed a list of marketing URLs through this endpoint from a batch job. Flag any with compressed: false to catch CDN or origin misconfigurations that waste bandwidth.

Quick "is this page live?" checks from a Slack bot

Wire the endpoint behind a slash command so engineers can verify a URL returns 200 without opening DevTools. The ttfb_ms and compression fields add useful context in the reply.

Frequently asked questions

How does this differ from /v1/site/performance?
This endpoint makes a single request and returns basic response metadata. /site/performance traces the full redirect chain hop-by-hop and measures each leg. Use /check for simple probes, /performance when you need to diagnose redirects.
What timeout does the fetch use?
15 seconds. If the target server does not respond within that window, the endpoint returns FETCH_FAILED with a 500 status.
Why is content_length sometimes null?
Servers using chunked transfer encoding do not send a Content-Length header. The field is passed through as null in that case. Use compression and content_type for additional context.
Does the endpoint follow redirects?
Yes, fetch follows redirects by default, and the reported status_code and TTFB reflect the final response. To see every hop in the chain, use /v1/site/performance instead.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.