跳转到内容
POST AI agent ready /v1/link/check

Link Check API - Dead Link and Response Time Monitor

Sends a HEAD request (falls back to GET if HEAD fails) and reports whether the URL is alive, the HTTP status code, content type, content length, and elapsed time in milliseconds. Network failures return alive:false with status 0. Request timeout is 10 seconds.

Parameters

stringrequired

Full URL to check, including the protocol.

Code examples

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

When to use this API

Scheduled link audits for docs and blog posts

Extract every outbound link from your docs site, run each through this endpoint nightly, and post broken links (status 4xx/5xx, or alive:false) to a Slack channel. Stops rot before readers complain.

CI check for external references

In your CI pipeline, batch-check every URL referenced in markdown files before the deploy. Fail the build when a reference returns 404, keeping your published pages link-clean.

Performance regression tracking

Log response_time_ms for each of your key landing pages over time. Spikes flag CDN misconfiguration, origin slowdowns, or region-specific routing problems before users notice.

Frequently asked questions

Does this follow redirects?
No. /v1/link/check reports the first response, including 3xx redirect status codes. Use /v1/link/expand to follow the full redirect chain and get the final destination URL.
Why does content_length come back null sometimes?
Many servers omit the Content-Length header on HEAD requests, especially when the response is chunked or generated on the fly. The field is null when the header is missing, not zero.
What does alive: false, status_code: 0 mean?
The request failed at the network layer. Common causes: DNS resolution failed, TCP connect timed out, TLS handshake aborted, or the 10-second timeout elapsed. response_time_ms still reports how long the attempt took.
Why HEAD instead of GET?
HEAD avoids downloading the response body, keeping checks fast and cheap for both sides. The endpoint falls back to GET automatically when a server returns 405 Method Not Allowed or closes the connection on HEAD.
Is there a rate limit?
Yes. Anonymous callers get 5 requests per minute; authenticated keys get higher limits per plan. For large link audits, batch work across minutes or use an API key.

Get your API key

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