> ## 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 /fake-data

> Generate realistic fake data for testing and development: names, emails, addresses, and more.

## Endpoint

```
POST https://api.bunny.build/api/v1/fake-data
```

## Authentication

| Header         | Required | Value                    |
| -------------- | -------- | ------------------------ |
| `X-API-Key`    | Yes      | Your API key (`bun_...`) |
| `Content-Type` | Yes      | `application/json`       |

## Overview

Generate realistic, locale-aware fake data for testing and development. Choose from seven schema types: people, companies, addresses, internet identities, finance details, phone numbers, and dates. Each record is a full object with multiple fields. Request up to 50 records in a single call with optional locale support for region-specific data.

## Use cases

* Seed development and staging databases with realistic test data
* Generate sample data for demos and prototypes
* Populate automated test fixtures without storing PII
* Create mock API responses for frontend development

## Details

Supported types: `person`, `company`, `address`, `internet`, `finance`, `phone`, `date`. Each type returns an array of objects (not plain strings). The `locale` parameter accepts `en`, `pt-BR`, or `es`. Count defaults to `1` and is capped at `50`.

## Request body

| Field    | Type   | Required | Description                                                                                                                 |
| -------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `type`   | string | No       | Schema type to generate (default: `person`). One of: `person`, `company`, `address`, `internet`, `finance`, `phone`, `date` |
| `count`  | number | No       | Number of records to generate (default: 1, max: 50)                                                                         |
| `locale` | string | No       | Locale for region-specific data: `en`, `pt-BR`, or `es` (default: `en`)                                                     |

### Example

```json theme={null}
{
  "type": "person",
  "count": 2,
  "locale": "pt-BR"
}
```

## Response

### 200 OK

| Field    | Type      | Description                                                                        |
| -------- | --------- | ---------------------------------------------------------------------------------- |
| `type`   | string    | The requested schema type                                                          |
| `locale` | string    | The locale used to generate the data                                               |
| `count`  | number    | Number of records returned                                                         |
| `data`   | object\[] | Array of generated records; the shape of each object depends on `type` (see below) |
| `record` | object    | Convenience alias for `data[0]` — the first generated record                       |

**Record shape by type:**

| Type       | Fields                                                                    |
| ---------- | ------------------------------------------------------------------------- |
| `person`   | `first_name`, `last_name`, `full_name`, `email`, `phone`, `avatar`, `bio` |
| `company`  | `name`, `catch_phrase`, `industry`, `email`, `website`, `phone`           |
| `address`  | `street`, `city`, `state`, `country`, `zip`, `lat`, `lon`                 |
| `internet` | `username`, `email`, `password`, `url`, `ip`, `mac`, `user_agent`         |
| `finance`  | `account`, `amount`, `currency`, `iban`, `bic`, `credit_card`             |
| `phone`    | `number`, `imei`                                                          |
| `date`     | `past`, `future`, `recent`, `birth_date`                                  |

**Example**

```json theme={null}
{
  "type": "person",
  "locale": "pt-BR",
  "count": 2,
  "data": [
    {
      "first_name": "Ana",
      "last_name": "Ferreira",
      "full_name": "Ana Ferreira",
      "email": "ana.ferreira@example.com",
      "phone": "+55 11 91234-5678",
      "avatar": "https://avatars.githubusercontent.com/u/12345678",
      "bio": "Architecto cum iste dolorum reiciendis."
    },
    {
      "first_name": "Carlos",
      "last_name": "Silva",
      "full_name": "Carlos Silva",
      "email": "carlos.silva@example.com",
      "phone": "+55 21 98765-4321",
      "avatar": "https://avatars.githubusercontent.com/u/87654321",
      "bio": "Voluptas reprehenderit aliquid enim."
    }
  ],
  "record": {
    "first_name": "Ana",
    "last_name": "Ferreira",
    "full_name": "Ana Ferreira",
    "email": "ana.ferreira@example.com",
    "phone": "+55 11 91234-5678",
    "avatar": "https://avatars.githubusercontent.com/u/12345678",
    "bio": "Architecto cum iste dolorum reiciendis."
  }
}
```

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

```json theme={null}
{
  "error": "Unknown type: uuid. Available: person, company, address, internet, finance, phone, date"
}
```

### 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/fake-data \
  -H "X-API-Key: bun_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"type": "person", "count": 2, "locale": "pt-BR"}'
```
