Skip to main content

Endpoint

POST https://api.bunny.build/api/v1/url-checker

Authentication

HeaderRequiredValue
X-API-KeyYesYour API key (bun_...)
Content-TypeYesapplication/json

Overview

Check whether any URL is reachable and inspect its response in real time. Bunny’s URL Checker follows redirects, measures response time, extracts the page title, and returns the final URL, giving you a full picture of the link’s health.

Use cases

  • Validate URLs before storing them in a database
  • Monitor external links in CMS content
  • Build broken-link checkers for websites
  • Verify redirect chains for SEO audits

Details

Follows up to 10 redirect hops. final_url contains the URL after all redirects. response_time_ms is measured from the first byte. URLs that time out after 10 seconds are returned with reachable: false.

Request body

FieldTypeRequiredDescription
urlstringYesThe URL to check (must include scheme, e.g. https://)

Example

{
  "url": "https://example.com"
}

Response

200 OK

FieldTypeDescription
urlstringThe URL that was checked
reachablebooleantrue if the URL responded successfully
status_codeint|nullHTTP status code returned by the URL, or null if unreachable
final_urlstring|nullThe URL after following all redirects
titlestring|nullPage <title> extracted from HTML (only for text/html responses)
redirect_countnumberNumber of redirects followed
response_time_msnumberTotal response time in milliseconds
errorstringError message when reachable is false
Example
{
  "url": "https://example.com",
  "reachable": true,
  "status_code": 200,
  "final_url": "https://www.example.com/",
  "title": "Example Domain",
  "redirect_count": 1,
  "response_time_ms": 214
}

401 Unauthorized

{
  "detail": "Missing API key. Include X-API-Key header."
}

402 Payment Required

{
  "detail": "Monthly quota exceeded. Upgrade your plan."
}

422 Unprocessable Entity

Invalid URL format.
{
  "detail": "Invalid URL format"
}

429 Too Many Requests

{
  "detail": "Rate limit exceeded. Try again in 60 seconds."
}

cURL example

curl -X POST https://api.bunny.build/api/v1/url-checker \
  -H "X-API-Key: bun_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'