> ## 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.

# Introduction

> Bunny API overview, base URL, and authentication

<Note>
  All endpoints require **API key** authentication via the `X-API-Key` header. See the endpoint pages for full request/response details.
</Note>

## <Icon icon="link" type="solid" /> Base URL

```
https://api.bunny.build/api/v1
```

## <Icon icon="lock" type="solid" /> Authentication

| Header         | Required    | Description                                     |
| -------------- | ----------- | ----------------------------------------------- |
| `X-API-Key`    | Yes         | Your API key (starts with `bun_`)               |
| `Content-Type` | Conditional | `application/json` (required for POST requests) |
| `Accept`       | Recommended | `application/json`                              |

<Card title="Example headers" icon="code" horizontal>
  ```
  X-API-Key: bun_aBcDeFgHiJkLmNoPqRsTuVwXyZ123456
  Content-Type: application/json
  Accept: application/json
  ```
</Card>

## <Icon icon="gauge-high" type="solid" /> Rate limiting

Responses include rate limit headers:

| Header                  | Description         |
| ----------------------- | ------------------- |
| `X-RateLimit-Limit`     | Requests per minute |
| `X-RateLimit-Remaining` | Remaining requests  |
| `X-RateLimit-Reset`     | Seconds until reset |

On **429**, the server may send `Retry-After` (seconds).

## <Icon icon="triangle-exclamation" type="solid" /> Error format

Errors return a JSON body:

```json theme={null}
{
  "detail": "Error message"
}
```

Validation errors (422) may return an array of detail objects with `loc`, `msg`, `type`.

## <Icon icon="list" type="solid" /> HTTP status codes

| Code | Meaning                                  |
| ---- | ---------------------------------------- |
| 200  | Success                                  |
| 400  | Bad Request: Invalid input               |
| 401  | Unauthorized: Missing or invalid API key |
| 402  | Payment Required: Quota exceeded         |
| 403  | Forbidden: Account deactivated           |
| 404  | Not Found                                |
| 422  | Unprocessable Entity: Validation error   |
| 429  | Too Many Requests: Rate limit exceeded   |
| 500  | Internal Server Error                    |

## <Icon icon="folder-tree" type="solid" /> Endpoints

<CardGroup cols={2}>
  <Card title="GET /cep-lookup/:cep" icon="map-pin" href="/api-reference/cep-lookup">
    Look up a Brazilian postal code (CEP).
  </Card>

  <Card title="GET /cnpj-data/:cnpj" icon="building" href="/api-reference/cnpj-data">
    Fetch public data for a Brazilian company (CNPJ).
  </Card>

  <Card title="GET /currency-exchange" icon="money-bill" href="/api-reference/currency-exchange">
    Get a real-time currency exchange rate.
  </Card>

  <Card title="GET /domain-availability/:domain" icon="globe" href="/api-reference/domain-availability">
    Check if a domain name is available.
  </Card>

  <Card title="GET /ip-classify" icon="network-wired" href="/api-reference/ip-classify">
    Classify an IP address by network type.
  </Card>

  <Card title="GET /ip-lookup" icon="magnifying-glass" href="/api-reference/ip-lookup">
    Look up geo and network data for an IP address.
  </Card>

  <Card title="GET /temporary-email" icon="envelope" href="/api-reference/temporary-email">
    Check if an email uses a disposable domain.
  </Card>

  <Card title="POST /translate" icon="language" href="/api-reference/translate">
    Translate text between languages.
  </Card>
</CardGroup>
