Skip to main content

Endpoint

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

Authentication

HeaderRequiredValue
X-API-KeyYesYour API key (bun_...)
Content-TypeYesapplication/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

FieldTypeRequiredDescription
typestringNoSchema type to generate (default: person). One of: person, company, address, internet, finance, phone, date
countnumberNoNumber of records to generate (default: 1, max: 50)
localestringNoLocale for region-specific data: en, pt-BR, or es (default: en)

Example

{
  "type": "person",
  "count": 2,
  "locale": "pt-BR"
}

Response

200 OK

FieldTypeDescription
typestringThe requested schema type
localestringThe locale used to generate the data
countnumberNumber of records returned
dataobject[]Array of generated records; the shape of each object depends on type (see below)
recordobjectConvenience alias for data[0] — the first generated record
Record shape by type:
TypeFields
personfirst_name, last_name, full_name, email, phone, avatar, bio
companyname, catch_phrase, industry, email, website, phone
addressstreet, city, state, country, zip, lat, lon
internetusername, email, password, url, ip, mac, user_agent
financeaccount, amount, currency, iban, bic, credit_card
phonenumber, imei
datepast, future, recent, birth_date
Example
{
  "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

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

402 Payment Required

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

422 Unprocessable Entity

{
  "error": "Unknown type: uuid. Available: person, company, address, internet, finance, phone, date"
}

429 Too Many Requests

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

cURL example

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"}'