> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bunny.build/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /url-checker

> Check whether any URL is reachable, follow its redirects, measure response time, extract the page title, and return the final URL in one request.

## Endpoint

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

## Authentication

| Header         | Required | Value                    |
| -------------- | -------- | ------------------------ |
| `X-API-Key`    | Yes      | Your API key (`bun_...`) |
| `Content-Type` | Yes      | `application/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

| Field | Type   | Required | Description                                             |
| ----- | ------ | -------- | ------------------------------------------------------- |
| `url` | string | Yes      | The URL to check (must include scheme, e.g. `https://`) |

### Example

```json theme={null}
{
  "url": "https://example.com"
}
```

## Response

### 200 OK

| Field              | Type         | Description                                                         |
| ------------------ | ------------ | ------------------------------------------------------------------- |
| `url`              | string       | The URL that was checked                                            |
| `reachable`        | boolean      | `true` if the URL responded successfully                            |
| `status_code`      | int\|null    | HTTP status code returned by the URL, or `null` if unreachable      |
| `final_url`        | string\|null | The URL after following all redirects                               |
| `title`            | string\|null | Page `<title>` extracted from HTML (only for `text/html` responses) |
| `redirect_count`   | number       | Number of redirects followed                                        |
| `response_time_ms` | number       | Total response time in milliseconds                                 |
| `error`            | string       | Error message when `reachable` is `false`                           |

**Example**

```json theme={null}
{
  "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

```json theme={null}
{
  "detail": "Missing API key. Include X-API-Key header."
}
```

### 402 Payment Required

```json theme={null}
{
  "detail": "Monthly quota exceeded. Upgrade your plan."
}
```

### 422 Unprocessable Entity

Invalid URL format.

```json theme={null}
{
  "detail": "Invalid URL format"
}
```

### 429 Too Many Requests

```json theme={null}
{
  "detail": "Rate limit exceeded. Try again in 60 seconds."
}
```

## cURL example

```bash theme={null}
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"}'
```
