How to generate test data in code

Generate realistic fake records — people, companies, products and more — as JSON. Examples in curl, JavaScript, and Python.

curl

curl "https://mock.wrapper-agency.com/api/v1/mock?type=person&count=10&locale=en"

JavaScript (fetch)

const res = await fetch(
  "https://mock.wrapper-agency.com/api/v1/mock?type=person&count=10"
);
const { data } = await res.json();
console.log(data[0].fullName); // e.g. "Jordan Rivera"

Python (requests)

import requests
r = requests.get(
    "https://mock.wrapper-agency.com/api/v1/mock",
    params={"type": "company", "count": 25, "locale": "en"},
)
for row in r.json()["data"]:
    print(row["name"])

Deterministic output (seed)

Pass seed to get the exact same records on every call — ideal for snapshot tests and reproducible fixtures.

curl "https://mock.wrapper-agency.com/api/v1/mock?type=person&count=5&seed=123"

Seeding a database

Generate an array, then bulk-insert it. With Prisma:

const { data } = await (
  await fetch("https://mock.wrapper-agency.com/api/v1/mock?type=person&count=100")
).json();
await prisma.user.createMany({ data });

Bulk (thousands of rows)

The free endpoint caps at 100 records. For up to 10,000 in one call, POST to the paid bulk endpoint:

POST https://mock.wrapper-agency.com/api/v1/pro/mock
{ "type": "person", "count": 5000 }

See the full API reference. All data is synthetic (@faker-js/faker) — no real PII.