# Fake Data Generator - Schema-Driven, Seedable, Coherent (`eliai/lorem-data-generator`) Actor

Synthetic test datasets from your schema: 20 field types, persona-coherent rows (email matches the row's name), seed = fully deterministic reruns, safe demo-only email domains. $0.003 flat per dataset up to 1,000 rows — vs incumbents charging per record ($0.60/1k measured).

- **URL**: https://apify.com/eliai/lorem-data-generator.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 generated datasets

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Fake Data Generator — Schema-Driven, Seedable, Coherent Rows

Generate realistic test datasets from a schema you define: up to 1,000 rows per run across 20 field types — names, emails, phones, addresses, companies, job titles, dates, numbers, booleans, uuids, urls, IPv4s, colors, lorem text. Rows are **persona-coherent** (a row's email derives from that row's name — `mia.chen42@example.dev` belongs to Mia Chen, not to random noise), and a `seed` makes the whole dataset **deterministic** — same seed, same data, reproducible fixtures forever. Online, by API, or as an agent tool via Apify MCP.

### What you get

- One record per row, shaped exactly by your `fields` (or `template`) schema
- **Coherence**: name, email, username within a row belong to the same generated persona
- **Determinism**: pass `seed` and every run reproduces the identical dataset — CI fixtures that never flake
- Safe-by-design emails (`@example/…/demo` domains) — generated contact data can never hit real inboxes
- **Fail-soft honesty**: unknown field types are **named and excluded** in a free `{ok: false}` notice — never silently filled with lorem (a column you asked for containing something else is a lie)

### Input

```json
{
  "count": 100,
  "seed": "fixture-v1",
  "fields": [
    { "name": "id", "type": "uuid" },
    { "name": "firstName", "type": "firstName" },
    { "name": "email", "type": "email" },
    { "name": "age", "type": "number" },
    { "name": "active", "type": "boolean" }
  ]
}
```

Or shorthand: `{ "template": { "id": "uuid", "email": "email" } }`. No schema at all yields a sensible 13-field person dataset.

### Output (real run, one row)

```json
{
  "id": "5f0f1a3c-9b0e-4c3a-8f2d-6e1b2a3c4d5e",
  "firstName": "Nora",
  "email": "nora.patel17@demo.dev",
  "age": 47,
  "active": true,
  "site": "https://bright-forge.example.net/",
  "ip": "172.16.204.9"
}
```

Our release test asserts formats per type (uuid v4 nibbles, email/IPv4 regex), row count, id uniqueness, persona coherence, and that an unknown type (`quantum-capacitance`) is excluded with a notice rather than faked.

### Pricing

**$0.003 per dataset generated — flat, whether 1 row or 1,000.** Runs producing no rows charge nothing.

Measured against store incumbents (2026-08-07): jungle\_synthesizer/synthetic-dataset-generator charges $0.1 start + $0.0005 per record ($0.60 for 1,000 rows), perryay/mock-data-generator $0.008 start + $0.001 per item. A 1,000-row dataset here is $0.003 — the per-record incumbents' pricing model is the thing we undercut structurally.

### Honest limits

- Faker-style locale is US-English (names, phone shapes, addresses); no other locales yet.
- 20 supported types (the notice lists them when you guess wrong); no nested objects or cross-row relations (foreign keys) — rows are independent.
- Seeded determinism holds per actor version; a future generator improvement may change the mapping (your seed still gives you internally-consistent data, pin expectations to fields not exact strings if you upgrade).

### FAQ

**Why does coherence matter for test data?**
UI screenshots and demo environments look broken when the avatar says "John Smith" and the email says `xk29@rand.com`. Coherent rows read like a real database.

**How do I get reproducible CI fixtures?**
Fix `seed` and `count` — the dataset is identical on every run. Different seeds give independent datasets.

**Can generated emails accidentally reach real people?**
No — all email domains are reserved/demo-style by construction.

**How is this different from your UUID Generator?**
That tool is for bulk id streams (v4/v7/ULID/nanoid with sortability). This generates whole fake records — its `uuid` field type is plain v4. Different problems; use both together for id-heavy schemas.

**What happens with a typo'd field type?**
A free `{ok: false}` notice names it and lists the supported 20; the field is excluded from rows. Your dataset never silently contains lorem where you expected a phone number.

### Use from code or AI agents

```bash
curl -s "https://api.apify.com/v2/acts/EliAI~lorem-data-generator/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -X POST -H 'Content-Type: application/json' \
  -d '{"count": 50, "seed": "demo", "template": {"id": "uuid", "name": "name", "email": "email"}}'
```

Agents: connect [Apify MCP](https://mcp.apify.com) and call the `EliAI/lorem-data-generator` tool.

- **Capability:** schema-driven synthetic datasets — 20 field types, persona-coherent rows, seedable determinism
- **Required input:** none (default person schema); `fields`/`template`, `count`, `seed` optional
- **Returns:** one record per row; a free notice record when field types were excluded
- **Bounded:** 1,000 rows per run
- **Side effects:** none

# Actor input Schema

## `fields` (type: `array`):

Array of { "name": "...", "type": "..." } objects defining each column. Supported types: name, firstName, lastName, email, username, phone, address, city, country, company, jobTitle, date, number, boolean, uuid, paragraph, sentence, url, ipv4, color. Leave empty to use a default person schema.

## `template` (type: `object`):

Alternative to fields: an object mapping each field name to a type string, e.g. { "id": "uuid", "name": "name", "email": "email" }. Ignored if 'fields' is provided.

## `count` (type: `integer`):

How many mock rows to generate.

## `seed` (type: `string`):

Optional seed for deterministic output. The same seed + schema always produces identical rows. Leave empty for random data each run.

## Actor input object example

```json
{
  "fields": [
    {
      "name": "id",
      "type": "uuid"
    },
    {
      "name": "fullName",
      "type": "name"
    },
    {
      "name": "email",
      "type": "email"
    },
    {
      "name": "company",
      "type": "company"
    },
    {
      "name": "country",
      "type": "country"
    },
    {
      "name": "signupDate",
      "type": "date"
    },
    {
      "name": "active",
      "type": "boolean"
    }
  ],
  "count": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Every item this run produced, as JSON.

## `resultsCsv` (type: `string`):

The same items as a spreadsheet-ready CSV.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fields": [
        {
            "name": "id",
            "type": "uuid"
        },
        {
            "name": "fullName",
            "type": "name"
        },
        {
            "name": "email",
            "type": "email"
        },
        {
            "name": "company",
            "type": "company"
        },
        {
            "name": "country",
            "type": "country"
        },
        {
            "name": "signupDate",
            "type": "date"
        },
        {
            "name": "active",
            "type": "boolean"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/lorem-data-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "fields": [
        {
            "name": "id",
            "type": "uuid",
        },
        {
            "name": "fullName",
            "type": "name",
        },
        {
            "name": "email",
            "type": "email",
        },
        {
            "name": "company",
            "type": "company",
        },
        {
            "name": "country",
            "type": "country",
        },
        {
            "name": "signupDate",
            "type": "date",
        },
        {
            "name": "active",
            "type": "boolean",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("eliai/lorem-data-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fields": [
    {
      "name": "id",
      "type": "uuid"
    },
    {
      "name": "fullName",
      "type": "name"
    },
    {
      "name": "email",
      "type": "email"
    },
    {
      "name": "company",
      "type": "company"
    },
    {
      "name": "country",
      "type": "country"
    },
    {
      "name": "signupDate",
      "type": "date"
    },
    {
      "name": "active",
      "type": "boolean"
    }
  ]
}' |
apify call eliai/lorem-data-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/lorem-data-generator"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4BavZtFSEqF3Tn6dH/builds/pHmdf4D0fuYKeMIaV/openapi.json
